fix: remove non-existent DeepSeek model aliases per API docs

- Remove deepseek-v3 and deepseek-3.2-exp from DeepSeek Direct API
  (only deepseek-chat and deepseek-reasoner are supported)
- Keep deepseek-3.2 as version alias for deepseek-chat
- Remove deepseek/deepseek-v3 test from OpenRouter (only deepseek/deepseek-v3.2 exists)
- Update documentation references to API docs
This commit is contained in:
Roo Code 2025-12-03 17:24:17 +00:00
parent fb082c10bc
commit 7ce8ff1b9f
3 changed files with 6 additions and 85 deletions

View file

@ -22,19 +22,13 @@ const deepSeekV3Info: ModelInfo = {
export const deepSeekModels = {
"deepseek-chat": deepSeekV3Info,
// Aliases for DeepSeek V3 - these all map to deepseek-chat when calling the API
"deepseek-v3": {
...deepSeekV3Info,
description: `DeepSeek-V3 (alias for deepseek-chat). ${deepSeekV3Info.description}`,
},
// deepseek-3.2 is an alias for deepseek-chat (V3.2 is the current version)
// Note: The DeepSeek API only supports "deepseek-chat" and "deepseek-reasoner"
// See: https://api-docs.deepseek.com/quick_start/pricing
"deepseek-3.2": {
...deepSeekV3Info,
description: `DeepSeek V3.2 (alias for deepseek-chat). ${deepSeekV3Info.description}`,
},
"deepseek-3.2-exp": {
...deepSeekV3Info,
description: `DeepSeek V3.2 Experimental (alias for deepseek-chat). ${deepSeekV3Info.description}`,
},
"deepseek-reasoner": {
maxTokens: 65536, // 64K max output for reasoning mode
contextWindow: 128_000,
@ -50,11 +44,10 @@ export const deepSeekModels = {
} as const satisfies Record<string, ModelInfo>
// Map of model aliases to their official API model names
// The DeepSeek API uses specific model names, but users may use alternative names
// The DeepSeek API only supports "deepseek-chat" and "deepseek-reasoner"
// See: https://api-docs.deepseek.com/quick_start/pricing
export const deepSeekModelAliases: Record<string, string> = {
"deepseek-v3": "deepseek-chat",
"deepseek-3.2": "deepseek-chat",
"deepseek-3.2-exp": "deepseek-chat",
}
export const DEEP_SEEK_DEFAULT_TEMPERATURE = 0.6

View file

@ -148,25 +148,6 @@ describe("DeepSeekHandler", () => {
expect(OpenAI).toHaveBeenCalledWith(expect.objectContaining({ apiKey: mockOptions.deepSeekApiKey }))
})
it("should map deepseek-v3 alias to deepseek-chat for API calls", async () => {
vi.clearAllMocks()
const handlerWithV3 = new DeepSeekHandler({
...mockOptions,
apiModelId: "deepseek-v3",
})
const stream = handlerWithV3.createMessage("test", [])
for await (const _chunk of stream) {
// consume stream
}
// Verify the API was called with deepseek-chat (not deepseek-v3)
expect(mockCreate).toHaveBeenCalledWith(
expect.objectContaining({
model: "deepseek-chat",
}),
expect.anything(),
)
})
it("should map deepseek-3.2 alias to deepseek-chat for API calls", async () => {
vi.clearAllMocks()
const handlerWith32 = new DeepSeekHandler({
@ -212,19 +193,6 @@ describe("DeepSeekHandler", () => {
expect(model.info.supportsPromptCache).toBe(true)
})
it("should return correct model info for deepseek-v3 alias", () => {
const handlerWithV3 = new DeepSeekHandler({
...mockOptions,
apiModelId: "deepseek-v3",
})
const model = handlerWithV3.getModel()
expect(model.id).toBe("deepseek-v3") // Returns user's model ID
expect(model.info).toBeDefined()
expect(model.info.maxTokens).toBe(8192) // Same as deepseek-chat
expect(model.info.contextWindow).toBe(128_000)
expect(model.info.supportsNativeTools).toBe(true)
})
it("should return correct model info for deepseek-3.2 alias", () => {
const handlerWith32 = new DeepSeekHandler({
...mockOptions,

View file

@ -340,47 +340,7 @@ describe("OpenRouterHandler", () => {
})
describe("DeepSeek V3 Model Handling", () => {
it("should NOT use R1 format for DeepSeek V3 models", async () => {
const deepseekV3Handler = new OpenRouterHandler({
...mockOptions,
openRouterModelId: "deepseek/deepseek-v3",
})
const mockStream = {
[Symbol.asyncIterator]: async function* () {
yield {
choices: [{ delta: { content: "test" }, finish_reason: null }],
usage: null,
}
yield {
choices: [{ delta: {}, finish_reason: "stop" }],
usage: { prompt_tokens: 10, completion_tokens: 5 },
}
},
}
const mockCreate = vitest.fn().mockResolvedValue(mockStream)
;(OpenAI as any).prototype.chat = {
completions: { create: mockCreate },
} as any
const generator = deepseekV3Handler.createMessage("system prompt", [])
const chunks = []
for await (const chunk of generator) {
chunks.push(chunk)
}
// Verify that the messages were NOT converted to R1 format
expect(mockCreate).toHaveBeenCalledWith(
expect.objectContaining({
messages: expect.arrayContaining([
expect.objectContaining({ role: "system", content: expect.anything() }),
]),
}),
undefined,
)
})
// Note: OpenRouter only has deepseek/deepseek-v3.2, not deepseek/deepseek-v3
it("should NOT use R1 format for DeepSeek V3.2 models", async () => {
const deepseek32Handler = new OpenRouterHandler({
...mockOptions,