feat(xai): add grok-4.5 (GA) to model catalog, context lengths, and reasoning-effort allowlist (#60887)

* feat(xai): add grok-4.5 (early access) to catalog, context lengths, and reasoning-effort allowlist

- hermes_cli/models.py: grok-4.5 in _XAI_CURATED_EXTRAS (callable but absent
  from models.dev) and _XAI_STATIC_FALLBACK, so the /model picker and
  validation surface it on both xai and xai-oauth.
- agent/model_metadata.py: context lengths grok-4.5 -> 500K (per model card)
  and grok-build-latest -> 500K (alias); grok-4.5 added to
  _GROK_EFFORT_CAPABLE_PREFIXES.

Verified live against api.x.ai /v1/responses (2026-07-08): effort
low/medium/high accepted (server default: high), "none" rejected,
function calling works, full agent turn with terminal tool succeeded.

* feat(xai): grok-4.5 GA — add aggregator catalog entries, refresh comments

grok-4.5 is now GA: models.dev lists it (500K context, effort
low/medium/high) and both OpenRouter and Nous serve x-ai/grok-4.5.
Add it to the OpenRouter fallback snapshot and the Nous static list,
and update the early-access comments.

* chore: regenerate model-catalog.json for x-ai/grok-4.5
This commit is contained in:
Teknium 2026-07-08 12:30:47 -07:00 committed by GitHub
parent aabfedcac0
commit 62ada5175c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View file

@ -289,11 +289,13 @@ DEFAULT_CONTEXT_LENGTHS = {
# Premium+); /v1/responses additionally enforces a ~262144 input+output
# budget, but the usable context (what we track here) is 200k.
"grok-composer": 200000, # grok-composer-2.5-fast (Grok Build CLI)
"grok-build-latest": 500000, # alias of grok-4.5 (early access)
"grok-build": 256000, # grok-build-0.1
"grok-code-fast": 256000, # grok-code-fast-1
"grok-2-vision": 8192, # grok-2-vision, -1212, -latest
"grok-4-fast": 2000000, # grok-4-fast-(non-)reasoning, also matches -reasoning
"grok-4.20": 2000000, # grok-4.20-0309-(non-)reasoning, -multi-agent-0309
"grok-4.5": 500000, # grok-4.5, grok-4.5-latest — 500K context per docs.x.ai
"grok-4.3": 1000000, # grok-4.3, grok-4.3-latest — 1M context per docs.x.ai
"grok-4": 256000, # grok-4, grok-4-0709
"grok-3": 131072, # grok-3, grok-3-mini, grok-3-fast, grok-3-mini-fast
@ -347,6 +349,11 @@ _GROK_EFFORT_CAPABLE_PREFIXES = (
"grok-3-mini",
"grok-4.20-multi-agent",
"grok-4.3",
# grok-4.5: verified live against /v1/responses 2026-07-08 — accepts
# effort low/medium/high (default: high when omitted) but REJECTS
# "none" ("This model does not support `reasoning_effort` value `none`"),
# unlike grok-4.3. models.dev agrees: effort values [low, medium, high].
"grok-4.5",
)

View file

@ -48,6 +48,7 @@ OPENROUTER_MODELS: list[tuple[str, str]] = [
("google/gemini-3.1-pro-preview", ""),
("google/gemini-3.5-flash", ""),
# xAI
("x-ai/grok-4.5", ""),
("x-ai/grok-4.3", ""),
# DeepSeek
("deepseek/deepseek-v4-pro", ""),
@ -113,6 +114,7 @@ def _codex_curated_models() -> list[str]:
# grok-4-1-fast{,-reasoning,-non-reasoning}, grok-code-fast-1 → grok-4.3).
_XAI_STATIC_FALLBACK: list[str] = [
"grok-build-0.1",
"grok-4.5",
"grok-4.3",
"grok-4.20-0309-reasoning",
"grok-4.20-0309-non-reasoning",
@ -121,6 +123,7 @@ _XAI_STATIC_FALLBACK: list[str] = [
# Callable via xAI OAuth but omitted from models.dev and /v1/models listings.
_XAI_CURATED_EXTRAS: list[str] = [
"grok-4.5", # GA 2026-07 — kept until the models.dev disk cache refreshes
"grok-composer-2.5-fast",
]
@ -191,6 +194,7 @@ _PROVIDER_MODELS: dict[str, list[str]] = {
"google/gemini-3.1-pro-preview",
"google/gemini-3.5-flash",
# xAI
"x-ai/grok-4.5",
"x-ai/grok-4.3",
# DeepSeek
"deepseek/deepseek-v4-pro",

View file

@ -1,6 +1,6 @@
{
"version": 1,
"updated_at": "2026-07-08T13:38:17Z",
"updated_at": "2026-07-08T18:59:16Z",
"metadata": {
"source": "hermes-agent repo",
"docs": "https://hermes-agent.nousresearch.com/docs/reference/model-catalog"
@ -56,6 +56,10 @@
"id": "google/gemini-3.5-flash",
"description": ""
},
{
"id": "x-ai/grok-4.5",
"description": ""
},
{
"id": "x-ai/grok-4.3",
"description": ""
@ -186,6 +190,9 @@
{
"id": "google/gemini-3.5-flash"
},
{
"id": "x-ai/grok-4.5"
},
{
"id": "x-ai/grok-4.3"
},