diff --git a/packages/coding-agent/src/cli/gallery-fixtures/agentic.ts b/packages/coding-agent/src/cli/gallery-fixtures/agentic.ts index c50904901..568d8fbd3 100644 --- a/packages/coding-agent/src/cli/gallery-fixtures/agentic.ts +++ b/packages/coding-agent/src/cli/gallery-fixtures/agentic.ts @@ -361,6 +361,22 @@ export const agenticFixtures: Record = { }, }, + think: { + label: "Think", + // Streaming: scratchpad text still arriving. + streamingArgs: { + thoughts: "The retry loop re-reads the config after every failure — that explains the doubled latency.", + }, + args: { + thoughts: + "The retry loop re-reads the config after every failure — that explains the doubled latency. Cache the parsed config outside the loop, then re-check the invalidation path before answering.", + }, + result: { + content: [{ type: "text", text: "------" }], + details: { recorded: true }, + }, + }, + hub_jobs: { label: "Hub jobs", renderer: "hub", diff --git a/packages/coding-agent/test/sdk-tool-activation.test.ts b/packages/coding-agent/test/sdk-tool-activation.test.ts index 7a3ec4d9e..8e5c87f80 100644 --- a/packages/coding-agent/test/sdk-tool-activation.test.ts +++ b/packages/coding-agent/test/sdk-tool-activation.test.ts @@ -269,6 +269,9 @@ describe("createAgentSession defaultInactive tool activation", () => { }); const model = getBundledModel("openai", "gpt-5"); if (!model) throw new Error("Expected gpt-5 model to exist"); + // The prompt preflight validates the key through the registry (not the + // per-request `getApiKey` override), so seed it for keyless CI runners. + modelRegistry.authStorage.setRuntimeApiKey("openai", "test-key"); const { session } = await createAgentSession({ ...baseOptions(tempDir), settings, @@ -284,7 +287,8 @@ describe("createAgentSession defaultInactive tool activation", () => { expect(requestTexts).toHaveLength(2); expect(JSON.parse(firstRequest)).toEqual( expect.objectContaining({ - reasoning: { effort: "off" }, + // "none" is the only disable level the Responses wire accepts ("off" 400s). + reasoning: { effort: "none" }, tool_choice: expect.objectContaining({ name: "think" }), }), );