fix(auth): preserve named-provider headers in auxiliary calls - #91156
fix(auth): preserve named-provider headers in auxiliary calls#91156azilko wants to merge 1 commit into
Conversation
|
Thanks — agreed on the overlap. #91156 was intentionally scoped to the current command-backed named-provider path on I'm happy to consolidate that hunk and its command-backed Codex regression test into whichever generic auxiliary-header PR maintainers select. Of the linked implementations, #84223 appears to provide the broadest named-identity and async coverage; the Codex-specific test here can complement it by pinning the |
|
Overlap audit against the three older open PRs:
So this should not be merged as though the whole header-plumbing premise were novel. I have narrowed the PR description to call out the overlap and the exact delta. If one of the older auxiliary PRs lands first, I will rebase and retain only the missing Codex-host default/precedence behavior and its tests. |
Summary
User-Agentandoriginatorheaders when a named custom provider targetschatgpt.comproviders.<name>.extra_headersto the auxiliary OpenAI client, matching the main-agent construction pathWhy
Named custom providers already support command-backed credentials, and the main runtime applies both Codex host headers and provider-specific headers. The auxiliary named-provider branch did neither. A provider could therefore work for normal turns while title generation, compression, vision, or other auxiliary calls failed with 401/403 responses.
Header values are never logged.
Tests
scripts/run_tests.sh tests/agent/test_auxiliary_named_custom_providers.py tests/agent/test_auxiliary_user_default_headers.py tests/agent/test_codex_cloudflare_headers.py -q— 32 passedpython -m ruff check agent/auxiliary_client.py tests/agent/test_auxiliary_named_custom_providers.py— cleangit diff --check upstream/main...HEAD— cleanOverlap and exact delta
Open PRs #61346, #84223, and #88474 cover adjacent named-provider header plumbing. This draft should be reviewed as the narrower auxiliary Codex-host follow-up: it adds the ChatGPT/Codex User-Agent and originator defaults and makes the auxiliary precedence chain explicit (host defaults, global user defaults, provider-specific headers). If an older auxiliary PR lands first, this branch should be rebased and reduced to that remaining delta.