Q128: every model call of a run is recorded with its purpose and listed in the run

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 20:55:18 -04:00
1 parent 1f484df894
commit 6afd7bef2a
25 files changed
+189 -22

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ describe("character accounting", () => {
const instructions = "You run this company.";
const messages = [{ role: "user" as const, text: "Kick off the launch." }];
const tools: ToolDefinition[] = [{ name: "send_message", description: "Post a message.", parameters: { type: "object", properties: {} } }];
const result = await providers.runToolTurn({ orgId, providerId, workspaceId: null, instructions, messages, tools });
const result = await providers.runToolTurn({ purpose: "agent_turn", orgId, providerId, workspaceId: null, instructions, messages, tools });
expect(connection.db.prepare("select input_char_count, output_char_count from provider_requests where id = ?").get(result.requestId)).toEqual({
input_char_count: instructions.length + JSON.stringify(messages).length + JSON.stringify(tools).length,