Skip to content

Commit 5305fa8

Browse files
committed
test(live): retry GPT-5.6 nonce mismatches
1 parent 1c01739 commit 5305fa8

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎src/gateway/gateway-models.profiles.live.test.ts‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,18 @@ function shouldSkipToolNonceProbeMissForLiveModel(modelKey?: string): boolean {
16861686
return GATEWAY_LIVE_TOOL_NONCE_MISS_SKIP_MODEL_KEYS.has(normalizedKey);
16871687
}
16881688

1689+
function shouldRetryToolNonceProbeMissForLiveModel(modelKey?: string): boolean {
1690+
if (shouldSkipToolNonceProbeMissForLiveModel(modelKey)) {
1691+
return true;
1692+
}
1693+
if (!modelKey) {
1694+
return false;
1695+
}
1696+
const [provider, ...rest] = modelKey.split("/");
1697+
const modelId = rest.join("/");
1698+
return provider === "openai" && (modelId === "gpt-5.6" || modelId.startsWith("gpt-5.6-"));
1699+
}
1700+
16891701
describe("shouldSkipToolNonceProbeMissForLiveModel", () => {
16901702
it.each([
16911703
{ modelKey: "anthropic/claude-opus-4-6", expected: true },
@@ -1705,6 +1717,18 @@ describe("shouldSkipToolNonceProbeMissForLiveModel", () => {
17051717
});
17061718
});
17071719

1720+
describe("shouldRetryToolNonceProbeMissForLiveModel", () => {
1721+
it.each([
1722+
{ modelKey: "openai/gpt-5.6", expected: true },
1723+
{ modelKey: "openai/gpt-5.6-luna", expected: true },
1724+
{ modelKey: "openai/gpt-5.6-sol", expected: true },
1725+
{ modelKey: "openai/gpt-5.5", expected: false },
1726+
{ modelKey: "openai/gpt-5.60", expected: false },
1727+
])("returns $expected for $modelKey", ({ modelKey, expected }) => {
1728+
expect(shouldRetryToolNonceProbeMissForLiveModel(modelKey)).toBe(expected);
1729+
});
1730+
});
1731+
17081732
describe("isTransientToolReadProbeErrorForLiveModel", () => {
17091733
it("matches generic provider failover during the tool-read phase", () => {
17101734
expect(
@@ -3505,7 +3529,7 @@ async function runGatewayModelSuite(params: GatewayModelSuiteParams) {
35053529
const maxToolReadAttempts = 3;
35063530
// Known-variable models already skip after exhausted nonce misses.
35073531
// Use the stricter follow-up prompts before conceding that coverage.
3508-
const retryKnownToolNonceMiss = shouldSkipToolNonceProbeMissForLiveModel(modelKey);
3532+
const retryKnownToolNonceMiss = shouldRetryToolNonceProbeMissForLiveModel(modelKey);
35093533
let toolText = "";
35103534
for (
35113535
let toolReadAttempt = 0;

0 commit comments

Comments
 (0)