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
35 changes: 34 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,31 @@ output = ["text"] # Supported output modalities
field = "reasoning_content" # Name of the interleaved field "reasoning_content" or "reasoning_details"
```

#### 3a. Reuse an Existing Model with `extends`

For wrapper providers that mirror a model from another provider, prefer reusing the canonical model definition instead of duplicating the whole file.

Use `extends` only for non-first-party wrappers and mirrors. Do not use it inside the actual lab provider directories that act as the canonical source for a model family, for example `providers/anthropic/`, `providers/openai/`, `providers/google/`, `providers/xai/`, `providers/minimax/`, or `providers/moonshot/`.

```toml
[extends]
from = "anthropic/claude-opus-4-6"
omit = ["experimental.modes.fast"]

[provider]
npm = "@ai-sdk/anthropic"
```

Rules:

- `from` must point to another model using `<provider>/<model-id>`.
- `omit` is optional and removes fields after the inherited model and local overrides are merged.
- You can override any top-level model field locally.
- If you override a nested table like `[cost]`, `[limit]`, or `[modalities]`, include the full values needed for that table.
- `id` still comes from the filename; do not add it to the TOML.

Use `extends` when the wrapper model is materially the same as the source model and only differs by a small set of overrides or omitted fields.

#### 4. Submit a Pull Request

1. Fork this repo
Expand All @@ -136,9 +161,17 @@ There's a GitHub Action that will automatically validate your submission against
- Values are within acceptable ranges
- TOML syntax is valid

When converting existing wrapper models to `extends`, compare generated output before and after the change:

```bash
bun run compare:migrations
```

This prints a diff for each changed model TOML so you can confirm the generated JSON only changed where you intended.

### Schema Reference

Models must conform to the following schema, as defined in `app/schemas.ts`.
Models must conform to the following schema, as defined in `packages/core/src/schema.ts`.

**Provider Schema:**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
name = "Claude Sonnet 3.5"
family = "claude-sonnet"
release_date = "2024-06-20"
last_updated = "2024-06-20"
attachment = true
reasoning = false
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 200_000
output = 8_192

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-3-5-sonnet-20240620"
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
name = "Claude Opus 4.1"
family = "claude-opus"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-03-31"
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50
cache_write = 18.75

[limit]
context = 200_000
output = 32_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-opus-4-1-20250805"
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
name = "Claude Opus 4"
family = "claude-opus"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50
cache_write = 18.75

[limit]
context = 200_000
output = 32_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-opus-4-20250514"
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
name = "Claude Sonnet 4"
family = "claude-sonnet"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-20250514"
26 changes: 2 additions & 24 deletions providers/amazon-bedrock/models/anthropic.claude-sonnet-4-6.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,2 @@
name = "Claude Sonnet 4.6"
family = "claude-sonnet"
release_date = "2026-02-17"
last_updated = "2026-03-18"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-08-31"
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 1_000_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-6"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Sonnet 4 (EU)"
family = "claude-sonnet"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-20250514"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Sonnet 4.6 (EU)"
family = "claude-sonnet"
release_date = "2026-02-17"
last_updated = "2026-03-18"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-08-31"
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 1_000_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-6"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Sonnet 4 (Global)"
family = "claude-sonnet"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-20250514"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Sonnet 4.6 (Global)"
family = "claude-sonnet"
release_date = "2026-02-17"
last_updated = "2026-03-18"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-08-31"
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 1_000_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-6"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Opus 4.1 (US)"
family = "claude-opus"
release_date = "2025-08-05"
last_updated = "2025-08-05"
attachment = true
reasoning = true
temperature = true
tool_call = true
knowledge = "2025-03-31"
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50
cache_write = 18.75

[limit]
context = 200_000
output = 32_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-opus-4-1-20250805"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Opus 4 (US)"
family = "claude-opus"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 15.00
output = 75.00
cache_read = 1.50
cache_write = 18.75

[limit]
context = 200_000
output = 32_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-opus-4-20250514"
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
name = "Claude Sonnet 4 (US)"
family = "claude-sonnet"
release_date = "2025-05-22"
last_updated = "2025-05-22"
attachment = true
reasoning = true
temperature = true
knowledge = "2024-04"
tool_call = true
open_weights = false

[cost]
input = 3.00
output = 15.00
cache_read = 0.30
cache_write = 3.75

[limit]
context = 200_000
output = 64_000

[modalities]
input = ["text", "image", "pdf"]
output = ["text"]
[extends]
from = "anthropic/claude-sonnet-4-20250514"
Loading
Loading