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

推荐订阅源

WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
阮一峰的网络日志
阮一峰的网络日志
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
MyScale Blog
MyScale Blog
雷峰网
雷峰网
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 三生石上(FineUI控件)
云风的 BLOG
云风的 BLOG
V
V2EX
宝玉的分享
宝玉的分享
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
Vercel News
Vercel News
美团技术团队
人人都是产品经理
人人都是产品经理
The Cloudflare Blog

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(openai-completions): skip non-JSON thinkingSignature ...
hclsys · 2026-05-17 · via Recent Commits to openclaw:main

@@ -840,7 +840,16 @@ function convertResponsesMessages(

840840

msg.model !== model.id && msg.provider === model.provider && msg.api === model.api;

841841

for (const block of msg.content) {

842842

if (block.type === "thinking") {

843-

if (shouldReplayReasoningItems && block.thinkingSignature) {

843+

if (

844+

shouldReplayReasoningItems &&

845+

block.thinkingSignature &&

846+

block.thinkingSignature.startsWith("{")

847+

) {

848+

// openai-completions plain-text reasoning paths persist a

849+

// provenance tag (e.g. "reasoning", "reasoning_details", "content")

850+

// as thinkingSignature rather than a JSON-encoded reasoning item.

851+

// Replaying those values would corrupt the next request payload

852+

// (OpenRouter returns HTTP 500), so skip non-JSON signatures.

844853

const reasoningItem = JSON.parse(

845854

block.thinkingSignature,

846855

) as ReplayableResponseReasoningItem;

@@ -2878,6 +2887,14 @@ function shouldPreserveReasoningContentReplay(

28782887

);

28792888

}

288028892890+

function shouldPreserveOpenRouterReasoningReplay(model: OpenAIModeModel): boolean {

2891+

if (model.provider !== "openrouter") {

2892+

return true;

2893+

}

2894+

const normalizedModelId = model.id.trim().toLowerCase();

2895+

return !(normalizedModelId.startsWith("anthropic/") || normalizedModelId.startsWith("x-ai/"));

2896+

}

2897+28812898

// OpenAI Chat Completions assistant-message input does not define reasoning

28822899

// replay fields, while OpenRouter and DeepSeek-style providers document

28832900

// compatible pass-back contracts. Keep valid provider-owned replay fields, but

@@ -2923,7 +2940,8 @@ export function buildOpenAICompletionsParams(

29232940

let messages = convertMessages(model as never, completionsContext, compat as never);

29242941

injectToolCallThoughtSignatures(messages as unknown[], context, model);

29252942

sanitizeCompletionsReasoningReplayFields(messages, {

2926-

preserveOpenRouterReasoning: compat.thinkingFormat === "openrouter",

2943+

preserveOpenRouterReasoning:

2944+

compat.thinkingFormat === "openrouter" && shouldPreserveOpenRouterReasoningReplay(model),

29272945

preserveReasoningContent: shouldPreserveReasoningContentReplay(model, compat),

29282946

});

29292947

if (compat.strictMessageKeys) {