Skip to content

fix(missions): honor configured LLM temperature for bank mission merge (#2469 follow-up)#2477

Open
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:fix/bank-mission-temperature
Open

fix(missions): honor configured LLM temperature for bank mission merge (#2469 follow-up)#2477
r266-tech wants to merge 1 commit into
vectorize-io:mainfrom
r266-tech:fix/bank-mission-temperature

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

Problem

#2469 made the internal LLM temperature configurable and its docs state the global HINDSIGHT_API_LLM_TEMPERATURE "applies to every operation" and none "drops temperature from every operation" (the documented remedy for models that reject explicit temperatures, e.g. Azure gpt-5.5, issue #2459).

But bank/folder mission merging is a 5th internal LLM call that #2469 didn't reach. _llm_merge_mission (engine/retain/bank_utils.py, scope="bank_mission", used by merge_bank_mission) still hardcodes temperature=0.3 and never reads get_config():

content = await llm_config.call(
    messages=messages, scope="bank_mission", temperature=0.3, max_completion_tokens=8192
)

So setting HINDSIGHT_API_LLM_TEMPERATURE=none (your documented fix for Azure gpt-5.5) does not cover mission merging — the 0.3 is still sent, the call raises, the try/except in _llm_merge_mission swallows it, and the merge silently degrades to naive "{current} {new_info}" concatenation. With folder missions / mission-sandbox (#2455, #2254) actively shipping, this path is gaining users following the docs and still hitting a silent failure.

Fix

Add bank_mission as a 5th per-operation temperature knob, mirroring the four introduced in #2469 (verification / retain / reflect / consolidation):

  • ENV_LLM_TEMPERATURE_BANK_MISSION + DEFAULT_LLM_TEMPERATURE_BANK_MISSION = 0.3 (preserves the historical value)
  • HindsightConfig.llm_temperature_bank_mission, resolved via the existing _resolve_operation_temperature (per-op env → global HINDSIGHT_API_LLM_TEMPERATURE → default 0.3)
  • bank_utils.py now passes temperature=get_config().llm_temperature_bank_mission

The documented global override now genuinely covers mission merging, and none correctly omits the parameter there too. Default behavior is unchanged (still 0.3).

Docs / tests

  • Documented the new knob in configuration.md and regenerated the CI-enforced skills mirror via scripts/generate-docs-skill.sh (diff is the single new row).
  • test_llm_temperature_env.py: bank_mission added to _OP_FIELDS, so the default / global-override / global-none resolution cases now assert it too.
  • test_llm_temperature_pipeline.py: two new tests drive _llm_merge_mission through the mock LLM and assert the bank_mission call receives 0.3 by default and None (omitted) under HINDSIGHT_API_LLM_TEMPERATURE=none.

test_llm_temperature_env.py passes locally (13 passed); the pipeline tests mirror the existing reflect/retain pipeline tests (they need the Postgres-backed memory fixture, which runs in CI).

Follow-up to merged #2469.

vectorize-io#2469 made the internal LLM temperature configurable and documents that
HINDSIGHT_API_LLM_TEMPERATURE=none "drops temperature from every operation",
but bank/folder mission merging (_llm_merge_mission, scope="bank_mission")
still hardcoded temperature=0.3 and never read the config. For models that
reject explicit temperatures (Azure gpt-5.5 -- the vectorize-io#2459 case) the 0.3 is
still sent, the exception is swallowed by the try/except, and the LLM merge
silently degrades to naive "{current} {new_info}" concatenation -- so a user
who applied vectorize-io#2469's documented HINDSIGHT_API_LLM_TEMPERATURE=none remedy
still gets broken mission merging.

Add bank_mission as a 5th per-operation temperature knob mirroring the four
introduced in vectorize-io#2469 (verification/retain/reflect/consolidation): it resolves
per-op env -> global HINDSIGHT_API_LLM_TEMPERATURE -> built-in default 0.3,
so the documented global override now covers mission merging too. Regenerated
the docs skill mirror; added env + pipeline regression tests.
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.

1 participant