bump max model calls to 50

This commit is contained in:
Ramnique Singh 2026-07-22 00:00:09 +05:30
parent ed97392557
commit 1de932c7ba
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ function parentCreated(
config: { config: {
autoPermission: true, autoPermission: true,
humanAvailable: false, humanAvailable: false,
maxModelCalls: 20, maxModelCalls: 50,
}, },
} as z.infer<typeof TurnEvent>, } as z.infer<typeof TurnEvent>,
]; ];
@ -106,7 +106,7 @@ describe("runSpawnedAgent", () => {
model: { provider: "parent-p", model: "parent-m" }, model: { provider: "parent-p", model: "parent-m" },
}, },
}); });
expect(started[0].maxModelCalls).toBe(20); expect(started[0].maxModelCalls).toBe(50);
expect(started[0].signal).toBe(signal); expect(started[0].signal).toBe(signal);
expect(progress).toEqual([ expect(progress).toEqual([
{ childTurnId: "child-1", agentName: "researcher", task: "find things" }, { childTurnId: "child-1", agentName: "researcher", task: "find things" },
@ -184,7 +184,7 @@ describe("runSpawnedAgent", () => {
it("rejects a model-call budget above the cap at the schema boundary", async () => { it("rejects a model-call budget above the cap at the schema boundary", async () => {
const { services } = fakeServices({}); const { services } = fakeServices({});
const result = await runSpawnedAgent( const result = await runSpawnedAgent(
{ task: "t", instructions: "x", max_model_calls: 50 }, { task: "t", instructions: "x", max_model_calls: 51 },
{ parentTurnId: "parent-1", signal, services }, { parentTurnId: "parent-1", signal, services },
); );
expect(result.isError).toBe(true); expect(result.isError).toBe(true);

View file

@ -16,7 +16,7 @@ import { ReasoningEffort } from "./models.js";
export type JsonValue = z.infer<ReturnType<typeof z.json>>; export type JsonValue = z.infer<ReturnType<typeof z.json>>;
export const DEFAULT_MAX_MODEL_CALLS = 20; export const DEFAULT_MAX_MODEL_CALLS = 50;
export const MODEL_CALL_LIMIT_ERROR_CODE = "model-call-limit"; export const MODEL_CALL_LIMIT_ERROR_CODE = "model-call-limit";
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------