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

推荐订阅源

腾讯CDC
The Cloudflare Blog
IT之家
IT之家
V
V2EX
雷峰网
雷峰网
MyScale Blog
MyScale Blog
P
Proofpoint News Feed
Stack Overflow Blog
Stack Overflow Blog
博客园 - Franky
Engineering at Meta
Engineering at Meta
S
SegmentFault 最新的问题
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
小众软件
小众软件
博客园 - 叶小钗
Blog — PlanetScale
Blog — PlanetScale
C
Check Point Blog
A
About on SuperTechFans
B
Blog
月光博客
月光博客
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI

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(ollama): suppress disabled reasoning output · opencla...
steipete · 2026-06-01 · via Recent Commits to openclaw:main

@@ -946,6 +946,29 @@ describe("buildAssistantMessage", () => {

946946

expect(result.content).toEqual([{ type: "thinking", thinking: "Reasoning output" }]);

947947

});

948948949+

it("drops provider-returned thinking for non-reasoning models", () => {

950+

const response = {

951+

model: "minimax-m2.7:cloud",

952+

created_at: "2026-01-01T00:00:00Z",

953+

message: {

954+

role: "assistant" as const,

955+

content: "",

956+

thinking: "Thinking output",

957+

},

958+

done: true,

959+

prompt_eval_count: 10,

960+

eval_count: 6,

961+

};

962+

const result = buildAssistantMessage(response, {

963+

...modelInfo,

964+

id: "minimax-m2.7:cloud",

965+

reasoning: false,

966+

});

967+

expect(result.stopReason).toBe("stop");

968+

expect(result.content).toEqual([]);

969+

expect(result.usage.output).toBe(6);

970+

});

971+949972

it("strips inline reasoning prefix from kimi cloud visible text", () => {

950973

const response = {

951974

model: "kimi-k2.6:cloud",

@@ -2717,12 +2740,37 @@ describe("createOllamaStreamFn", () => {

27172740

[

27182741

'{"model":"m","created_at":"t","message":{"role":"assistant","content":"","reasoning":"reasoned"},"done":false}',

27192742

'{"model":"m","created_at":"t","message":{"role":"assistant","content":"","reasoning":" output"},"done":false}',

2720-

'{"model":"m","created_at":"t","message":{"role":"assistant","content":""},"done":true,"prompt_eval_count":1,"eval_count":2}',

2743+

'{"model":"m","created_at":"t","message":{"role":"assistant","content":""},"done":true,"prompt_eval_count":1}',

27212744

],

27222745

[{ type: "thinking", thinking: "reasoned output" }],

27232746

);

27242747

});

272527482749+

it("drops streamed reasoning chunks for non-reasoning models", async () => {

2750+

await withMockNdjsonFetch(

2751+

[

2752+

'{"model":"m","created_at":"t","message":{"role":"assistant","content":"","reasoning":"reasoned"},"done":false}',

2753+

'{"model":"m","created_at":"t","message":{"role":"assistant","content":"","reasoning":" output"},"done":false}',

2754+

'{"model":"m","created_at":"t","message":{"role":"assistant","content":""},"done":true,"prompt_eval_count":1,"eval_count":2}',

2755+

],

2756+

async () => {

2757+

const stream = await createOllamaTestStream({

2758+

baseUrl: "http://ollama-host:11434",

2759+

model: { reasoning: false },

2760+

});

2761+

const events = await collectStreamEvents(stream);

2762+

const doneEvent = events.at(-1);

2763+

if (!doneEvent || doneEvent.type !== "done") {

2764+

throw new Error("Expected done event");

2765+

}

2766+2767+

expect(doneEvent.message.content).toEqual([]);

2768+

expect(doneEvent.message.usage.output).toBeGreaterThan(0);

2769+

expect(events.some((event) => event.type === "thinking_delta")).toBe(false);

2770+

},

2771+

);

2772+

});

2773+27262774

it("keeps streamed content after earlier reasoning chunks", async () => {

27272775

await expectDoneEventContent(

27282776

[