fix: select Codex runtime after desktop OAuth - #37525
Closed
donovan-yohan wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adjusts the Codex dashboard OAuth device-code flow to persist login state via the canonical auth/config storage so runtime provider resolution is immediately usable after login.
Changes:
- Update
_codex_full_login_workerto persist Codex tokens and set the active provider/config viahermes_cli.authhelpers (instead of writing only to the credential pool). - Add a regression test that asserts
auth.json,config.yaml, andresolve_runtime_provider()reflect the newly logged-in Codex provider.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/hermes_cli/test_web_oauth_dispatch.py | Adds an integration-style test ensuring a Codex dashboard OAuth login persists tokens + active provider and updates config for runtime resolution. |
| hermes_cli/web_server.py | Switches Codex dashboard login persistence to _save_codex_tokens / _update_config_for_provider to make runtime resolution ready post-login. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
donovan-yohan
force-pushed
the
fix/desktop-codex-oauth-runtime-selection
branch
from
June 2, 2026 17:24
3257485 to
dec7ce7
Compare
donovan-yohan
force-pushed
the
fix/desktop-codex-oauth-runtime-selection
branch
from
June 2, 2026 17:41
dec7ce7 to
4fa5de4
Compare
Contributor
Author
|
Superseded by #37517, which has been merged. Closing this out to keep the queue clean. |
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-codexas the active runtime provider after successful Desktop Codex device-code OAuthresolve_runtime_provider(requested=None)readyWhy
Desktop onboarding could show OpenAI Codex as connected because the device-code worker saved auth tokens, but runtime resolution still failed with “No inference provider configured” because no provider configuration was activated. Running
hermes modelin the CLI fixed affected installs by doing the missing provider selection. This PR makes the Desktop OAuth success path do that provider activation automatically.Fixes #37515.
Validation
uv run --extra dev python -m pytest tests/hermes_cli/test_web_oauth_dispatch.py::test_codex_dashboard_login_persists_active_runtime_provider -q -o 'addopts='failed before the implementation because no active Codex runtime provider was selecteduv run --extra dev python -m pytest tests/hermes_cli/test_web_oauth_dispatch.py::test_codex_dashboard_login_persists_active_runtime_provider -q -o 'addopts='→ 1 passeduv run --extra dev python -m pytest tests/hermes_cli/test_web_oauth_dispatch.py tests/hermes_cli/test_auth_codex_provider.py -q -o 'addopts='→ 33 passed./scripts/run_tests.sh tests/hermes_cli/test_web_oauth_dispatch.py tests/hermes_cli/test_auth_codex_provider.py→ 33 passeduv run --extra dev ruff check hermes_cli/web_server.py tests/hermes_cli/test_web_oauth_dispatch.py→ passedgit diff --check→ passedReview notes
_codex_full_login_worker()success path: after_save_codex_tokens(...), call_update_config_for_provider("openai-codex", base_url).auth.json.active_provideris set, andresolve_runtime_provider(requested=None)resolves Codex with the new token.