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

Closed

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

Activity

  1. clawsweeper commented on Jun 11, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 11, 2026, 11:59 AM ET / 15:59 UTC.

    Summary
    Codex review failed: retryable codex transport failure (exit 1).

    Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

    Ways to help us reproduce this

    • Include the exact command, prompt, or workflow that triggered it.
    • Add expected vs actual behavior.

    Next step
    Review did not complete, so no work-lane recommendation was made.

    Review details

    Best possible solution:

    Retry the Codex review after fixing the execution failure.

    Do we have a high-confidence way to reproduce the issue?

    Unclear. The review failed before ClawSweeper could establish a reproduction path.

    Is this the best way to solve the issue?

    Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

    AGENTS.md: unclear because the file could not be read completely.

    Remaining risk / open question:

    • No close action taken because the review did not complete.

    Codex review notes: model internal, reasoning high; reviewed against 3d6252a51772.

    Label changes

    Label changes:

    • add issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.
    • remove P1: Current review triage priority is none.
    • remove clawsweeper:no-new-fix-pr: Current issue advisory state no longer selects this label.
    • remove clawsweeper:needs-maintainer-review: Current issue advisory state no longer selects this label.
    • remove clawsweeper:needs-security-review: Current issue advisory state no longer selects this label.
    • remove impact:security: Current review selected no impact labels.
    • remove impact:auth-provider: Current review selected no impact labels.
    • remove issue-rating: 🦐 gold shrimp: Current issue advisory state no longer selects this label.
    Evidence reviewed

    What I checked:

    • failure reason: retryable codex transport failure.
    • codex failure detail: Codex review failed for this issue with exit 1.
    • codex stderr: le endpoint** (chat completions only); for text-to-image, embeddings, or speech use the HF inference clients directly.
    • codex stdout: No stdout captured.

    Likely related people:

    • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦐 gold shrimpDecent issue quality, but reproduction details are still incomplete.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for 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.
    on Jun 11, 2026
  3. self-assigned this
    on Jun 11, 2026
  4. joshavant commented on Jun 12, 2026

    @joshavant
    Collaborator

    Thanks for the clear report, @marcoraepple-sys.

    This was a real regression in the configured-model path: when a DeepSeek model row only overrode metadata, OpenClaw could lose the bundled DeepSeek transport metadata in the packaged runtime. A blank/default baseUrl from config loading then masked the static DeepSeek endpoint, so the probe fell through to the generic OpenAI Responses fallback and produced the 401 you saw.

    Fixed by #92265. Configured bundled-provider model rows now inherit missing static transport metadata while still preserving explicit model/provider/runtime overrides, and packaged bundled manifest discovery now uses the canonical resolver.

    Verified with a live packaged DeepSeek probe and a reversed-patch regression repro. Closing as fixed.

  5. locked as resolved and limited conversation to collaborators on Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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