fix: pass request_overrides to background review and curator agents - #56653
Closed
TurgutKural wants to merge 2 commits into
Closed
TurgutKural wants to merge 2 commits into
TurgutKural wants to merge 2 commits into
Conversation
Background review and curator agents were not inheriting request_overrides from the parent agent or the resolved runtime provider. This caused provider-specific extra_body fields (like `store: false` for custom providers) to be missing from their LLM API calls. The background review agent (skill/memory updates) now inherits request_overrides from the parent agent. The curator agent now extracts request_overrides from the resolved runtime provider, matching the behavior of the main agent initialization path. Fixes the bug where custom providers with extra_body config (e.g. `store: false`) were not applied to auxiliary LLM calls.
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.
Bug
Background review and curator agents were not inheriting
request_overridesfrom the parent agent or the resolved runtime provider. This caused provider-specificextra_bodyfields (likestore: falsefor custom providers) to be missing from their LLM API calls.Reproduction: Configure a custom provider with
extra_body: store: false(e.g. pioneer provider). Regular chat completions sendstore: falsecorrectly, but background review (skill/memory updates) and curator calls do not — the provider stores these requests when it shouldn't.Fix
agent/background_review.py: The background review agent now inheritsrequest_overridesfrom the parent agent viagetattr(agent, "request_overrides", None).agent/curator.py: The curator agent now extractsrequest_overridesfrom the resolved runtime provider (_rp.get("request_overrides")), matching the behavior of the main agent initialization path.Root Cause
Both agent creation sites (
background_review.py:648andcurator.py:1878) calledAIAgent(...)without passingrequest_overrides. Sinceinit_agentdefaultsrequest_overridesto{}, the provider'sextra_bodyconfig was silently dropped for these auxiliary LLM calls.Testing
py_compilesyntax checkcli_commands_mixin.pywhich already passesrequest_overridesto its background agent