




















@@ -2519,7 +2519,7 @@ describe("runWithModelFallback", () => {
25192519});
25202520});
252125212522-it("keeps alias-resolved primary models subject to transient cooldowns", async () => {
2522+it("probes alias-resolved primary models during rate-limit cooldowns", async () => {
25232523const { dir } = await makeAuthStoreWithCooldown("anthropic", "rate_limit");
25242524const cfg = makeCfg({
25252525agents: {
@@ -2535,7 +2535,7 @@ describe("runWithModelFallback", () => {
25352535},
25362536});
253725372538-const run = vi.fn().mockResolvedValueOnce("haiku success");
2538+const run = vi.fn().mockResolvedValueOnce("sonnet success");
2539253925402540const result = await runWithModelFallback({
25412541 cfg,
@@ -2545,9 +2545,9 @@ describe("runWithModelFallback", () => {
25452545agentDir: dir,
25462546});
254725472548-expect(result.result).toBe("haiku success");
2548+expect(result.result).toBe("sonnet success");
25492549expect(run).toHaveBeenCalledTimes(1);
2550-expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-haiku-3-5", {
2550+expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-sonnet-4-6", {
25512551allowTransientCooldownProbe: true,
25522552});
25532553});
@@ -2623,7 +2623,7 @@ describe("runWithModelFallback", () => {
2623262326242624expect(result.result).toBe("groq success");
26252625expect(run).toHaveBeenCalledTimes(2);
2626-expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-sonnet-4-5", {
2626+expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-opus-4-6", {
26272627allowTransientCooldownProbe: true,
26282628});
26292629expect(run).toHaveBeenNthCalledWith(2, "groq", "llama-3.3-70b-versatile");
@@ -2661,7 +2661,7 @@ describe("runWithModelFallback", () => {
2661266126622662expect(result.result).toBe("groq success");
26632663expect(run).toHaveBeenCalledTimes(2);
2664-expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-sonnet-4-5", {
2664+expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-opus-4-6", {
26652665allowTransientCooldownProbe: true,
26662666});
26672667expect(run).toHaveBeenNthCalledWith(2, "groq", "llama-3.3-70b-versatile");
@@ -2686,8 +2686,8 @@ describe("runWithModelFallback", () => {
2686268626872687const run = vi
26882688.fn()
2689-.mockRejectedValueOnce(new Error("Model not found: anthropic/claude-sonnet-4-5"))
2690-.mockResolvedValueOnce("haiku success");
2689+.mockRejectedValueOnce(new Error("Model not found: anthropic/claude-opus-4-6"))
2690+.mockResolvedValueOnce("sonnet success");
2691269126922692const result = await runWithModelFallback({
26932693 cfg,
@@ -2697,12 +2697,12 @@ describe("runWithModelFallback", () => {
26972697agentDir: dir,
26982698});
269926992700-expect(result.result).toBe("haiku success");
2700+expect(result.result).toBe("sonnet success");
27012701expect(run).toHaveBeenCalledTimes(2);
2702-expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-sonnet-4-5", {
2702+expect(run).toHaveBeenNthCalledWith(1, "anthropic", "claude-opus-4-6", {
27032703allowTransientCooldownProbe: true,
27042704});
2705-expect(run).toHaveBeenNthCalledWith(2, "anthropic", "claude-haiku-3-5", {
2705+expect(run).toHaveBeenNthCalledWith(2, "anthropic", "claude-sonnet-4-5", {
27062706allowTransientCooldownProbe: true,
27072707});
27082708});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。