deepseek-ai / deepseek-ai/awesome-deepseek-integration
Claude Code WebSearch broken: deepseek-reasoner does not support tool_choice
- Dominant language
- No language data
- Stars
- 39.1k
- Forks
- 4.3k
- PR merge metrics
- No merged PRs in 30d
Description
## Description
When using DeepSeek as the backend model for Claude Code, the `WebSearch` and `WebFetch` tools fail with the following error:
```
API Error: 400 {"error":{"message":"deepseek-reasoner does not support this tool_choice","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
```
## Steps to Reproduce
1. Configure Claude Code to use DeepSeek as the provider (via `claude --model deepseek-v4-pro` or equivalent)
2. Trigger any query that causes Claude Code to invoke the built-in `WebSearch` or `WebFetch` tool
3. The API returns a 400 error because DeepSeek's API rejects the `tool_choice` parameter
## Expected Behavior
WebSearch/WebFetch should work, as these are core capabilities of Claude Code. DeepSeek's API documentation claims compatibility with the Anthropic API format, which includes `tool_choice` support.
## Impact
This effectively disables web search — one of the most important capabilities of an AI coding assistant. Without it, the assistant cannot verify facts, search documentation, or fetch current information from the web. This breaks roughly half of the assistant's practical utility.
## Proposed Fix
Support the `tool_choice` parameter in the DeepSeek API when using Anthropic-compatible mode, so that tools like WebSearch and WebFetch can be invoked correctly by Claude Code.
## Environment
- Claude Code CLI (latest)
- Model: deepseek-reasoner / deepseek-v4-pro
- Date tested: 2026-05-04
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.