fix(agent): raw_codex client uses runtime-resolved base_url#5988
Open
Tranquil-Flow wants to merge 1 commit into
Open
fix(agent): raw_codex client uses runtime-resolved base_url#5988Tranquil-Flow wants to merge 1 commit into
Tranquil-Flow wants to merge 1 commit into
Conversation
|
Friendly bump on this PR in case it fell through the cracks \u2014 would love a review when someone has a minute. Thanks! |
Zijie-Tian
added a commit
to Zijie-Tian/hermes-agent
that referenced
this pull request
Apr 18, 2026
The main OpenAI client path was injecting a custom httpx transport that bypassed proxy-aware defaults, while the raw Codex path ignored runtime-resolved base URLs and openai-codex callers could still pin chat_completions. This packages the minimal local fixes and regression tests needed to make Hermes reliably use Codex gpt-5.4 behind the user's configured proxy. Constraint: Must preserve unrelated local edits in the repo Constraint: Must keep Hermes on the Codex Responses path for openai-codex Rejected: Commit workspace-level ~/.hermes/.env changes | outside repo scope Rejected: Wait for upstream PR merges | user needs a working fork branch now Confidence: high Scope-risk: moderate Reversibility: clean Directive: If upstream merges NousResearch#11733/NousResearch#10044/NousResearch#5988, rebase this branch against their final versions before reusing it Tested: pytest tests/run_agent/test_create_openai_client_reuse.py -q Tested: pytest tests/run_agent/test_run_agent_codex_responses.py -q Tested: pytest tests/agent/test_auxiliary_client.py -q Tested: hermes chat --provider openai-codex -m gpt-5.4 -Q --max-turns 1 -q "Reply with exactly OK." Tested: hermes chat -Q --max-turns 1 -q "Reply with exactly OK." Not-tested: gateway / IM platform flows Related: NousResearch#11609 Related: NousResearch#11733 Related: NousResearch#10044 Related: NousResearch#5988
Collaborator
6074d57 to
907d96a
Compare
907d96a to
44b47ba
Compare
1 task
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.
What does this PR do?
resolve_provider_client()was hardcoding_CODEX_AUX_BASE_URLfor theraw_codex=Truepath, ignoring any custom base URL set viaHERMES_CODEX_BASE_URLor a Codex-compatible proxy. This change callsresolve_codex_runtime_credentials()(the same resolver used by the non-raw path) so custom proxies and load balancers work correctly.Related Issue
Fixes #5875
Type of Change
Changes Made
agent/auxiliary_client.py— targeted fix inresolve_provider_client()so theraw_codex=Truepath usesresolve_codex_runtime_credentials()instead of the hardcoded base URL constanttests/agent/test_auxiliary_client.py— regression test covering runtime-resolvedbase_urlfor the raw Codex clientHow to Test
pytest tests/agent/test_auxiliary_client.py— passesHERMES_CODEX_BASE_URLset to a proxy URL, confirmraw_codex=Truesessions hit the custom endpoint correctlyChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs