diff --git a/packages/core/src/schema.ts b/packages/core/src/schema.ts index 55b118451..5185c9481 100644 --- a/packages/core/src/schema.ts +++ b/packages/core/src/schema.ts @@ -2,6 +2,19 @@ import { z } from "zod"; import { ModelFamily } from "./family"; +const BodyValue: z.ZodType< + string | number | boolean | null | Array | Record +> = z.lazy(() => + z.union([ + z.string(), + z.number(), + z.boolean(), + z.null(), + z.array(BodyValue), + z.record(BodyValue), + ]), +); + const Cost = z.object({ input: z.number().min(0, "Input price cannot be negative"), output: z.number().min(0, "Output price cannot be negative"), @@ -74,6 +87,7 @@ export const Model = z npm: z.string().optional(), api: z.string().optional(), shape: z.enum(["responses", "completions"]).optional(), + body: z.record(BodyValue).optional(), }) .optional(), }) diff --git a/providers/anthropic/models/claude-opus-4-6-fast.toml b/providers/anthropic/models/claude-opus-4-6-fast.toml new file mode 100644 index 000000000..a758629c6 --- /dev/null +++ b/providers/anthropic/models/claude-opus-4-6-fast.toml @@ -0,0 +1,28 @@ +name = "Claude Opus 4.6 Fast" +family = "claude-opus" +release_date = "2026-02-05" +last_updated = "2026-03-16" +attachment = true +reasoning = true +temperature = true +tool_call = true +knowledge = "2025-05" +open_weights = false +status = "beta" + +[cost] +input = 30.00 +output = 150.00 +cache_read = 3.00 +cache_write = 37.50 + +[limit] +context = 1_000_000 +output = 128_000 + +[modalities] +input = ["text", "image", "pdf"] +output = ["text"] + +[provider.body] +speed = "fast" diff --git a/providers/openai/models/gpt-5.4-fast.toml b/providers/openai/models/gpt-5.4-fast.toml new file mode 100644 index 000000000..a9ff18a4f --- /dev/null +++ b/providers/openai/models/gpt-5.4-fast.toml @@ -0,0 +1,28 @@ +name = "GPT-5.4 Fast" +family = "gpt" +release_date = "2026-03-05" +last_updated = "2026-03-16" +attachment = true +reasoning = true +temperature = false +knowledge = "2025-08-31" +tool_call = true +structured_output = true +open_weights = false + +[cost] +input = 5.00 +output = 30.00 +cache_read = 0.50 + +[limit] +context = 1_050_000 +input = 922_000 +output = 128_000 + +[modalities] +input = ["text", "image", "pdf"] +output = ["text"] + +[provider.body] +service_tier = "priority" diff --git a/providers/opencode/models/claude-opus-4-6-fast.toml b/providers/opencode/models/claude-opus-4-6-fast.toml new file mode 100644 index 000000000..201603515 --- /dev/null +++ b/providers/opencode/models/claude-opus-4-6-fast.toml @@ -0,0 +1,31 @@ +name = "Claude Opus 4.6 Fast" +family = "claude-opus" +release_date = "2026-02-05" +last_updated = "2026-03-16" +attachment = true +reasoning = true +temperature = true +tool_call = true +knowledge = "2025-08-31" +open_weights = false +status = "beta" + +[cost] +input = 30.00 +output = 150.00 +cache_read = 3.00 +cache_write = 37.50 + +[limit] +context = 1_000_000 +output = 128_000 + +[modalities] +input = ["text", "image", "pdf"] +output = ["text"] + +[provider] +npm = "@ai-sdk/anthropic" + +[provider.body] +speed = "fast" diff --git a/providers/opencode/models/gpt-5.4-fast.toml b/providers/opencode/models/gpt-5.4-fast.toml new file mode 100644 index 000000000..f5b9ea7b3 --- /dev/null +++ b/providers/opencode/models/gpt-5.4-fast.toml @@ -0,0 +1,31 @@ +name = "GPT-5.4 Fast" +family = "gpt" +release_date = "2026-03-05" +last_updated = "2026-03-16" +attachment = true +reasoning = true +temperature = false +knowledge = "2025-08-31" +tool_call = true +structured_output = true +open_weights = false + +[cost] +input = 5.00 +output = 30.00 +cache_read = 0.50 + +[limit] +context = 1_050_000 +input = 922_000 +output = 128_000 + +[modalities] +input = ["text", "image", "pdf"] +output = ["text"] + +[provider] +npm = "@ai-sdk/openai" + +[provider.body] +service_tier = "priority"