From a12a7f8f57a1b374bce53224c34e0ddb2180707d Mon Sep 17 00:00:00 2001 From: Andre Landgraf Date: Tue, 17 Nov 2026 16:17:53 -0800 Subject: [PATCH 1/2] feat: add gemini-4-carbon and claude-fable-5-2 to the AI Gateway /models page --- content/docs/ai-gateway/anthropic-messages.md | 8 +-- content/docs/ai-gateway/chat-completions.md | 4 +- content/docs/ai-gateway/gemini.md | 3 +- content/docs/ai-gateway/models.md | 4 +- src/app/models.json/data.json | 72 +++++++++++++++++++ src/app/models/capabilities.json | 29 ++++++++ 6 files changed, 111 insertions(+), 9 deletions(-) diff --git a/content/docs/ai-gateway/anthropic-messages.md b/content/docs/ai-gateway/anthropic-messages.md index b670ea98e98..23287199528 100644 --- a/content/docs/ai-gateway/anthropic-messages.md +++ b/content/docs/ai-gateway/anthropic-messages.md @@ -6,7 +6,7 @@ summary: >- Gateway by changing only the base URL. Supports streaming, prompt caching, and extended thinking on Claude models. enableTableOfContents: true -updatedOn: '2026-11-10T18:56:17.167Z' +updatedOn: '2026-11-18T00:17:54.883Z' --- The Anthropic Messages endpoint exposes the [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) through Neon AI Gateway. Use it when you need extended thinking or prompt caching, which require the native Anthropic SDK. For standard completions, the [chat completions](/docs/ai-gateway/chat-completions) endpoint works with all Anthropic models and doesn't require the Anthropic SDK. @@ -32,7 +32,7 @@ NEON_AI_GATEWAY_BASE_URL=https://br-winter-pond-aptw82ef-api.ai.c-2.us-east-2.aw This endpoint accepts Anthropic models only. See the [AI Gateway catalog](/docs/ai-gateway/models) for the full list. Supported models: -- `claude-opus-5-5`, `claude-opus-5`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-fable-5`, `claude-fable-5-1` +- `claude-opus-5-5`, `claude-opus-5`, `claude-sonnet-5-5`, `claude-sonnet-5`, `claude-fable-5`, `claude-fable-5-1`, `claude-fable-5-2` - `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-opus-4-5`, `claude-opus-4-1` - `claude-sonnet-4-6`, `claude-sonnet-4-5` - `claude-haiku-5-5`, `claude-haiku-4-5` @@ -151,14 +151,14 @@ print(message.usage) The gateway forwards the `thinking` parameter to Anthropic unchanged. Set `budget_tokens` to control how many tokens Claude can use for thinking. `max_tokens` must be greater than `budget_tokens`. -`claude-opus-5-5`, `claude-opus-5`, `claude-sonnet-5`, `claude-fable-5`, `claude-fable-5-1`, `claude-opus-4-8`, and `claude-opus-4-7` do not accept `thinking.type: "enabled"`. They return `400` with: +`claude-opus-5-5`, `claude-opus-5`, `claude-sonnet-5`, `claude-fable-5`, `claude-fable-5-1`, `claude-fable-5-2`, `claude-opus-4-8`, and `claude-opus-4-7` do not accept `thinking.type: "enabled"`. They return `400` with: ``` "thinking.type.enabled" is not supported for this model. Use "thinking.type.adaptive" and "output_config.effort" to control thinking. ``` -Use `thinking: { type: 'adaptive' }` with `output_config: { effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' }` instead. `claude-opus-5-5`, `claude-fable-5`, and `claude-fable-5-1` also reject `thinking.type: "disabled"` — they always think adaptively. +Use `thinking: { type: 'adaptive' }` with `output_config: { effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' }` instead. `claude-opus-5-5`, `claude-fable-5`, `claude-fable-5-1`, and `claude-fable-5-2` also reject `thinking.type: "disabled"` — they always think adaptively. `claude-opus-4-6`, `claude-opus-4-5`, `claude-opus-4-1`, `claude-sonnet-4-6`, `claude-sonnet-4-5`, and `claude-haiku-4-5` accept the `enabled` + `budget_tokens` form shown below. diff --git a/content/docs/ai-gateway/chat-completions.md b/content/docs/ai-gateway/chat-completions.md index 0ae13881a8d..58598e8b02f 100644 --- a/content/docs/ai-gateway/chat-completions.md +++ b/content/docs/ai-gateway/chat-completions.md @@ -6,7 +6,7 @@ summary: >- Gateway. It is OpenAI Chat Completions-compatible, works with any model in the catalog, and lets you switch providers without changing your SDK code. enableTableOfContents: true -updatedOn: '2026-11-17T23:43:15.556Z' +updatedOn: '2026-11-18T00:17:54.883Z' --- The chat completions endpoint is the recommended way to use Neon AI Gateway. It's fully compatible with the [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat) and works with every model in the [AI Gateway catalog](/docs/ai-gateway/models). Switch models by changing a single field. @@ -162,7 +162,7 @@ For a few Claude and Gemini models, `message.content` comes back as an array of Gemini models don't support `parallel_tool_calls: false`, and a request that sets it returns `400` with `Unknown name "parallel_tool_calls"`. Leave the field out instead. Gemini makes parallel tool calls by default, so your code needs to handle more than one tool call per turn. -`gemini-4-argon` doesn't support `temperature` or `reasoning_effort` on this endpoint, and a request that sets either returns `400`. Leave both out. If you need to control them, call the model through the [Gemini endpoint](/docs/ai-gateway/gemini) instead, where `temperature` and `thinkingConfig.thinkingLevel` both work. +`gemini-4-argon` and `gemini-4-carbon` don't support `temperature` or `reasoning_effort` on this endpoint, and a request that sets either returns `400`. Leave both out. If you need to control them, call the model through the [Gemini endpoint](/docs/ai-gateway/gemini) instead, where `temperature` and `thinkingConfig.thinkingLevel` both work. See [Models](/docs/ai-gateway/models) for the full list. diff --git a/content/docs/ai-gateway/gemini.md b/content/docs/ai-gateway/gemini.md index aafe4672fd4..80b293e0d99 100644 --- a/content/docs/ai-gateway/gemini.md +++ b/content/docs/ai-gateway/gemini.md @@ -6,7 +6,7 @@ summary: >- streamGenerateContent APIs through Neon AI Gateway. Use the google-genai SDK with a custom base URL. enableTableOfContents: true -updatedOn: '2026-11-15T17:20:24.920Z' +updatedOn: '2026-11-18T00:17:54.883Z' --- The Gemini endpoint exposes the [Google Gemini API](https://ai.google.dev/api/generate-content) through Neon AI Gateway. Use it when you're already working with the `google-genai` SDK and want to keep your existing code. For most use cases, the [chat completions](/docs/ai-gateway/chat-completions) endpoint is simpler to set up and works with Gemini models via the OpenAI SDK. @@ -36,6 +36,7 @@ This endpoint accepts Google models only: | Model ID | Notes | | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `gemini-4-carbon` | Supports `temperature` and `thinkingConfig.thinkingLevel` on this endpoint, but not on [chat completions](/docs/ai-gateway/chat-completions#switching-models). | | `gemini-4-argon` | Supports `temperature` and `thinkingConfig.thinkingLevel` on this endpoint, but not on [chat completions](/docs/ai-gateway/chat-completions#switching-models). | | `gemini-3-8-flash` | | | `gemini-3-7-flash` | | diff --git a/content/docs/ai-gateway/models.md b/content/docs/ai-gateway/models.md index 69dd570375e..99daea920d4 100644 --- a/content/docs/ai-gateway/models.md +++ b/content/docs/ai-gateway/models.md @@ -6,7 +6,7 @@ summary: >- models, which endpoint to use, shorter and longer request paths, the /v1/models API, rate limits, pricing, and provider terms. enableTableOfContents: true -updatedOn: '2026-11-17T23:45:15.648Z' +updatedOn: '2026-11-18T00:17:54.883Z' --- This page covers how to call models through Neon AI Gateway and the rules that apply. For the full list of models you can call, see the [model catalog](https://neon.com/ai-gateway#models). @@ -86,7 +86,7 @@ All paths below are appended to your branch's bare AI Gateway host (`NEON_AI_GAT On `/v1/chat/completions`, `message.content` is a plain string for most models. For the models below, the gateway returns an array of typed content blocks instead. This is a known gateway issue that we're fixing. - `gemini-3-7-flash`, `gemini-3-8-flash`, `gemini-4-argon`, and `gemini-4-carbon` return an array on every non-streaming response, even for a trivial prompt. Their streamed `delta.content` values are strings, with `null` on the final chunk. -- `claude-opus-5-5`, `claude-haiku-5-5`, `claude-fable-5-1`, and `claude-fable-5-2` return a string for a trivial prompt and an array once the model reasons. When they reason while streaming, some `delta.content` values are arrays too. A low `max_tokens` value can cut a response off before the `text` block appears, leaving only a `reasoning` block. +- `claude-opus-5-5`, `claude-haiku-5-5`, `claude-fable-5-1`, and `claude-fable-5-2` return an array whenever the model reasons and a string when it doesn't. They decide on their own when to reason, so even a trivial prompt can return an array. When they reason while streaming, some `delta.content` values are arrays too. A low `max_tokens` value can cut a response off before the `text` block appears, leaving only a `reasoning` block. The arrays have these shapes: diff --git a/src/app/models.json/data.json b/src/app/models.json/data.json index 37691bedffd..82623271fcd 100644 --- a/src/app/models.json/data.json +++ b/src/app/models.json/data.json @@ -2413,6 +2413,78 @@ "context": 1048576, "output": 65536 }, + "cost": { + "input": 2, + "output": 10, + "cache_read": 0.2 + } + }, + "claude-fable-5-2": { + "id": "claude-fable-5-2", + "name": "Claude Fable 5.2", + "lab": "anthropic", + "provider": "databricks", + "family": "claude-fable", + "released": true, + "attachment": true, + "reasoning": true, + "reasoning_options": [ + { + "type": "effort", + "values": ["low", "medium", "high", "xhigh", "max"] + } + ], + "tool_call": true, + "temperature": false, + "structured_output": false, + "open_weights": false, + "knowledge": "2026-06", + "release_date": "2026-11-09", + "last_updated": "2026-11-09", + "modalities": { + "input": ["text", "image", "pdf"], + "output": ["text"] + }, + "limit": { + "context": 1000000, + "output": 128000 + }, + "cost": { + "input": 8, + "output": 40, + "cache_read": 0.2, + "cache_write": 10 + } + }, + "gemini-4-carbon": { + "id": "gemini-4-carbon", + "name": "Gemini 4 Carbon", + "lab": "google", + "provider": "databricks", + "family": "gemini", + "released": true, + "attachment": true, + "reasoning": true, + "reasoning_options": [ + { + "type": "effort", + "values": ["low", "medium", "high"] + } + ], + "tool_call": true, + "temperature": false, + "structured_output": true, + "open_weights": false, + "release_date": "2026-11-10", + "last_updated": "2026-11-10", + "modalities": { + "input": ["text", "image", "video", "audio", "pdf"], + "output": ["text"] + }, + "limit": { + "context": 1048576, + "output": 65536 + }, "cost": { "input": 0, "output": 0, diff --git a/src/app/models/capabilities.json b/src/app/models/capabilities.json index 05f809ee266..2744dc1026e 100644 --- a/src/app/models/capabilities.json +++ b/src/app/models/capabilities.json @@ -719,6 +719,35 @@ "responses": false, "webSearch": false, "imageGeneration": false + }, + { + "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 } ] } From bd5b732a1930ceae02cba84fca1277d5411db704 Mon Sep 17 00:00:00 2001 From: Andre Landgraf Date: Tue, 17 Nov 2026 16:26:31 -0800 Subject: [PATCH 2/2] fix: keep the committed kimi-k3-1-pro fallback entry unchanged --- src/app/models.json/data.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/models.json/data.json b/src/app/models.json/data.json index 82623271fcd..db9fd859caa 100644 --- a/src/app/models.json/data.json +++ b/src/app/models.json/data.json @@ -2414,9 +2414,9 @@ "output": 65536 }, "cost": { - "input": 2, - "output": 10, - "cache_read": 0.2 + "input": 0, + "output": 0, + "cache_read": 0 } }, "claude-fable-5-2": {