Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions hermes_cli/runtime_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,22 @@ def resolve_runtime_provider(
"falling through to next provider.")

if provider == "openai-codex":
# Direct config: explicit api_key in config.yaml (e.g. sub2api proxy).
# Takes priority over OAuth credentials from hermes-auth-store.
cfg_api_key = str(model_cfg.get("api_key") or "").strip()
if cfg_api_key:
cfg_base_url = (
str(model_cfg.get("base_url") or "").strip().rstrip("/")
)
return {
"provider": "openai-codex",
"api_mode": "codex_responses",
"base_url": cfg_base_url or DEFAULT_CODEX_BASE_URL,
"api_key": cfg_api_key,
"source": "config",
"requested_provider": requested_provider,
}
# Fallback: OAuth credentials from hermes-auth-store
try:
creds = resolve_codex_runtime_credentials()
return {
Expand Down
Loading