[GH-ISSUE #52] Compatibility issues with the OpenAI Python client. #51

Open
opened 2026-10-26 21:07:14 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @dennymao on GitHub (May 31, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V2/issues/52

server return http status code 422;
request:

{ "model": "deepseek-chat", "messages": [ { "role": "system", "content": "someting" }, { "role": "user", "content": [ { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAA............", "detail": "high" } }, { "type": "text", "text": "\\nGenerate code for a web page that looks exactly like this.\\n" } ] } ], "stream": true, "timeout": 600, "temperature": 0.0, "max_tokens": 4096 }

Originally created by @dennymao on GitHub (May 31, 2024). Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-V2/issues/52 server return http status code 422; request: `{ "model": "deepseek-chat", "messages": [ { "role": "system", "content": "someting" }, { "role": "user", "content": [ { "type": "image_url", "image_url": { "url": "data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAA............", "detail": "high" } }, { "type": "text", "text": "\\nGenerate code for a web page that looks exactly like this.\\n" } ] } ], "stream": true, "timeout": 600, "temperature": 0.0, "max_tokens": 4096 }`
Author
Owner

@xyh0202 commented on GitHub (Jun 5, 2024):

"timeout" is not a valid request parameter for deepseek api. Please refer to API document https://platform.deepseek.com/api-docs/api/create-chat-completion/

<!-- gh-comment-id:2149320744 --> @xyh0202 commented on GitHub (Jun 5, 2024): "timeout" is not a valid request parameter for deepseek api. Please refer to API document https://platform.deepseek.com/api-docs/api/create-chat-completion/
Author
Owner

@dennymao commented on GitHub (Jun 5, 2024):

I understand, but in the official DeepSeek example code, they use OpenAI's client: from openai import OpenAI. Therefore, I think DeepSeek should consider either fully supporting compatibility with OpenAI's client and API parameters, or creating its own proprietary one. It's not ideal to have a semi-compatible approach that appears to work but actually doesn't in practice. This is not elegant.

<!-- gh-comment-id:2149336991 --> @dennymao commented on GitHub (Jun 5, 2024): I understand, but in the official DeepSeek example code, they use OpenAI's client: from openai import OpenAI. Therefore, I think DeepSeek should consider either fully supporting compatibility with OpenAI's client and API parameters, or creating its own proprietary one. It's not ideal to have a semi-compatible approach that appears to work but actually doesn't in practice. This is not elegant.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-V2#51
No description provided.