diff --git a/packages/core/test/cerebras.test.ts b/packages/core/test/cerebras.test.ts new file mode 100644 index 000000000..2caf7baf3 --- /dev/null +++ b/packages/core/test/cerebras.test.ts @@ -0,0 +1,58 @@ +import { expect, test } from "bun:test"; +import path from "node:path"; + +import { generate } from "../src/index.js"; + +test("Cerebras generated model matrix matches the current catalog", async () => { + const root = path.join(import.meta.dirname, "..", "..", ".."); + const models = (await generate(path.join(root, "providers"))).cerebras?.models; + + expect(Object.keys(models ?? {}).sort()).toEqual(["gpt-oss-120b", "zai-glm-4.7"]); + expect(models).toEqual({ + "gpt-oss-120b": { + id: "gpt-oss-120b", + name: "GPT OSS 120B", + family: "gpt-oss", + release_date: "2025-08-05", + last_updated: "2026-06-10", + attachment: false, + reasoning: true, + reasoning_options: [{ type: "effort", values: ["low", "medium", "high"] }], + temperature: true, + tool_call: true, + open_weights: true, + structured_output: true, + cost: { input: 0.35, output: 0.75 }, + limit: { context: 131_072, output: 40_960 }, + modalities: { input: ["text"], output: ["text"] }, + }, + "zai-glm-4.7": { + id: "zai-glm-4.7", + name: "Z.AI GLM-4.7", + release_date: "2026-01-07", + last_updated: "2026-06-10", + attachment: false, + reasoning: true, + reasoning_options: [{ type: "effort", values: ["none"] }], + temperature: true, + tool_call: true, + open_weights: true, + structured_output: true, + status: "beta", + cost: { input: 2.25, output: 2.75, cache_read: 0, cache_write: 0 }, + limit: { context: 131_072, output: 40_960 }, + modalities: { input: ["text"], output: ["text"] }, + }, + }); + + expect( + Object.entries(models ?? {}) + .filter(([, model]) => !model.reasoning && model.reasoning_options !== undefined) + .map(([id]) => id), + ).toEqual([]); + expect(models?.["llama3.1-8b"]).toBeUndefined(); + for (const model of Object.values(models ?? {})) { + expect(model).not.toHaveProperty("base_model"); + expect(model).not.toHaveProperty("base_model_omit"); + } +}); diff --git a/providers/cerebras/models/gpt-oss-120b.toml b/providers/cerebras/models/gpt-oss-120b.toml index eaddb034c..0712c5640 100644 --- a/providers/cerebras/models/gpt-oss-120b.toml +++ b/providers/cerebras/models/gpt-oss-120b.toml @@ -1,20 +1,22 @@ name = "GPT OSS 120B" family = "gpt-oss" release_date = "2025-08-05" -last_updated = "2025-08-05" +last_updated = "2026-06-10" attachment = false reasoning = true +reasoning_options = [{ type = "effort", values = ["low", "medium", "high"] }] temperature = true tool_call = true open_weights = true +structured_output = true [cost] -input = 0.25 -output = 0.69 +input = 0.35 +output = 0.75 [limit] context = 131_072 -output = 32_768 +output = 40_960 [modalities] input = ["text"] diff --git a/providers/cerebras/models/llama3.1-8b.toml b/providers/cerebras/models/llama3.1-8b.toml deleted file mode 100644 index f4ebc2ecb..000000000 --- a/providers/cerebras/models/llama3.1-8b.toml +++ /dev/null @@ -1,23 +0,0 @@ -name = "Llama 3.1 8B" -family = "llama" -release_date = "2025-01-01" -last_updated = "2026-05-27" -attachment = false -reasoning = false -temperature = true -knowledge = "2023-12" -tool_call = true -open_weights = true -status = "deprecated" - -[cost] -input = 0.10 -output = 0.10 - -[limit] -context = 32_000 -output = 8000 - -[modalities] -input = ["text"] -output = ["text"] diff --git a/providers/cerebras/models/zai-glm-4.7.toml b/providers/cerebras/models/zai-glm-4.7.toml index de96f996a..624827c9c 100644 --- a/providers/cerebras/models/zai-glm-4.7.toml +++ b/providers/cerebras/models/zai-glm-4.7.toml @@ -1,11 +1,14 @@ name = "Z.AI GLM-4.7" -release_date = "2026-01-10" -last_updated = "2026-01-10" +release_date = "2026-01-07" +last_updated = "2026-06-10" attachment = false -reasoning = false +reasoning = true +reasoning_options = [{ type = "effort", values = ["none"] }] temperature = true tool_call = true open_weights = true +structured_output = true +status = "beta" [cost] input = 2.25 @@ -15,7 +18,7 @@ cache_write = 0 [limit] context = 131_072 -output = 40_000 +output = 40_960 [modalities] input = ["text"]