Skip to content

fix(models): update stale xAI model list (#16699)#16818

Closed
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/update-xai-model-list-16699
Closed

fix(models): update stale xAI model list (#16699)#16818
vominh1919 wants to merge 1 commit into
NousResearch:mainfrom
vominh1919:fix/update-xai-model-list-16699

Conversation

@vominh1919

Copy link
Copy Markdown
Contributor

Summary

The hardcoded _PROVIDER_MODELS["xai"] list in hermes_cli/models.py is stale. The previous entries (grok-4.20-reasoning, grok-4-1-fast-reasoning) no longer exist in xAI's catalog, causing HTTP 400 "Unknown Model" errors when users select them from the /model picker.

Root Cause

xAI renamed their models. The old names (grok-4.20-reasoning, grok-4-1-fast-reasoning) are no longer accepted.

Fix

Updated to current xAI model IDs (verified via OpenRouter catalog):

Old New Context
grok-4.20-reasoning grok-4.20 2M
grok-4-1-fast-reasoning grok-4.1-fast 2M
grok-4.20-multi-agent 2M
grok-4-fast 2M
grok-4 256K
grok-code-fast-1 256K

File changed: hermes_cli/models.py (6 lines changed in _PROVIDER_MODELS["xai"])

Testing

Verified model IDs against OpenRouter's live catalog (/api/v1/models).

Fixes #16699

_Update stale xAI model list in _PROVIDER_MODELS to match current
catalog from OpenRouter._

The previous entries were:
- grok-4.20-reasoning (no longer accepted by xAI)
- grok-4-1-fast-reasoning (never existed)

Updated to current xAI models:
- grok-4.20 (2M context)
- grok-4.20-multi-agent (2M context)
- grok-4.1-fast (2M context)
- grok-4-fast (2M context)
- grok-4 (256K context)
- grok-code-fast-1 (256K context)

Fixes NousResearch#16699
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cli CLI entry point, hermes_cli/, setup wizard provider/xai xAI (Grok) labels Apr 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #16734 — Same fix: update stale _PROVIDER_MODELS['xai'] IDs. #16734 additionally adds xai to _MODELS_DEV_PREFERRED for live catalog merge. Both fix #16699.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via #16925 with your authorship preserved (commit 6c78305).

The initial submission's names (grok-4.20, grok-4.20-multi-agent, grok-4.1-fast) turned out to be OpenRouter/Vercel-gateway normalized aliases — xAI-direct (https://api.x.ai/v1) serves the dated form (grok-4.20-0309-reasoning, etc.), so selecting the bare aliases would have reproduced the same HTTP 400 in a different way. Corrected to xAI-direct's actual catalog IDs against ~/.hermes/models_dev_cache.json.

Also added a follow-up commit (_xai_curated_models()) that reads the models.dev disk cache directly, so the list self-heals on the next cache refresh whenever xAI renames a model — addressing the structural piece @tyler-b4innova flagged in #16699. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists provider/xai xAI (Grok) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] _PROVIDER_MODELS["xai"] is stale — grok-4.20-reasoning renamed; broader fragility from hardcoded provider lists

3 participants