Skip to content

feat/recall prefer observations default - #5617

Merged
nicoloboschi merged 4 commits into
mainfrom
feat/recall-prefer-observations-default
Oct 15, 2026
Merged

nicoloboschi merged 4 commits into
mainfrom
feat/recall-prefer-observations-default

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

Closes #5131

  • New hierarchical config recall_prefer_observations (HINDSIGHT_API_RECALL_PREFER_OBSERVATIONS, default false — no behaviour change).
  • REST prefer_observations and MCP recall param are now bool | None; omitted → bank-resolved default; explicit value wins. Engine internals (consolidation etc.) still default to False.
  • CLI --prefer-observations sends nothing when the flag is absent; Python client default is now None.
  • Control plane: bank config → Recall section gets the tri-state setting (inherit option shows the resolved API value); recall playground gets a switch that starts at the bank's resolved value and only sends the flag when changed.
  • Tests: engine unit test (None follows bank config, explicit False wins) + blackbox system story in test_27_observations_in_recall.py.

Skipped the optional accept_with recall-options extension hook — the config default covers the MCP case.

Add recall_prefer_observations (env HINDSIGHT_API_RECALL_PREFER_OBSERVATIONS,
default false), resolved env -> tenant -> bank. REST RecallRequest and the MCP
recall tool now take prefer_observations: bool | None; None uses the resolved
default, an explicit value still wins. Internal engine callers stay False.

Control plane: tri-state setting in the bank config Recall section (inherit
shows the resolved server value), and a Prefer observations switch in the
recall playground that starts at the bank's resolved value.
- test: sort imports (ruff I001)
- cli: --prefer-observations takes an optional bool so 'false' can override a bank default
- ts client: doc says omitted uses bank recall_prefer_observations
- test: MCP recall passes prefer_observations=None when omitted, explicit False through
- docs: recall.mdx wording no longer contradicts the bank default
- ui: dedicated recallServerDefaultState key; Recall section description covers dedup
- ui: playground sends the shown value explicitly when the bank config failed to load
… client test expects None default

- python/ts update_bank_config wrappers take recall_prefer_observations (check-client-coverage)
- python client test: omitted prefer_observations is None (bank default), not False
@nicoloboschi
nicoloboschi merged commit bb2b95a into main Oct 15, 2026
117 checks passed
@nicoloboschi
nicoloboschi deleted the feat/recall-prefer-observations-default branch October 15, 2026 13:29
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server/bank default for recall prefer_observations (MCP clients get raw fact + observation duplicates)

1 participant