Skip to content

Commit a367fb0

Browse files
os-zhuangclaude
andcommitted
test(service-ai): add buildContextSchemaMessages to the quota-test mock runtime
The mock AgentRuntime in agent-chat-quota.test.ts didn't implement the new buildContextSchemaMessages method, so the route's await on it threw and the handler returned 500 instead of 200. Mirror the real runtime in the mock. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent adf6e6f commit a367fb0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/services/service-ai/src/__tests__/agent-chat-quota.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ function mockAgentRuntime(): AgentRuntime {
120120
})),
121121
resolveActiveSkills: vi.fn(async () => []),
122122
buildSystemMessages: vi.fn(() => [{ role: 'system', content: 'sys' }]),
123+
buildContextSchemaMessages: vi.fn(async () => []),
123124
buildRequestOptions: vi.fn(() => ({})),
124125
listAgents: vi.fn(async () => []),
125126
} as unknown as AgentRuntime;

0 commit comments

Comments
 (0)