fix: surface silent model fallback failures (#80917) · openclaw/openclaw@fe79efc
dutifulbob
·
2026-05-12
·
via Recent Commits to openclaw:main
File tree
agents/pi-embedded-runner
| Original file line number | Diff line number | Diff line change |
|---|
@@ -26,6 +26,7 @@ Docs: https://docs.openclaw.ai
|
26 | 26 | - memory-wiki: require write scope for Obsidian search [AI]. (#80904) Thanks @pgondhi987. |
27 | 27 | - Build: skip copied metadata for bundled plugins that are excluded from build entries, preventing update/status rebuilds from advertising missing QQ Bot runtime files. (#80925) |
28 | 28 | - Control UI/sessions: nest subagent sessions under their parent session in the session picker dropdown using a visual `└─ ` prefix, making the parent-child relationship clear. Fixes #77628. (#78623) Thanks @chinar-amrutkar. |
| 29 | +- Auto-reply: surface a visible error when the configured model backend fails and fallback produces no visible reply, while preserving intentional silent turns and side-effect-only deliveries. (#80917) Thanks @dutifulbob. |
29 | 30 | |
30 | 31 | ### Changes |
31 | 32 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -630,6 +630,20 @@ describe("overflow compaction in run loop", () => {
|
630 | 630 | expect(result.messagingToolSentTexts).toEqual(["already delivered"]); |
631 | 631 | }); |
632 | 632 | |
| 633 | +it("propagates deterministic approval prompt delivery from attempts", async () => { |
| 634 | +mockedRunEmbeddedAttempt.mockResolvedValue( |
| 635 | +makeAttemptResult({ |
| 636 | +assistantTexts: [], |
| 637 | +didSendDeterministicApprovalPrompt: true, |
| 638 | +}), |
| 639 | +); |
| 640 | + |
| 641 | +const result = await runEmbeddedPiAgent(baseParams); |
| 642 | + |
| 643 | +expect(result.payloads).toBeUndefined(); |
| 644 | +expect(result.didSendDeterministicApprovalPrompt).toBe(true); |
| 645 | +}); |
| 646 | + |
633 | 647 | it("returns a timeout payload instead of a partial assistant fragment after stream timeout", async () => { |
634 | 648 | mockedRunEmbeddedAttempt.mockResolvedValue( |
635 | 649 | makeAttemptResult({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -2692,6 +2692,7 @@ export async function runEmbeddedAttempt(
|
2692 | 2692 | getSuccessfulCronAdds, |
2693 | 2693 | getReplayState, |
2694 | 2694 | didSendViaMessagingTool, |
| 2695 | + didSendDeterministicApprovalPrompt, |
2695 | 2696 | getLastToolError, |
2696 | 2697 | setTerminalLifecycleMeta, |
2697 | 2698 | getUsageTotals, |
@@ -4086,6 +4087,7 @@ export async function runEmbeddedAttempt(
|
4086 | 4087 | currentAttemptAssistant, |
4087 | 4088 | lastToolError: getLastToolError?.(), |
4088 | 4089 | didSendViaMessagingTool: didSendViaMessagingTool(), |
| 4090 | +didSendDeterministicApprovalPrompt: didSendDeterministicApprovalPrompt(), |
4089 | 4091 | messagingToolSentTexts: getMessagingToolSentTexts(), |
4090 | 4092 | messagingToolSentMediaUrls: getMessagingToolSentMediaUrls(), |
4091 | 4093 | messagingToolSentTargets: getMessagingToolSentTargets(), |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -177,6 +177,8 @@ export type EmbeddedPiRunResult = {
|
177 | 177 | // True if a messaging tool successfully sent a message. |
178 | 178 | // Used to suppress agent's confirmation text. |
179 | 179 | didSendViaMessagingTool?: boolean; |
| 180 | +// True if a deterministic approval prompt was sent through the tool-result channel. |
| 181 | +didSendDeterministicApprovalPrompt?: boolean; |
180 | 182 | // Texts successfully sent via messaging tools during the run. |
181 | 183 | messagingToolSentTexts?: string[]; |
182 | 184 | // Media URLs successfully sent via messaging tools during the run. |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。