Merge pull request #1407 from olweraltuve/fix-deepseek-official-api-2

fix(deepseek): update base URL to remove /v1 endpoint
This commit is contained in:
Matt Rubens 2025-03-05 16:03:05 -05:00 committed by GitHub
commit d2c202977a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -72,7 +72,7 @@ describe("DeepSeekHandler", () => {
mockOptions = {
deepSeekApiKey: "test-api-key",
apiModelId: "deepseek-chat",
deepSeekBaseUrl: "https://api.deepseek.com/v1",
deepSeekBaseUrl: "https://api.deepseek.com",
}
handler = new DeepSeekHandler(mockOptions)
mockCreate.mockClear()
@ -110,7 +110,7 @@ describe("DeepSeekHandler", () => {
// The base URL is passed to OpenAI client internally
expect(OpenAI).toHaveBeenCalledWith(
expect.objectContaining({
baseURL: "https://api.deepseek.com/v1",
baseURL: "https://api.deepseek.com",
}),
)
})

View file

@ -8,7 +8,7 @@ export class DeepSeekHandler extends OpenAiHandler {
...options,
openAiApiKey: options.deepSeekApiKey ?? "not-provided",
openAiModelId: options.apiModelId ?? deepSeekDefaultModelId,
openAiBaseUrl: options.deepSeekBaseUrl ?? "https://api.deepseek.com/v1",
openAiBaseUrl: options.deepSeekBaseUrl ?? "https://api.deepseek.com",
openAiStreamingEnabled: true,
includeMaxTokens: true,
})