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

推荐订阅源

爱范儿
爱范儿
WordPress大学
WordPress大学
C
Check Point Blog
GbyAI
GbyAI
U
Unit 42
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog
Vercel News
Vercel News
博客园 - 【当耐特】
美团技术团队
小众软件
小众软件
S
SegmentFault 最新的问题
Jina AI
Jina AI
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The Cloudflare Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio 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(ollama): retry non-visible reasoning turns · openclaw...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -976,6 +976,103 @@ describe("runEmbeddedPiAgent incomplete-turn safety", () => {

976976

expect(retryInstruction).toBe(REASONING_ONLY_RETRY_INSTRUCTION);

977977

});

978978979+

it("does not apply planning-only or ack fast paths to Ollama runs", () => {

980+

const retryInstruction = resolvePlanningOnlyRetryInstruction({

981+

provider: "ollama",

982+

modelId: "gemma4:31b",

983+

prompt: "Please inspect the code, make the change, and run the checks.",

984+

aborted: false,

985+

timedOut: false,

986+

attempt: makeAttemptResult({

987+

assistantTexts: ["I'll inspect the code, make the change, and run the checks."],

988+

}),

989+

});

990+

const ackInstruction = resolveAckExecutionFastPathInstruction({

991+

provider: "ollama",

992+

modelId: "gemma4:31b",

993+

prompt: "go ahead",

994+

});

995+996+

expect(retryInstruction).toBeNull();

997+

expect(ackInstruction).toBeNull();

998+

});

999+1000+

it("retries signed reasoning-only Ollama turns with a visible-answer continuation instruction", () => {

1001+

const retryInstruction = resolveReasoningOnlyRetryInstruction({

1002+

provider: "ollama",

1003+

modelId: "gemma4:31b",

1004+

aborted: false,

1005+

timedOut: false,

1006+

attempt: makeAttemptResult({

1007+

assistantTexts: [],

1008+

lastAssistant: {

1009+

role: "assistant",

1010+

stopReason: "end_turn",

1011+

provider: "ollama",

1012+

model: "gemma4:31b",

1013+

content: [

1014+

{

1015+

type: "thinking",

1016+

thinking: "internal reasoning",

1017+

thinkingSignature: JSON.stringify({ id: "ollama_rs_helper", type: "reasoning" }),

1018+

},

1019+

],

1020+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

1021+

}),

1022+

});

1023+1024+

expect(retryInstruction).toBe(REASONING_ONLY_RETRY_INSTRUCTION);

1025+

});

1026+1027+

it("retries unsigned-thinking Ollama turns via the empty-response path", () => {

1028+

const retryInstruction = resolveEmptyResponseRetryInstruction({

1029+

provider: "ollama",

1030+

modelId: "gemma4:31b",

1031+

payloadCount: 0,

1032+

aborted: false,

1033+

timedOut: false,

1034+

attempt: makeAttemptResult({

1035+

assistantTexts: [],

1036+

lastAssistant: {

1037+

role: "assistant",

1038+

stopReason: "end_turn",

1039+

provider: "ollama",

1040+

model: "gemma4:31b",

1041+

content: [

1042+

{

1043+

type: "thinking",

1044+

thinking: "internal reasoning",

1045+

},

1046+

],

1047+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

1048+

}),

1049+

});

1050+1051+

expect(retryInstruction).toBe(EMPTY_RESPONSE_RETRY_INSTRUCTION);

1052+

});

1053+1054+

it("retries generic empty Ollama turns without visible text", () => {

1055+

const retryInstruction = resolveEmptyResponseRetryInstruction({

1056+

provider: "ollama",

1057+

modelId: "gemma4:31b",

1058+

payloadCount: 0,

1059+

aborted: false,

1060+

timedOut: false,

1061+

attempt: makeAttemptResult({

1062+

assistantTexts: [],

1063+

lastAssistant: {

1064+

role: "assistant",

1065+

stopReason: "end_turn",

1066+

provider: "ollama",

1067+

model: "gemma4:31b",

1068+

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

1069+

} as unknown as EmbeddedRunAttemptResult["lastAssistant"],

1070+

}),

1071+

});

1072+1073+

expect(retryInstruction).toBe(EMPTY_RESPONSE_RETRY_INSTRUCTION);

1074+

});

1075+9791076

it("treats exact NO_REPLY as a deliberate silent assistant reply", () => {

9801077

const incompleteTurnText = resolveIncompleteTurnPayloadText({

9811078

payloadCount: 0,