fix(qa-lab): treat claude-cli as Anthropic-family for live turn timeo… · openclaw/openclaw@a048aea
clawSean
·
2026-06-27
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -68,4 +68,30 @@ describe("qa live timeout policy", () => {
|
68 | 68 | ), |
69 | 69 | ).toBe(240_000); |
70 | 70 | }); |
| 71 | + |
| 72 | +it("uses the anthropic floor for claude-cli sonnet turns", () => { |
| 73 | +expect( |
| 74 | +resolveQaLiveTurnTimeoutMs( |
| 75 | +{ |
| 76 | +providerMode: "live-frontier", |
| 77 | +primaryModel: "claude-cli/claude-sonnet-4-6", |
| 78 | +alternateModel: "claude-cli/claude-opus-4-8", |
| 79 | +}, |
| 80 | +30_000, |
| 81 | +), |
| 82 | +).toBe(180_000); |
| 83 | +}); |
| 84 | + |
| 85 | +it("uses the opus floor for claude-cli opus turns", () => { |
| 86 | +expect( |
| 87 | +resolveQaLiveTurnTimeoutMs( |
| 88 | +{ |
| 89 | +providerMode: "live-frontier", |
| 90 | +primaryModel: "claude-cli/claude-opus-4-8", |
| 91 | +alternateModel: "claude-cli/claude-opus-4-8", |
| 92 | +}, |
| 93 | +30_000, |
| 94 | +), |
| 95 | +).toBe(240_000); |
| 96 | +}); |
71 | 97 | }); |
| Original file line number | Diff line number | Diff line change |
|---|
@@ -9,6 +9,13 @@ function isAnthropicModel(modelRef: string) {
|
9 | 9 | return modelRef.startsWith("anthropic/"); |
10 | 10 | } |
11 | 11 | |
| 12 | +// claude-cli is an Anthropic-backed Claude runtime, so it shares the Anthropic |
| 13 | +// turn-timeout floors; mirror the claude-cli==anthropic precedent in the aimock |
| 14 | +// and mock-openai servers. |
| 15 | +function isAnthropicFamilyModel(modelRef: string) { |
| 16 | +return isAnthropicModel(modelRef) || modelRef.startsWith("claude-cli/"); |
| 17 | +} |
| 18 | + |
12 | 19 | function isQaFastModeModelRef(modelRef: string) { |
13 | 20 | return isOpenAiModel(modelRef); |
14 | 21 | } |
@@ -18,7 +25,7 @@ function isGptFiveModel(modelRef: string) {
|
18 | 25 | } |
19 | 26 | |
20 | 27 | function isClaudeOpusModel(modelRef: string) { |
21 | | -return isAnthropicModel(modelRef) && modelRef.includes("claude-opus"); |
| 28 | +return isAnthropicFamilyModel(modelRef) && modelRef.includes("claude-opus"); |
22 | 29 | } |
23 | 30 | |
24 | 31 | export const liveFrontierProviderDefinition: QaProviderDefinition = { |
@@ -39,7 +46,7 @@ export const liveFrontierProviderDefinition: QaProviderDefinition = {
|
39 | 46 | if (isClaudeOpusModel(modelRef)) { |
40 | 47 | return Math.max(fallbackMs, 240_000); |
41 | 48 | } |
42 | | -if (isAnthropicModel(modelRef)) { |
| 49 | +if (isAnthropicFamilyModel(modelRef)) { |
43 | 50 | return Math.max(fallbackMs, 180_000); |
44 | 51 | } |
45 | 52 | if (isGptFiveModel(modelRef)) { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。