test(gateway): classify live provider drift · openclaw/openclaw@2405d02
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -344,7 +344,11 @@ function isGatewayLiveProbeTimeout(error: string): boolean {
|
344 | 344 | } |
345 | 345 | |
346 | 346 | function isGatewayLiveModelTimeout(error: string): boolean { |
347 | | -return /model timeout after \d+ms/i.test(error); |
| 347 | +return ( |
| 348 | +/model timeout after \d+ms/i.test(error) || |
| 349 | +(/\bagent\.wait timeout for runId=/i.test(error) && |
| 350 | +/\btimeoutPhase=(?:preflight|provider|post_turn)\b/i.test(error)) |
| 351 | +); |
348 | 352 | } |
349 | 353 | |
350 | 354 | function assertGatewayLiveDidNotSkipAllDueToTimeout(params: { |
@@ -892,6 +896,24 @@ describe("resolveGatewayLiveProviderTimeoutSeconds", () => {
|
892 | 896 | }); |
893 | 897 | }); |
894 | 898 | |
| 899 | +describe("isGatewayLiveModelTimeout", () => { |
| 900 | +it("matches provider-attributed agent wait timeouts", () => { |
| 901 | +expect( |
| 902 | +isGatewayLiveModelTimeout( |
| 903 | +"minimax/MiniMax-M3: prompt: agent.wait timeout for runId=idem-1 (timeoutPhase=provider, providerStarted=true, stopReason=rpc, error=aborted)", |
| 904 | +), |
| 905 | +).toBe(true); |
| 906 | +}); |
| 907 | + |
| 908 | +it("does not match wait-layer agent wait timeouts", () => { |
| 909 | +expect( |
| 910 | +isGatewayLiveModelTimeout( |
| 911 | +"minimax/MiniMax-M3: prompt: agent.wait timeout for runId=idem-1 (timeoutPhase=queue, providerStarted=false, stopReason=rpc, error=aborted)", |
| 912 | +), |
| 913 | +).toBe(false); |
| 914 | +}); |
| 915 | +}); |
| 916 | + |
895 | 917 | describe("formatGatewayLiveAgentWaitFailure", () => { |
896 | 918 | it("includes terminal attribution fields without requiring transcript text", () => { |
897 | 919 | expect( |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。