Repository navigation
feat(codex): OPENAI_CUSTOM_HEADERS via the custom provider's http_headers - #36
Merged
Merged
Conversation
… http_headers Codex has no env channel for extra request headers, so the counterpart of Claude Code's ANTHROPIC_CUSTOM_HEADERS lands in config.toml on the custom model provider the OPENAI_BASE_URL override already renders (headers alone keep the vendor endpoint). A cf-aig-metadata line lets a gateway attribute the traffic per app. The adapter context now carries every declared override, header bundles included; anything rendered from them is written only inside the attempt container. Unset overrides still render nothing: vendor-direct remains the default.
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryAdds
No actionable issues were found. Tests were inspected, not run.
|
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
OPENAI_CUSTOM_HEADERS(Name: Valuelines, the Codex counterpart ofANTHROPIC_CUSTOM_HEADERS) to the codex adapter'soptionalHostEnv. It is rendered ashttp_headerson the custom model provider that theOPENAI_BASE_URLoverride already produces; headers alone render the provider against the vendor's default endpoint.config.tomlinside the attempt container: the same trust boundary as the env that already carries them, written over stdin, gone with the container. The module comment spells this out.GET /modelsstill preflights correctly.*_BASE_URLor*_CUSTOM_HEADERS, both agents stay vendor-direct exactly as before. Tests cover both-set, headers-only, base-only and nothing-set, including JSON-valued headers surviving TOML escaping.