惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
博客园_首页
H
Help Net Security
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
The Cloudflare Blog
腾讯CDC
Jina AI
Jina AI
Last Week in AI
Last Week in AI
月光博客
月光博客
博客园 - 叶小钗
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
Y
Y Combinator Blog
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
爱范儿
爱范儿
N
Netflix TechBlog - Medium
F
Fortinet All Blogs

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(providers): require runnable ClawRouter Gemini routes...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -67,12 +67,18 @@ const CATALOG = {

6767

requestFormat: "google.generate_content",

6868

responseFormat: "google.generate_content",

6969

},

70+

{

71+

path: "/v1beta/models/${model}:streamGenerateContent",

72+

methods: ["POST"],

73+

requestFormat: "google.generate_content",

74+

responseFormat: "google.generate_content",

75+

},

7076

],

7177

models: [

7278

{

7379

id: "google/gemini-default",

7480

upstream: "gemini",

75-

capabilities: ["llm.generate"],

81+

capabilities: ["llm.generate", "llm.stream"],

7682

},

7783

],

7884

},

@@ -200,6 +206,23 @@ describe("clawrouter provider catalog", () => {

200206

expect((headers as Headers).get("authorization")).toBe("Bearer clawrouter-test-key");

201207

});

202208
209+

it("does not advertise Gemini models without an explicit streaming route", async () => {

210+

const generateOnlyCatalog = structuredClone(CATALOG);

211+

generateOnlyCatalog.providers[2].routes = generateOnlyCatalog.providers[2].routes.filter(

212+

(route) => !route.path.includes(":streamGenerateContent"),

213+

);

214+

generateOnlyCatalog.providers[2].models[0].capabilities = ["llm.generate"];

215+

const { fetchGuard } = buildFetchGuard(generateOnlyCatalog);

216+
217+

const provider = await buildClawRouterProviderConfig({

218+

apiKey: "clawrouter-test-key",

219+

baseUrl: "https://clawrouter.example",

220+

fetchGuard,

221+

});

222+
223+

expect(provider.models.map((model) => model.id)).not.toContain("google/gemini-default");

224+

});

225+
203226

it("keeps credential-scoped route metadata isolated on each catalog result", async () => {

204227

const firstCatalog = structuredClone(CATALOG);

205228

firstCatalog.providers[1].models[0].upstream = "first-upstream";

Original file line numberDiff line numberDiff line change

@@ -185,8 +185,13 @@ function buildRoutedModel(

185185

upstreamModel = model.upstream;

186186

} else {

187187

const googleRoute =

188-

supportsCapability(model, "llm.generate", "llm.stream") &&

189-

findNativeRoute(provider, "google.generate_content");

188+

supportsCapability(model, "llm.stream") &&

189+

provider.routes.find(

190+

(route) =>

191+

route.methods.includes("POST") &&

192+

route.requestFormat === "google.generate_content" &&

193+

route.path.includes(":streamGenerateContent"),

194+

);

190195

const googleBaseUrl = googleRoute

191196

? googleNativeBaseUrl(rootUrl, provider, googleRoute)

192197

: undefined;