HERMES-GIELIE/static
nesquena-hermes c91eaaf05f
fix: route openai-codex live model fetch through agent get_codex_model_ids() (#410)
* fix: route openai-codex live model fetch through agent's get_codex_model_ids()

Previously _handle_live_models() grouped openai-codex with openai and sent a
request to https://api.openai.com/v1/models, which returns 403 because Codex
auth is OAuth-based via chatgpt.com, not a standard API key. The live fetch
silently failed and the UI showed only the hardcoded static list.

Now: openai-codex has a dedicated early-exit branch that calls
hermes_cli.codex_models.get_codex_model_ids() — the same path the agent CLI
uses. It resolves models in order: live Codex API (if OAuth token available) >
~/.codex/ local cache > DEFAULT_CODEX_MODELS. This means:

- If the user has a valid Codex OAuth session, the UI gets the exact model list
  their subscription provides (e.g. gpt-5.2, gpt-5.3-codex-spark that aren't
  in the hardcoded list)
- If the OAuth session is expired, falls back to local ~/.codex/ cache
- Always has DEFAULT_CODEX_MODELS as final fallback

Also: improved label generation for Codex model IDs (GPT-5.4 Mini vs GPT 5 4 Mini).
Added 1 structural regression test.

* docs: v0.50.30 release — version badge and CHANGELOG

---------

Co-authored-by: Nathan Esquenazi <nesquena@gmail.com>
2026-04-13 22:49:04 -07:00
..
boot.js v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
commands.js feat: composer-centric UI refresh + Hermes Control Center (v0.50.0, closes #242) 2026-04-12 11:55:40 -07:00
i18n.js feat: relative time labels in session sidebar (#406) 2026-04-13 22:26:05 -07:00
icons.js feat: composer-centric UI refresh + Hermes Control Center (v0.50.0, closes #242) 2026-04-12 11:55:40 -07:00
index.html fix: route openai-codex live model fetch through agent get_codex_model_ids() (#410) 2026-04-13 22:49:04 -07:00
login.js v0.44.0: approval fix, login CSP, update diagnostics, Lucide icons 2026-04-10 10:02:28 -07:00
messages.js fix: durable inflight reload snapshots via localStorage (#367) 2026-04-13 16:25:31 -07:00
onboarding.js feat: OAuth provider onboarding path — Codex/Copilot no longer blocks setup (#331) 2026-04-12 14:28:16 -07:00
panels.js feat: opt-in chat bubble layout (closes #336) (#403) 2026-04-13 21:42:01 -07:00
sessions.js fix: correct tool call card rendering on session load after context compaction (#408) 2026-04-13 22:41:31 -07:00
style.css feat: relative time labels in session sidebar (#406) 2026-04-13 22:26:05 -07:00
ui.js fix: durable inflight reload snapshots via localStorage (#367) 2026-04-13 16:25:31 -07:00
workspace.js feat: KaTeX math rendering for LaTeX in chat + workspace previews (#352) 2026-04-13 11:40:15 -07:00