From f81c0394d06785a006d65d0a903b01d5b455e55d Mon Sep 17 00:00:00 2001 From: jerilynzheng Date: Mon, 20 Apr 2026 15:47:05 -0700 Subject: [PATCH] fix: correct AI_GATEWAY_MODELS slugs to match Vercel's catalog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original list was copied from OpenRouter conventions and didn't match what Vercel actually hosts. Verified against the live /v1/models endpoint (266 models): - qwen/qwen3.6-plus → alibaba/qwen3.6-plus (Vercel hosts Qwen under alibaba/) - z-ai/glm-5.1 → zai/glm-5.1 (no hyphen) - x-ai/grok-4.20 → xai/grok-4.20-reasoning (no hyphen, picks reasoning variant) - google/gemini-3-flash-preview → google/gemini-3-flash (no -preview suffix) - moonshotai/kimi-k2.5 → moonshotai/kimi-k2.6 (newest available) --- hermes_cli/models.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hermes_cli/models.py b/hermes_cli/models.py index 0feed76bd..8dd6000ce 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -70,10 +70,12 @@ _openrouter_catalog_cache: list[tuple[str, str]] | None = None # Fallback Vercel AI Gateway snapshot used when the live catalog is unavailable. # OSS / open-weight models prioritized first, then closed-source by family. +# Slugs match Vercel's actual /v1/models catalog (e.g. alibaba/ for Qwen, +# zai/ and xai/ without hyphens). AI_GATEWAY_MODELS: list[tuple[str, str]] = [ - ("moonshotai/kimi-k2.5", "recommended"), - ("qwen/qwen3.6-plus", ""), - ("z-ai/glm-5.1", ""), + ("moonshotai/kimi-k2.6", "recommended"), + ("alibaba/qwen3.6-plus", ""), + ("zai/glm-5.1", ""), ("minimax/minimax-m2.7", ""), ("anthropic/claude-sonnet-4.6", ""), ("anthropic/claude-opus-4.7", ""), @@ -83,9 +85,9 @@ AI_GATEWAY_MODELS: list[tuple[str, str]] = [ ("openai/gpt-5.4-mini", ""), ("openai/gpt-5.3-codex", ""), ("google/gemini-3.1-pro-preview", ""), - ("google/gemini-3-flash-preview", ""), + ("google/gemini-3-flash", ""), ("google/gemini-3.1-flash-lite-preview", ""), - ("x-ai/grok-4.20", ""), + ("xai/grok-4.20-reasoning", ""), ] _ai_gateway_catalog_cache: list[tuple[str, str]] | None = None