Skip to content

[codex] fix provider auth compatibility#9444

Closed
g-guthrie wants to merge 1 commit into
NousResearch:mainfrom
g-guthrie:codex/provider-auth-compat-pr5
Closed

[codex] fix provider auth compatibility#9444
g-guthrie wants to merge 1 commit into
NousResearch:mainfrom
g-guthrie:codex/provider-auth-compat-pr5

Conversation

@g-guthrie

Copy link
Copy Markdown
Contributor

Summary

Restore provider/auth compatibility across auxiliary routing and runtime resolution.

Root Cause

A few auth and fallback paths diverged: named custom providers from providers: lost direct API keys, Codex token resolution leaked across contexts, and auxiliary-provider oauth detection/helpers drifted from current expectations.

What Changed

  • fix Codex token fallback and expiry handling in agent/auxiliary_client.py
  • restore the vision helper wrapper and oauth detection behavior
  • respect direct API keys in providers: runtime resolution
  • normalize provider list metadata for Hermes overlay providers
  • respect explicit cooldown reset timestamps in the credential pool

Validation

  • python -m pytest -o addopts='' tests/agent/test_auxiliary_client.py tests/hermes_cli/test_auth_provider_gate.py tests/hermes_cli/test_opencode_go_in_model_list.py tests/agent/test_credential_pool.py::test_explicit_reset_timestamp_overrides_default_429_ttl -q

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the submission @g-guthrie. Closing as superseded — the _sync_codex_entry_from_cli refinements target a function removed by #12360.

Hermes's Codex auth design was reworked in #12360 ("Hermes owns its own Codex auth; stop touching ~/.codex/auth.json") to stop sharing refresh tokens with the Codex CLI / VS Code extension (they rotate on every use, so shared access caused refresh_token_reused races). Users who want to adopt Codex CLI credentials get a one-time explicit prompt via hermes auth openai-codex instead.

The valid adjacent fixes from this batch (error parsing, fallback chain on auth failure, reauth UX) landed together in #15104.

@teknium1 teknium1 closed this Apr 24, 2026
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard area/auth Authentication, OAuth, credential pools provider/openai OpenAI / Codex Responses API labels Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/agent Core agent loop, run_agent.py, prompt builder comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists provider/openai OpenAI / Codex Responses API type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants