Skip to content

Add Vercel AI Gateway as a first-class provider - #447

Open
mundabra wants to merge 1 commit into
andrewyng:mainfrom
mundabra:add-vercel-ai-gateway-provider
Open

Add Vercel AI Gateway as a first-class provider#447
mundabra wants to merge 1 commit into
andrewyng:mainfrom
mundabra:add-vercel-ai-gateway-provider

Conversation

@mundabra

@mundabra mundabra commented Aug 5, 2026

Copy link
Copy Markdown

What

Adds the Vercel AI Gateway as a first-class provider: one key, 300+ models across every major creator, through the gateway's OpenAI-compatible endpoint. Filed as a reseller — same category as Together / Fireworks / OpenRouter (many labs' models behind one key, their model namespaces verbatim).

  • registry.py_compat() descriptor at the end of the reseller block: vercel: routing prefix, prefilled https://ai-gateway.vercel.sh/v1, AI_GATEWAY_API_KEY (Vercel's documented env var), recommended anthropic/claude-haiku-4.5
  • matrix.py — six curated entries, one per major creator, agent-capable cost-efficient tiers. Ids, context windows, and vision flags are the gateway's live /v1/models values (315 models, checked 2026-08-05). Introduces _AGENTIC_VISION_COMPAT (vision without pdf=) and folds the two existing inline copies of that literal (Muse Spark, Kimi K3 via Together) into it
  • GUI — provider-gallery logo (lobe-icons mark, vendored verbatim), order slot beside the other resellers, and a "get a key" link using Vercel's own documented dashboard deep-link
  • README — joins the provider enumeration
  • tests — reseller lockstep, prefix routing for slash-carrying ids (vercel:zai/glm-5.2), and matrix capability answers for creator/model-shaped ids

Design notes

  • Vision entries omit pdf= on purpose: the gateway's catalog advertises pdf input, but its compat file-part schema (file.data + media_type) differs from the OpenAI shape this client emits (file_data data-URL), and it is unverified here — so PDFs keep the graceful local pdf_support fallback, the same posture as every existing vision-capable compat entry.
  • Context windows are per-route: the gateway's catalog values differ from other resellers' caps for the same weights (GLM-5.2: 1M here vs 128k via Together); the matrix records what each route actually serves.
  • Uncurated ids typed by hand (vercel:creator/model) route correctly and fall back to conservative capabilities, like every provider's custom ids.
  • No provider-code changes: the request path is the same OpenAIProvider every compat vendor already uses.

Verification

  • Live GET /v1/models catalog pulled 2026-08-05; every curated id, context window, and vision flag checked against it
  • Test-first: with only the test changes applied, the suite fails 3 (descriptor, suggestions, lockstep); with the feature: 1112 passed, 1 skipped; GUI tsc --noEmit clean
  • Routing traced end-to-end for slash-carrying ids (_provider_name/_bare split once on :; the GUI prefixed(), unconfigured-provider preview, and set_provider auto-add all attach the prefix). /v1/providers boot-checked in-process: vercel serializes with its own key slot and prefilled endpoint, ordered with the resellers
  • The gallery mark render-checked against the sibling reseller logos on the light chip plate
  • Live-verified with a real key (2026-08-05), through this descriptor's own build() path: non-stream and streaming completions plus a tool call on anthropic/claude-haiku-4.5 (finish tool_calls), and a second creator (zai/glm-5.2) — all returned correct results with usage counts. Key-verify can't false-positive — /v1/models is public but any wrong bearer returns 401

🤖 Generated with Claude Code

@mundabra
mundabra force-pushed the add-vercel-ai-gateway-provider branch from c7d1685 to 977b5f6 Compare August 5, 2026 05:15
One key, 300+ models across every major creator, through the gateway's
OpenAI-compatible endpoint (https://ai-gateway.vercel.sh/v1). Filed as a
reseller alongside Together/Fireworks/OpenRouter: a compat descriptor with
the vercel: routing prefix, six curated matrix entries (agent-capable,
cost-efficient tiers — ids, context windows and vision from the live
/v1/models catalog, 2026-08-05), provider-gallery logo + key link, a README
mention, and coverage in the reseller lockstep, routing, and capability
tests.

Vision entries use a new shared _AGENTIC_VISION_COMPAT (no pdf=): the
gateway's catalog advertises pdf input, but its compat file-part shape is
unverified here, so PDFs stay on the pdf_support fallback like every other
compat route.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mundabra
mundabra force-pushed the add-vercel-ai-gateway-provider branch from 977b5f6 to 69cba76 Compare August 5, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant