From 0785cd2e55ca48c83fac5828e799da7a21798e66 Mon Sep 17 00:00:00 2001 From: backryun Date: Tue, 7 Jul 2026 04:16:27 +0900 Subject: [PATCH] feat(cerebras): add Gemma 4 31B model (#6331) Add Cerebras Gemma 4 31B model + pricing + catalog test. Integrated into release/v3.8.46. --- CHANGELOG.md | 1 + open-sse/config/providers/registry/cerebras/index.ts | 1 + src/shared/constants/pricing/inference-hosts.ts | 1 + tests/unit/t28-model-catalog-updates.test.ts | 4 ++++ 4 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aa0a64b3a..c164b1879c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### ✨ New Features +- **feat(cerebras):** add the **Gemma 4 31B** model (`gemma-4-31b`) to the Cerebras registry + pricing table. Regression guard extends `tests/unit/t28-model-catalog-updates.test.ts`. (thanks @backryun) - **feat(providers):** add **Yuanbao (web)** as a cookie-session provider ([#6196](https://github.com/diegosouzapw/OmniRoute/issues/6196)) — `yuanbao-web` (Tencent Yuanbao, `yuanbao.tencent.com`) with cookie-only auth (`hy_user`/`hy_token` + public agent id), SSE→OpenAI translation incl. `reasoning_content`, exposing DeepSeek V3/R1 + Hunyuan / Hunyuan-T1. Regression guard: `tests/unit/providers-yuanbao-web.test.ts`. `together-web` was **deferred** (no verifiable web-session endpoint — needs a captured request) and `huggingchat-web` **dropped** (the existing `huggingchat` already is a web-cookie provider). (thanks @chirag127) - **feat(providers):** route the built-in **agentrouter** through the dynamic Claude-Code wire image ([#6056](https://github.com/diegosouzapw/OmniRoute/issues/6056)) — a small static allow-set (`CC_WIRE_IMAGE_BUILTINS` in `open-sse/services/ccWireImageBuiltins.ts`), consulted by `isClaudeCodeCompatible` / `isClaudeCodeCompatibleProvider` / `applyFingerprint`, makes agentrouter adopt the CC wire-image headers + fingerprint **while guarding the CC baseUrl/auth branches** so it keeps its own registry `baseUrl` and `x-api-key` auth. Regression guard: `tests/unit/agentrouter-cc-wire-image.test.ts` (asserts the wire image is applied AND agentrouter's baseUrl/auth are preserved). Live WAF-acceptance against agentrouter.org is a VPS validation follow-up (Hard Rule #18). - **feat(providers):** **bulk-add API keys for Cloudflare Workers AI** ([#6174](https://github.com/diegosouzapw/OmniRoute/issues/6174)) — `cloudflare-ai` is removed from the bulk-add exclusion list and the bulk parser gains a 3-field `name|accountId|apiKey` mode; the bulk route now builds a **per-entry** `providerSpecificData` so each key carries its own `accountId` (fixing the previous shared-object reuse), and both the create + key-validation paths receive it. Regression guard: `tests/unit/bulk-api-key-parser-cloudflare.test.ts`. (thanks @muflifadla38) diff --git a/open-sse/config/providers/registry/cerebras/index.ts b/open-sse/config/providers/registry/cerebras/index.ts index d9ea106b90..01c337f691 100644 --- a/open-sse/config/providers/registry/cerebras/index.ts +++ b/open-sse/config/providers/registry/cerebras/index.ts @@ -10,6 +10,7 @@ export const cerebrasProvider: RegistryEntry = { authHeader: "bearer", models: [ { id: "zai-glm-4.7", name: "GLM 4.7" }, + { id: "gemma-4-31b", name: "Gemma 4 31B" }, { id: "gpt-oss-120b", name: "GPT OSS 120B" }, ], }; diff --git a/src/shared/constants/pricing/inference-hosts.ts b/src/shared/constants/pricing/inference-hosts.ts index d3c4c14b5f..d076d1d2ac 100644 --- a/src/shared/constants/pricing/inference-hosts.ts +++ b/src/shared/constants/pricing/inference-hosts.ts @@ -61,6 +61,7 @@ export const DEFAULT_PRICING_INFERENCE = { }, cerebras: { "gpt-oss-120b": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 }, + "gemma-4-31b": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 }, "zai-glm-4.7": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 }, "llama-3.3-70b": { input: 0, output: 0, cached: 0, reasoning: 0, cache_creation: 0 }, "llama-4-scout-17b-16e-instruct": { diff --git a/tests/unit/t28-model-catalog-updates.test.ts b/tests/unit/t28-model-catalog-updates.test.ts index 6fd9edc69f..355c00d799 100644 --- a/tests/unit/t28-model-catalog-updates.test.ts +++ b/tests/unit/t28-model-catalog-updates.test.ts @@ -82,6 +82,10 @@ test("T28: volcengine (Ark) catalog includes DeepSeek V4 models", () => { }); test("T28: new catalog models resolve through getModelInfoCore", async () => { + const cerebrasGemma = await getModelInfoCore("cerebras/gemma-4-31b", {}); + assert.equal(cerebrasGemma.provider, "cerebras"); + assert.equal(cerebrasGemma.model, "gemma-4-31b"); + const minimax = await getModelInfoCore("minimax/MiniMax-M2.7", {}); assert.equal(minimax.provider, "minimax"); assert.equal(minimax.model, "MiniMax-M2.7");