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

推荐订阅源

Y
Y Combinator Blog
腾讯CDC
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Hugging Face - Blog
Hugging Face - Blog
H
Help Net Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Last Week in AI
Last Week in AI
博客园_首页
D
DataBreaches.Net
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
月光博客
月光博客
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
Vercel News
Vercel News
WordPress大学
WordPress大学
J
Java Code Geeks
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
U
Unit 42

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 Kimi Coding tool-call replay (#82550) · openclaw/open...
amknight · 2026-05-16 · via Recent Commits to openclaw:main

@@ -307,6 +307,126 @@ describe("kimi tool-call markup wrapper", () => {

307307

});

308308

});

309309310+

it("backfills Kimi OpenAI-compatible tool-call reasoning_content when thinking is enabled", () => {

311+

const { streamFn: baseStreamFn, getCapturedPayload } = createPayloadCapturingStream({

312+

messages: [

313+

{ role: "user", content: "run pwd" },

314+

{

315+

role: "assistant",

316+

content: null,

317+

tool_calls: [

318+

{

319+

id: "call_1",

320+

type: "function",

321+

function: { name: "exec", arguments: "{\"command\":\"pwd\"}" },

322+

},

323+

],

324+

},

325+

{

326+

role: "assistant",

327+

content: "kept",

328+

reasoning_content: "native reasoning",

329+

tool_calls: [

330+

{

331+

id: "call_2",

332+

type: "function",

333+

function: { name: "read", arguments: "{}" },

334+

},

335+

],

336+

},

337+

],

338+

});

339+340+

const wrapped = createKimiThinkingWrapper(baseStreamFn, "enabled");

341+

void wrapped(

342+

{

343+

api: "openai-completions",

344+

provider: "kimi",

345+

id: "kimi-for-coding",

346+

} as Model<"openai-completions">,

347+

{ messages: [] } as Context,

348+

{},

349+

);

350+351+

expect(getCapturedPayload()).toEqual({

352+

messages: [

353+

{ role: "user", content: "run pwd" },

354+

{

355+

role: "assistant",

356+

content: null,

357+

reasoning_content: "",

358+

tool_calls: [

359+

{

360+

id: "call_1",

361+

type: "function",

362+

function: { name: "exec", arguments: "{\"command\":\"pwd\"}" },

363+

},

364+

],

365+

},

366+

{

367+

role: "assistant",

368+

content: "kept",

369+

reasoning_content: "native reasoning",

370+

tool_calls: [

371+

{

372+

id: "call_2",

373+

type: "function",

374+

function: { name: "read", arguments: "{}" },

375+

},

376+

],

377+

},

378+

],

379+

thinking: { type: "enabled" },

380+

});

381+

});

382+383+

it("strips Kimi OpenAI-compatible replay reasoning_content when thinking is disabled", () => {

384+

const { streamFn: baseStreamFn, getCapturedPayload } = createPayloadCapturingStream({

385+

messages: [

386+

{

387+

role: "assistant",

388+

content: null,

389+

reasoning_content: "old reasoning",

390+

tool_calls: [

391+

{

392+

id: "call_1",

393+

type: "function",

394+

function: { name: "exec", arguments: "{\"command\":\"pwd\"}" },

395+

},

396+

],

397+

},

398+

],

399+

});

400+401+

const wrapped = createKimiThinkingWrapper(baseStreamFn, "disabled");

402+

void wrapped(

403+

{

404+

api: "openai-completions",

405+

provider: "kimi",

406+

id: "kimi-for-coding",

407+

} as Model<"openai-completions">,

408+

{ messages: [] } as Context,

409+

{},

410+

);

411+412+

expect(getCapturedPayload()).toEqual({

413+

messages: [

414+

{

415+

role: "assistant",

416+

content: null,

417+

tool_calls: [

418+

{

419+

id: "call_1",

420+

type: "function",

421+

function: { name: "exec", arguments: "{\"command\":\"pwd\"}" },

422+

},

423+

],

424+

},

425+

],

426+

thinking: { type: "disabled" },

427+

});

428+

});

429+310430

it("enables Kimi Anthropic thinking with a high budget and enough output room", () => {

311431

const { streamFn: baseStreamFn, getCapturedPayload } = createPayloadCapturingStream();

312432