Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions content/docs/ai-gateway/anthropic-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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`
Expand Down Expand Up @@ -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`.

<Admonition type="important">
`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.
</Admonition>
Expand Down
4 changes: 2 additions & 2 deletions content/docs/ai-gateway/chat-completions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
3 changes: 2 additions & 1 deletion content/docs/ai-gateway/gemini.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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` | |
Expand Down
4 changes: 2 additions & 2 deletions content/docs/ai-gateway/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down Expand Up @@ -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:

Expand Down
72 changes: 72 additions & 0 deletions src/app/models.json/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2418,6 +2418,78 @@
"output": 0,
"cache_read": 0
}
},
"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,
"cache_read": 0
}
}
}
}
Expand Down
29 changes: 29 additions & 0 deletions src/app/models/capabilities.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
}
Loading