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

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
云风的 BLOG
云风的 BLOG
WordPress大学
WordPress大学
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
T
Tailwind CSS Blog
I
InfoQ
小众软件
小众软件
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
大猫的无限游戏
大猫的无限游戏
美团技术团队
T
The Blog of Author Tim Ferriss
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
MongoDB | Blog
MongoDB | Blog
V
V2EX
J
Java Code Geeks
有赞技术团队
有赞技术团队
博客园 - 聂微东
B
Blog RSS Feed
博客园 - 司徒正美

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(gemini-transport): validate thought_signature base64 ...
wAngByg · 2026-05-18 · via Recent Commits to openclaw:main

@@ -4610,6 +4610,105 @@ describe("openai transport stream", () => {

46104610

);

46114611

});

461246124613+

it("falls back to skip_thought_signature_validator when a captured same-route Gemini 3 signature is truncated", () => {

4614+

// Compaction-truncated sig: 109 chars, length mod 4 == 1.

4615+

// Same-route assistant tool-call whose captured thoughtSignature is truncated.

4616+

// The guard should fall back to the sentinel instead of dropping the field.

4617+

const params = buildOpenAICompletionsParams(

4618+

geminiModel,

4619+

{

4620+

messages: [

4621+

{

4622+

role: "assistant",

4623+

api: geminiModel.api,

4624+

provider: geminiModel.provider,

4625+

model: geminiModel.id,

4626+

usage: {

4627+

input: 0,

4628+

output: 0,

4629+

cacheRead: 0,

4630+

cacheWrite: 0,

4631+

totalTokens: 0,

4632+

cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },

4633+

},

4634+

stopReason: "toolUse",

4635+

timestamp: 1,

4636+

content: [

4637+

{

4638+

type: "toolCall",

4639+

id: "call_abc",

4640+

name: "echo_value",

4641+

arguments: { value: "repro" },

4642+

thoughtSignature:

4643+

"CmcBjz1rX55U6JcpC2oZVTk40Kx6nVK8LKzbl61rOFztcvSdL7pdIvBEDyJLRqWrPVpdD+rj3GsJ3f9PG6b2Ry2UnK38+dInfGIlJbXHt++EC",

4644+

},

4645+

],

4646+

},

4647+

],

4648+

tools: [],

4649+

} as never,

4650+

undefined,

4651+

) as { messages: Array<Record<string, unknown>> };

4652+4653+

const assistant = params.messages.find((message) => message.role === "assistant") as

4654+

| { tool_calls?: Array<{ extra_content?: { google?: { thought_signature?: string } } }> }

4655+

| undefined;

4656+

expect(assistant?.tool_calls?.[0]?.extra_content?.google?.thought_signature).toBe(

4657+

"skip_thought_signature_validator",

4658+

);

4659+

});

4660+4661+

it("drops the field when the model is not Gemini 3 and the captured same-route signature is truncated", () => {

4662+

// gemini-2.5-pro: requiresGoogleCompatToolCallThoughtSignature returns false,

4663+

// so fallbackSig is undefined and there is no sentinel to fall back to.

4664+

// A truncated same-route sig should cause the field to be dropped entirely.

4665+

const nonGemini3Model = {

4666+

...geminiModel,

4667+

id: "gemini-2.5-pro",

4668+

name: "Gemini 2.5 Pro",

4669+

};

4670+

const params = buildOpenAICompletionsParams(

4671+

nonGemini3Model,

4672+

{

4673+

messages: [

4674+

{

4675+

role: "assistant",

4676+

api: nonGemini3Model.api,

4677+

provider: nonGemini3Model.provider,

4678+

model: nonGemini3Model.id,

4679+

usage: {

4680+

input: 0,

4681+

output: 0,

4682+

cacheRead: 0,

4683+

cacheWrite: 0,

4684+

totalTokens: 0,

4685+

cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 },

4686+

},

4687+

stopReason: "toolUse",

4688+

timestamp: 1,

4689+

content: [

4690+

{

4691+

type: "toolCall",

4692+

id: "call_abc",

4693+

name: "echo_value",

4694+

arguments: { value: "repro" },

4695+

thoughtSignature:

4696+

"CmcBjz1rX55U6JcpC2oZVTk40Kx6nVK8LKzbl61rOFztcvSdL7pdIvBEDyJLRqWrPVpdD+rj3GsJ3f9PG6b2Ry2UnK38+dInfGIlJbXHt++EC",

4697+

},

4698+

],

4699+

},

4700+

],

4701+

tools: [],

4702+

} as never,

4703+

undefined,

4704+

) as { messages: Array<Record<string, unknown>> };

4705+4706+

const assistant = params.messages.find((message) => message.role === "assistant") as

4707+

| { tool_calls?: Array<{ extra_content?: { google?: { thought_signature?: string } } }> }

4708+

| undefined;

4709+

expect(assistant?.tool_calls?.[0]?.extra_content?.google?.thought_signature).toBeUndefined();

4710+

});

4711+46134712

it("does not trust cross-route thought_signature for non-Gemini-3 Google compat models", () => {

46144713

const nonGemini3Model = {

46154714

...geminiModel,