From 62ada5175c2ad6e4aa55986286ab8f06804cfabc Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Wed, 8 Jul 2026 12:30:47 -0700 Subject: [PATCH] feat(xai): add grok-4.5 (GA) to model catalog, context lengths, and reasoning-effort allowlist (#60887) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- agent/model_metadata.py | 7 +++++++ hermes_cli/models.py | 4 ++++ website/static/api/model-catalog.json | 9 ++++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/agent/model_metadata.py b/agent/model_metadata.py index c9a7d5771a8..88fab090251 100644 --- a/agent/model_metadata.py +++ b/agent/model_metadata.py @@ -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", ) diff --git a/hermes_cli/models.py b/hermes_cli/models.py index e19b99d4b7c..a103be30ac5 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -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", diff --git a/website/static/api/model-catalog.json b/website/static/api/model-catalog.json index d69dc3af4af..96009ade316 100644 --- a/website/static/api/model-catalog.json +++ b/website/static/api/model-catalog.json @@ -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" },