diff --git a/src/agents/command/attempt-execution.ts b/src/agents/command/attempt-execution.ts index 8b36d780e90..6c2f3910bfa 100644 --- a/src/agents/command/attempt-execution.ts +++ b/src/agents/command/attempt-execution.ts @@ -206,7 +206,7 @@ export async function persistCliTurnTranscript(params: { threadId: params.threadId, sessionCwd: params.sessionCwd, assistant: { - api: provider, + api: "cli", provider, model, usage: params.result.meta.agentMeta?.usage, diff --git a/src/commands/agent.cli-provider.test.ts b/src/commands/agent.cli-provider.test.ts index 453c6536f1b..b7db92c427e 100644 --- a/src/commands/agent.cli-provider.test.ts +++ b/src/commands/agent.cli-provider.test.ts @@ -200,6 +200,7 @@ describe("agentCommand CLI provider handling", () => { }); expect(messages[1]).toMatchObject({ role: "assistant", + api: "cli", provider: "google-gemini-cli", model: "gemini-3.1-pro-preview", content: [{ type: "text", text: "hello from cli" }],