fleet-memory/hindsight-clients/python/hindsight_client_api
Nicolò Boschi 5d05962db0
feat: add source facts token limits to consolidation and recall (#509)
* feat: add source facts token limits to consolidation and recall

- Add two new configurable (per-bank) parameters:
  - consolidation_source_facts_max_tokens: total token budget for source
    facts across all observations in the consolidation prompt (-1 = unlimited)
  - consolidation_source_facts_max_tokens_per_observation: per-observation
    cap so each observation gets a fair share of source facts (-1 = unlimited,
    default 256)
- Both are also exposed as recall API parameters via SourceFactsIncludeOptions
  (max_tokens and max_tokens_per_observation)
- Consolidation now uses resolve_full_config to respect bank-level overrides
- Improve consolidation prompt: temporal metadata (occurred_start=, | Involving:)
  is now clearly separated from observation text, with a concrete example showing
  the expected synthesis style and explicit rules not to copy raw fact lines
- Add tests for recall source facts capping and consolidation config forwarding
- Expose all three new fields in the control plane bank config UI
- Document new env vars in configuration.md
- Regenerate OpenAPI spec and all SDK clients

* fix: reorder observations UI fields and rename Label Groups to Entity Labels

* fix: revert Entities section title (only rename inner label)

* doc: add consolidation source facts and batch size fields to memory-banks docs
2026-03-06 13:01:33 +01:00
..
api Release v0.4.16 2026-03-05 17:54:59 +01:00
models feat: add source facts token limits to consolidation and recall (#509) 2026-03-06 13:01:33 +01:00
__init__.py Release v0.4.16 2026-03-05 17:54:59 +01:00
api_client.py Release v0.4.16 2026-03-05 17:54:59 +01:00
api_response.py rename to hindsight (#2) 2025-11-25 19:28:26 +01:00
configuration.py Release v0.4.16 2026-03-05 17:54:59 +01:00
exceptions.py Release v0.4.16 2026-03-05 17:54:59 +01:00
rest.py Release v0.4.16 2026-03-05 17:54:59 +01:00