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

推荐订阅源

博客园 - 三生石上(FineUI控件)
Blog — PlanetScale
Blog — PlanetScale
B
Blog
GbyAI
GbyAI
爱范儿
爱范儿
月光博客
月光博客
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
Vercel News
Vercel News
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
腾讯CDC
MyScale Blog
MyScale Blog
V
Visual Studio Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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(deepseek): backfill v4 assistant reasoning replay · o...
steipete · 2026-04-28 · via Recent Commits to openclaw:main

@@ -309,6 +309,73 @@ describe("deepseek provider plugin", () => {

309309

});

310310

});

311311312+

it("adds blank reasoning_content for replayed plain assistant messages", async () => {

313+

let capturedPayload: Record<string, unknown> | undefined;

314+

const model = {

315+

provider: "deepseek",

316+

id: "deepseek-v4-pro",

317+

name: "DeepSeek V4 Pro",

318+

api: "openai-completions",

319+

baseUrl: "https://api.deepseek.com",

320+

reasoning: true,

321+

input: ["text"],

322+

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

323+

contextWindow: 1_000_000,

324+

maxTokens: 384_000,

325+

compat: {

326+

supportsUsageInStreaming: true,

327+

supportsReasoningEffort: true,

328+

maxTokensField: "max_tokens",

329+

},

330+

} as Model<"openai-completions">;

331+

const context = {

332+

messages: [

333+

{ role: "user", content: "hi", timestamp: 1 },

334+

{

335+

role: "assistant",

336+

api: "openai-completions",

337+

provider: "openai",

338+

model: "gpt-5.4",

339+

content: [{ type: "text", text: "Hello." }],

340+

usage: {

341+

input: 0,

342+

output: 0,

343+

cacheRead: 0,

344+

cacheWrite: 0,

345+

totalTokens: 0,

346+

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

347+

},

348+

stopReason: "stop",

349+

timestamp: 2,

350+

},

351+

{ role: "user", content: "next", timestamp: 3 },

352+

],

353+

} as Context;

354+

const baseStreamFn = (

355+

streamModel: Model<"openai-completions">,

356+

streamContext: Context,

357+

options?: { onPayload?: (payload: unknown, model: unknown) => unknown },

358+

) => {

359+

capturedPayload = buildOpenAICompletionsParams(streamModel, streamContext, {

360+

reasoning: "high",

361+

} as never);

362+

options?.onPayload?.(capturedPayload, streamModel);

363+

const stream = createAssistantMessageEventStream();

364+

queueMicrotask(() => stream.end());

365+

return stream;

366+

};

367+368+

const wrapThinkingHigh = createDeepSeekV4ThinkingWrapper(baseStreamFn as never, "high");

369+

expect(wrapThinkingHigh).toBeDefined();

370+

await wrapThinkingHigh?.(model, context, {});

371+372+

expect((capturedPayload?.messages as Array<Record<string, unknown>>)[1]).toMatchObject({

373+

role: "assistant",

374+

content: "Hello.",

375+

reasoning_content: "",

376+

});

377+

});

378+312379

it("strips replayed reasoning_content when DeepSeek V4 thinking is disabled", async () => {

313380

let capturedPayload: Record<string, unknown> | undefined;

314381

const model = {