0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DeepSeek V4 Pro with Codex and Claude Code: Endpoint Compatibility Test

0
Posted at

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/responses model in this test.
  • It worked through Claude Messages compatibility at POST /v1/messages, including a basic tool_use -> tool_result loop.

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.

Full article: https://crazyrouter.com/blog/deepseek-v4-pro-codex-claude-code-compatibility-2026?utm_source=qiita&utm_medium=article&utm_campaign=deepseek_v4_pro_codex_claude_code_20260705&utm_content=qiita_deepseek-v4-pro-codex-claude-code_20260705__canonical&utm_term=DeepSeek%20V4%20Pro%20Codex%20Claude%20Code

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?