Skip to content

feat: add gemini-4-carbon and claude-fable-5-2 to the AI Gateway /models page - #6800

Merged
andrelandgraf merged 2 commits into
mainfrom
models/gemini-4-carbon-claude-fable-5-2
Nov 18, 2026
Merged

andrelandgraf merged 2 commits into
mainfrom
models/gemini-4-carbon-claude-fable-5-2

Conversation

@andrelandgraf

@andrelandgraf andrelandgraf commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Problem

The AI Gateway serves gemini-4-carbon and claude-fable-5-2, and the build refresh already publishes both on /models.json. /models reads src/app/models/capabilities.json, which has no entry for either, so /models omits them and their docs pages say "Code examples are not currently available for this model."

The "Content shape varies by model" list in content/docs/ai-gateway/models.md already names both models. content-shape-docs.test.js only checks ids that are in capabilities.json, so it skips them today.

Change

Two capabilities.json entries, copied from a probe:conformance run in neondatabase/neon-console-code-examples against a production gateway branch on 2026-11-18T00:05:54Z:

{
  "id": "gemini-4-carbon",
  "owner": "google",
  "entitled": true,
  "chat": "array-content",
  "deviations": [
    "`id` is null; the spec requires a string",
    "`content` is an array[1] of {text} with keys {text, thoughtSignature, type}; the spec requires a string",
    "`usage.total_tokens` is 441, but prompt + completion is 267",
    "`usage.reasoning_tokens` is top-level; the spec nests it under `completion_tokens_details`"
  ],
  "nativeDialect": "gemini",
  "responses": false,
  "webSearch": false,
  "imageGeneration": false
},
{
  "id": "claude-fable-5-2",
  "owner": "anthropic",
  "entitled": true,
  "chat": "array-content",
  "deviations": [
    "`content` is an array[2] of {reasoning, text} with keys {summary, text, type}; the spec requires a string"
  ],
  "nativeDialect": "anthropic",
  "responses": false,
  "webSearch": false,
  "imageGeneration": false
}

What the probe measured:

gemini-4-carbon claude-fable-5-2
message.content, trivial prompt array of {type, text, thoughtSignature} array of {type: reasoning, summary}, {type: text, text}
message.content, reasoning prompt same array same array
Streamed delta.content strings arrays and strings
/anthropic/v1/messages 400 200
/gemini/v1beta/models/{id}:generateContent 200 400
/openai/v1/responses 400 (not available on the openai_responses endpoint) 400
Tool calls on chat completions yes yes
Image input (64×64 PNG) yes yes

array-content with a native dialect gives each model the same examples as gemini-4-argon and claude-fable-5-1. GET /models?model=<id> now returns:

{"chat":"array-content","native":"gemini","examples":[{"id":"ai-sdk","endpoint":"/v1/chat/completions (via provider)"},{"id":"mastra","endpoint":"/v1/chat/completions"},{"id":"curl","endpoint":"/gemini/v1beta/models/gemini-4-carbon:generateContent"}]}
{"chat":"array-content","native":"anthropic","examples":[{"id":"ai-sdk","endpoint":"/v1/chat/completions (via provider)"},{"id":"mastra","endpoint":"/v1/chat/completions"},{"id":"curl","endpoint":"/anthropic/v1/messages"}]}

The OpenAI SDK examples are left out, as for every array-content model.

src/app/models.json/data.json gets the two entries scripts/update-models-from-ai-gateway.mjs produces for them, because check-models-endpoint-sync.js requires every capabilities.json id to be in the committed catalog. They match what neon.com/models.json serves now. No other committed entry changes.

Before (neon.com) After (this branch)
Before: gemini-4-carbon After: gemini-4-carbon
Before: claude-fable-5-2 After: claude-fable-5-2

Also in here

The hand-written per-model docs get the two models, from live calls on the same gateway branch:

  • gemini.md lists gemini-4-carbon. Like gemini-4-argon, it accepts generationConfig.temperature and thinkingConfig.thinkingLevel (low, medium, high; 0, 243, and 608 thought tokens on the same prompt) on the Gemini endpoint.
  • chat-completions.md adds gemini-4-carbon to the note that temperature and reasoning_effort return 400 on chat completions. Both did: Model gemini-4-carbon does not support the temperature parameter and Unknown name "reasoning_effort" at 'generation_config'.
  • anthropic-messages.md lists claude-fable-5-2 and adds it to the models that reject thinking.type: "enabled" and "disabled" (both returned 400 with the adaptive-thinking message). thinking: { type: 'adaptive' } with output_config.effort low through max returned 200, with output tokens rising from 101 to 411 on the same prompt.
  • models.md: the Claude bullet in "Content shape varies by model" said these models "return a string for a trivial prompt". claude-fable-5-2 and claude-opus-5-5 returned an array for the trivial prompt in this probe; only claude-haiku-5-5 returned a string. The sentence now says they return an array whenever they reason and that a trivial prompt can be one of those times.

Verification

  • node src/scripts/check-models-endpoint-sync.js: 65 models in sync on 15 shared fields.
  • node scripts/verify-agent-endpoints.mjs: 13 of 13 endpoints, 68 of 68 checks.
  • vitest run src/app/models scripts/lib/models-catalog.test.js: 94 tests pass. With gemini-4-carbon removed from the models.md list, content-shape-docs.test.js fails on it, so the test now covers both models.
  • npm run check:docs-api-consistency: no broken references.
  • Local dev server: both docs pages render the AI SDK example, and the Command picker offers AI SDK, Mastra, and cURL.
  • The cURL snippet /models serves for each model, run as served against a production gateway branch: HTTP 200 from /gemini/v1beta/models/gemini-4-carbon:generateContent and from /anthropic/v1/messages with claude-fable-5-2.

For your attention

  • gemini-4-carbon is published with cost input: 0, output: 0, cache_read: 0. That value comes from the gateway listing, which the build refresh owns; this PR does not change it.
  • GET /v1/models lists reasoning_effort among the supported parameters for gemini-4-carbon and advertises effort low, medium, high, but chat completions rejects reasoning_effort for it (and for gemini-4-argon). The effort values work on the Gemini endpoint as thinkingLevel. The docs already say so for gemini-4-argon; the listing is unchanged here.
  • The committed fallback still lists kimi-k3-1-pro at cost 0/0/0, while neon.com/models.json serves 2/10/0.2. The fallback only ships when the build refresh fails; refreshing it is left out of this PR.
  • @neon/ai-sdk-provider NEON_MODELS_DEV_IDS and the models.dev neon provider do not list either model yet.

@vercel

vercel Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
neon-next Ready Ready Preview Nov 18, 2026 12:28am UTC

Request Review

@andrelandgraf
andrelandgraf merged commit ba6241e into main Nov 18, 2026
5 checks passed
@andrelandgraf
andrelandgraf deleted the models/gemini-4-carbon-claude-fable-5-2 branch November 18, 2026 03:40

This branch was successfully deployed

1 active deployment
Preview – neon-next — bd5b732a Deployed Nov 18, 2026 by vercel[bot]
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