Skip to content

Fix standalone DeepSeek L1 extraction#59

Draft
sirenexcelsior wants to merge 1 commit into
Tencent:mainfrom
sirenexcelsior:codex-deepseek-l1-standalone-fix
Draft

Fix standalone DeepSeek L1 extraction#59
sirenexcelsior wants to merge 1 commit into
Tencent:mainfrom
sirenexcelsior:codex-deepseek-l1-standalone-fix

Conversation

@sirenexcelsior
Copy link
Copy Markdown

Summary

Fix standalone L1 extraction compatibility with DeepSeek-style OpenAI APIs.

This PR makes two focused changes:

  1. enableTools=false no longer passes read-only tools into generateText()
  2. standalone gateway config can now opt into disableThinking, which injects
    thinking: { type: "disabled" } into the request body

Why

L1 extraction expects pure JSON text output. In practice, DeepSeek-compatible
backends can fail this path when:

  • the runner still exposes tools for text-only extraction
  • reasoning/thinking mode is enabled and the backend returns reasoning-related
    output that the current L1 parser cannot consume

Observed failures included:

No JSON array found in extraction response
The `reasoning_content` in the thinking mode must be passed back to the API.

Scope

  • src/adapters/standalone/llm-runner.ts
  • src/gateway/config.ts

Notes

This is intentionally small and scoped to standalone/gateway mode.
It does not change the OpenClaw-hosted path.

@Maxwell-Code07
Copy link
Copy Markdown
Collaborator

Thanks for this fix! We've noticed this issue as well. On certain reasoning models, the L1 extraction path can run into problems like what's described in #58. We'll review this and follow up with you soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants