fix: surface Codex spark models#1685
Conversation
ReviewReading the diff against
elif pid == "openai-codex":
raw_models = []
codex_ids = []
try:
from hermes_cli.models import provider_model_ids as _provider_model_ids
codex_ids = [mid for mid in (_provider_model_ids("openai-codex") or []) if mid]
except Exception:
logger.warning("Failed to load OpenAI Codex models from hermes_cli")
for mid in _read_visible_codex_cache_model_ids():
if mid not in codex_ids:
codex_ids.append(mid)
raw_models = [{"id": mid, "label": _get_label_for_model(mid, [])} for mid in codex_ids]
if not raw_models:
raw_models = copy.deepcopy(_PROVIDER_MODELS.get("openai-codex", []))This matches the Two notes1. Cache-merge contract diverges from the agent. The agent's 2. Tests
The tests are well-scoped and the VerdictLGTM. The fix is narrow, mirrors existing live-fetch precedents, fails closed if the cache is missing or malformed, and has regression coverage for both the live-id and cache-merge paths. Closes #1680. |
4daa238
10 PRs (3 surfaces additions, 7 fixes): - nesquena#1644 model picker chip + group count (@bergeouss, closes nesquena#1425) - nesquena#1684 update network failures UX (@Michaelyklam, closes nesquena#1321) - nesquena#1685 Codex spark models (@Michaelyklam, closes nesquena#1680) - nesquena#1689 normalize profile base homes (@Michaelyklam, refs nesquena#749) - nesquena#1693 adaptive title refresh deadlock (@ai-ag2026) - nesquena#1701 normalize update banner URL (@Michaelyklam, closes nesquena#1691) - nesquena#1702 workspace double-click rename (@Michaelyklam, closes nesquena#1698) - nesquena#1703 cache invalidation on auth-store drift (@Michaelyklam, closes nesquena#1699) - nesquena#1704 markdown fence lengths (@Michaelyklam, closes nesquena#1696) - nesquena#1706 multi-image paste fix (@Michaelyklam, closes nesquena#1697) Tests: 4477 → 4503 (+26). Opus: SHIP, 7/7 verification clean. Co-authored-by: Michael Lam <Michaelyklam1@gmail.com> Co-authored-by: ai-ag2026 <noreply@github.com> Co-authored-by: bergeouss <noreply@github.com>
|
Closed by the v0.51.4 release in PR #1707 (merged at 4daa238, deployed to production). Live on production: https://github.com/nesquena/hermes-webui/releases/tag/v0.51.4 🚀 |
Thinking Path
gpt-5.3-codex-sparkis present in Codex but missing from the WebUI model picker./api/modelsused WebUI's staticopenai-codexsnapshot; the background live helper also inherits an agent filter that can drop visible Codex cache entries markedsupported_in_api: false.models_cache.jsonbefore falling back to the static WebUI list.What Changed
_read_visible_codex_cache_model_ids()to read visible, non-hidden slugs fromCODEX_HOME/~/.codex/models_cache.jsonin priority order.openai-codex/api/modelsgroup builder to usehermes_cli.models.provider_model_ids("openai-codex"), merge visible Codex cache entries, and only then fall back to_PROVIDER_MODELS.gpt-5.3-codex-sparkwithsupported_in_api: false.Closes #1680.
Why It Matters
Codex model availability changes faster than the WebUI release cadence. Reading Codex's own visible catalog keeps the picker aligned with the user's installed/authenticated Codex environment and prevents newly available models like Spark from being hidden behind stale static defaults.
Verification
Result:
UI media:
Risks / Follow-ups
supported_in_api: falseentries are intentionally surfaced when Codex marks them visible; if maintainers want API-supported-only picker semantics instead, Spark will remain hidden until the agent/provider contract changes.Model Used
AI assisted.
gpt-5.5