Skip to content

[Bug]: 2026.6.5 routes DeepSeek (custom OpenAI-compatible provider) to the OpenAI Responses API → 401, now affecting non-reasoning deepseek-v4-pro #92148

Description

@marcoraepple-sys

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

OpenClaw 2026.6.5 misroutes deepseek-v4-pro to the OpenAI Responses API, causing HTTP 401 (worked on 2026.5.27).

Steps to reproduce

  1. On OpenClaw 2026.6.5 (npm global, Linux, systemd --user gateway), configure
    DeepSeek as a custom OpenAI-compatible provider: API-key auth, empty baseUrl
    (DeepSeek default), model deepseek-v4-pro with reasoning: false, and
    agents.defaults.thinkingDefault: "off". Default model = deepseek/deepseek-v4-pro.
  2. Run openclaw models status --probe (or send any message to the agent in Telegram).
  3. Observe deepseek-v4-pro fail with HTTP 401 and this gateway log line:
    [openai-transport] [responses] error provider=deepseek api=openai-responses model=deepseek-v4-pro status=401 code=invalid_api_key ... "find your API key at
    https://platform.openai.com/account/api-keys"

Expected behavior

On 2026.5.27 (verified directly by rolling back), the same config and the same
openclaw models status --probe return ok for deepseek-v4-pro, and the agent
replies normally in Telegram. DeepSeek requests should go to api.deepseek.com via
chat-completions, not the OpenAI Responses API. The key is valid: a direct
GET https://api.deepseek.com/user/balance with the same key returns 200.D

Actual behavior

deepseek-v4-pro requests return HTTP 401. openclaw models status --probe reports
deepseek-v4-pro as auth / "Authentication failed (provider returned HTTP 401)".
The gateway log shows the request was sent to the OpenAI Responses API using the
DeepSeek key, which OpenAI rejects:

[openai-transport] [responses] error provider=deepseek api=openai-responses
model=deepseek-v4-pro status=401 code=invalid_api_key
message=401 Incorrect API key provided: sk-... ; find your API key at
https://platform.openai.com/account/api-keys

A direct GET https://api.deepseek.com/user/balance with the same key returns 200,
confirming the key is valid.

OpenClaw version

2026.6.5 (5181e4f)

Operating system

Ubuntu (Linux 6.8.0-124-generic, x86_64), Node 22.22.3

Install method

npm global: sudo npm install -g openclaw

Model

deepseek/deepseek-v4-pro

Provider / routing chain

openclaw -> deepseek (direct, api.deepseek.com, OpenAI-compatible chat-completions)

Additional provider/model setup details

  • DeepSeek is a direct custom OpenAI-compatible provider (no Cloudflare / OpenRouter / proxy).
  • models.providers.deepseek: models deepseek-v4-pro / deepseek-v4-flash / deepseek-reasoner,
    all with reasoning:false; baseUrl empty (uses DeepSeek default https://api.deepseek.com).
  • agents.defaults.thinkingDefault: "off". Default model deepseek/deepseek-v4-pro. No fallbacks.
  • Key resolves from the per-agent auth profile (deepseek:manual) and DEEPSEEK_API_KEY env;
    openclaw models status shows deepseek auth as present.
  • Tried setting models.providers.deepseek.api = "openai-completions" to force chat-completions;
    it did NOT stop the routing to the Responses API.
  • No API keys, tokens, or passwords included.

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.regressionBehavior that previously worked and now fails

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions