fix(agents): normalize cli transcript api field

This commit is contained in:
Ayaan Zaidi
2026-04-16 09:20:37 +05:30
parent 6c343f1f58
commit 3a3fae0eac
2 changed files with 2 additions and 1 deletions

View File

@@ -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,

View File

@@ -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" }],