DeepSeek V4 Pro with Codex and Claude Code: Endpoint Compatibility Test
Can deepseek-v4-pro be used with Codex and Claude Code? The short answer from a 2026-07-05 Crazyrouter test is:
- It works through OpenAI-compatible
POST /v1/chat/completions. - It did not work as a native Codex-style
POST /v1/responsesmodel in this test. - It worked through Claude Messages compatibility at
POST /v1/messages, including a basictool_use -> tool_resultloop.
Test base URL:
https://cn.crazyrouter.com/v1
What was tested
GET /v1/models returned HTTP 200 and listed deepseek-v4-pro:
{
"id": "deepseek-v4-pro",
"supported_endpoint_types": ["openai"],
"public_endpoint_types": ["openai"]
}
That matters because "OpenAI-compatible" often means chat completions compatibility, not full Responses API compatibility.
Result table
| Test | Endpoint | HTTP | Result |
|---|---|---|---|
| Model list | GET /v1/models |
200 |
deepseek-v4-pro present, endpoint type openai
|
| Chat completion | POST /v1/chat/completions |
200 | Returned DS_V4_PRO_CHAT_OK with normal token budget |
| Small token budget | POST /v1/chat/completions |
200 | Visible output truncated to DS; reasoning tokens used 28/30 completion tokens |
| Codex-style Responses | POST /v1/responses |
400 | Failed with convert_request_failed
|
| Claude Messages text | POST /v1/messages |
200 | Returned Claude-style text content block |
| Claude Messages tool use | POST /v1/messages |
200 | Returned tool_use get_city_timezone({"city":"Beijing"})
|
| Claude tool result continuation | POST /v1/messages |
200 | Accepted tool_result and returned final text |
Why Codex is different
Codex is not only a chat client. A custom provider often uses Responses API semantics:
model_provider = "custom"
model = "deepseek-v4-pro"
[model_providers.custom]
wire_api = "responses"
base_url = "https://your-router.example/v1"
That means Codex may expect Responses-style output items, tool calls, tool results, reasoning state, and streaming events. A model that only behaves well behind /v1/chat/completions is not automatically a good Codex backend.
In this test, deepseek-v4-pro was online and usable as a chat model, but POST /v1/responses returned HTTP 400. So the practical conclusion is: do not configure it as a direct Codex Responses model unless your gateway has verified Responses translation.
Why Claude Code can work
Claude Code commonly talks in Anthropic Messages format:
Claude Code -> /v1/messages -> gateway -> /v1/chat/completions -> DeepSeek V4 Pro
The gateway can convert Claude content blocks and tool_use into OpenAI-compatible chat requests, then convert the model output back into Claude-style content blocks.
The test confirmed that this path worked for text output, tool use, and tool-result continuation. That does not make it native Claude support, but it is a practical compatibility path.
Production lesson
Do not judge agent compatibility from model name alone. Test the endpoint contract:
- For Codex: verify
/v1/responses, tool call items, tool result continuation, streaming events, and non-empty final output. - For Claude Code: verify
/v1/messages,tool_use,tool_result, SSE/content blocks, usage fields, and retries. - For DeepSeek V4 Pro: give enough output budget because reasoning tokens can consume part of
max_tokens.