feat(config): per-operation reasoning_effort override (#2998) - #3043
Merged
Conversation
reasoning_effort was the only LLM request setting without a per-operation override: retain, reflect and consolidation all read the single global HINDSIGHT_API_LLM_REASONING_EFFORT. When one operation requires a specific value (e.g. reflect needs "none" for OpenAI reasoning models that reject function tools otherwise), that value is forced onto the others, silently degrading their generation quality. Add REASONING_EFFORT to the existing per-operation set, following the established fallback pattern: HINDSIGHT_API_RETAIN_LLM_REASONING_EFFORT HINDSIGHT_API_REFLECT_LLM_REASONING_EFFORT HINDSIGHT_API_CONSOLIDATION_LLM_REASONING_EFFORT Each falls back to HINDSIGHT_API_LLM_REASONING_EFFORT when unset.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reasoning_effortwas the only LLM request setting with no per-operation override. Retain, reflect and consolidation each already accept their ownPROVIDER,API_KEY,MODEL,BASE_URL,MAX_CONCURRENT,MAX_RETRIES,INITIAL_BACKOFF,MAX_BACKOFF,TIMEOUTandLITELLMROUTER_CONFIG— but all four operation configs read the single globalHINDSIGHT_API_LLM_REASONING_EFFORT.When one operation requires a specific value, every other operation is forced to take it too. Concretely: some OpenAI reasoning models reject function tools unless
reasoning_effortis exactly"none". Reflect is a tool-calling search loop, so pointing it at such a model requiresnone— which then lands on retain and consolidation as well, silently degrading their generation quality (the reported case: retain emitting facts in Chinese from an English transcript).Closes #2998.
Change
Adds
REASONING_EFFORTto the existing per-operation set, following the established fallback pattern used by every neighbouring field:An operator can now set reflect to
none(satisfying the tool-call constraint) while retain keepslow.config.py: threeENV_*constants, threestr | Nonedataclass fields, threefrom_env()parses (empty/unset →None).memory_engine.py: the three per-operation LLM configs readconfig.<op>_llm_reasoning_effort or config.llm_reasoning_effort. The global default config is unchanged.configuration.md(and its skill mirror).Tests
TestPerOperationReasoningEffortintest_per_operation_llm_config.py:None(fall back at runtime);MemoryEnginethreads each override into its LLM config, and an unset operation inherits the global value.Notes
.env.example— matching the existing precedent (none of the ~30 other per-op override vars are listed there; the file documents the prefix-fallback pattern once and lists only the globalHINDSIGHT_API_LLM_REASONING_EFFORT).