From 1de932c7bac09d210e52b3fb3aaf6077e323c22d Mon Sep 17 00:00:00 2001 From: Ramnique Singh <30795890+ramnique@users.noreply.github.com> Date: Wed, 22 Jul 2026 00:00:09 +0530 Subject: [PATCH] bump max model calls to 50 --- .../packages/core/src/runtime/assembly/spawn-agent.test.ts | 6 +++--- apps/x/packages/shared/src/turns.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/x/packages/core/src/runtime/assembly/spawn-agent.test.ts b/apps/x/packages/core/src/runtime/assembly/spawn-agent.test.ts index 7ac176d8..f6440301 100644 --- a/apps/x/packages/core/src/runtime/assembly/spawn-agent.test.ts +++ b/apps/x/packages/core/src/runtime/assembly/spawn-agent.test.ts @@ -38,7 +38,7 @@ function parentCreated( config: { autoPermission: true, humanAvailable: false, - maxModelCalls: 20, + maxModelCalls: 50, }, } as z.infer, ]; @@ -106,7 +106,7 @@ describe("runSpawnedAgent", () => { 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(progress).toEqual([ { 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 () => { const { services } = fakeServices({}); 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 }, ); expect(result.isError).toBe(true); diff --git a/apps/x/packages/shared/src/turns.ts b/apps/x/packages/shared/src/turns.ts index 9a6c14cc..424ff38b 100644 --- a/apps/x/packages/shared/src/turns.ts +++ b/apps/x/packages/shared/src/turns.ts @@ -16,7 +16,7 @@ import { ReasoningEffort } from "./models.js"; export type JsonValue = z.infer>; -export const DEFAULT_MAX_MODEL_CALLS = 20; +export const DEFAULT_MAX_MODEL_CALLS = 50; export const MODEL_CALL_LIMIT_ERROR_CODE = "model-call-limit"; // ---------------------------------------------------------------------------