fix(ApiService.test): add getClientCompatibilityType mock to Anthropic API client for enhanced testing (#8421)

This commit is contained in:
SuYao 2025-07-23 19:41:40 +08:00 committed by GitHub
parent 4075a13c58
commit 5ed6912e0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1602,7 +1602,8 @@ const mockAnthropicApiClient = {
provider: {} as Provider,
useSystemPromptForTools: true,
getBaseURL: vi.fn(() => 'https://api.anthropic.com'),
getApiKey: vi.fn(() => 'mock-api-key')
getApiKey: vi.fn(() => 'mock-api-key'),
getClientCompatibilityType: vi.fn(() => ['AnthropicAPIClient'])
} as unknown as AnthropicAPIClient
const mockAnthropicApiClientStream = cloneDeep(mockAnthropicApiClient)