openclaw - 💡(How to fix) Fix opencode-go/deepseek-v4-flash tool schema failure and Telegram planning text leak after fallback [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71683Fetched 2026-04-26 05:09:49
View on GitHub
Comments
2
Participants
3
Timeline
3
Reactions
0
Timeline (top)
commented ×2closed ×1

Using opencode-go/deepseek-v4-flash in Telegram fails on tool-enabled requests with a provider schema error, and the fallback path can expose internal planning text in the visible reply.

Error Message

Using opencode-go/deepseek-v4-flash in Telegram fails on tool-enabled requests with a provider schema error, and the fallback path can expose internal planning text in the visible reply. Error from provider (DeepSeek): Failed to deserialize the JSON body into the target type: tools[0].function: missing field name

  • opencode-go/deepseek-v4-flash fails with a 400 schema error on tool-enabled requests.
  • Error from provider (DeepSeek): Failed to deserialize the JSON body into the target type: tools[0].function: missing field 'name'

Root Cause

Using opencode-go/deepseek-v4-flash in Telegram fails on tool-enabled requests with a provider schema error, and the fallback path can expose internal planning text in the visible reply.

Code Example

400 invalid_request_error
Error from provider (DeepSeek): Failed to deserialize the JSON body into the target type: tools[0].function: missing field `name`

---

The user keeps sending test. They might be checking if I'm still responsive or testing something. I should just acknowledge briefly.i'm here.
RAW_BUFFERClick to expand / collapse

Summary

Using opencode-go/deepseek-v4-flash in Telegram fails on tool-enabled requests with a provider schema error, and the fallback path can expose internal planning text in the visible reply.

OpenClaw Version

  • 2026.4.21

Environment

  • Channel: Telegram direct chat
  • Provider/model: opencode-go/deepseek-v4-flash
  • Fallback model observed: Fireworks / Kimi

Problem 1: DeepSeek Go tool payload is rejected

When the model is selected for normal chat with tools enabled, the provider rejects the request with:

400 invalid_request_error
Error from provider (DeepSeek): Failed to deserialize the JSON body into the target type: tools[0].function: missing field `name`

OpenClaw logs this as a provider schema / format failure and falls back.

Problem 2: Fallback can leak internal planning text into Telegram replies

After the DeepSeek failure, OpenClaw falls back to another model. In some fallback replies, internal planning/reasoning text becomes part of the visible assistant message sent to Telegram, for example:

The user keeps sending test. They might be checking if I'm still responsive or testing something. I should just acknowledge briefly.i'm here.

That text should never be shown to the end user.

Expected

  • DeepSeek Go requests should be serialized in a provider-compatible tool schema.
  • If fallback occurs, internal planning / reasoning text should remain hidden from the user.
  • Telegram should only receive the final assistant text.

Actual

  • opencode-go/deepseek-v4-flash fails with a 400 schema error on tool-enabled requests.
  • OpenClaw falls back successfully.
  • In some runs, fallback output includes internal planning text in the user-visible Telegram message.

Repro

  1. Set primary model to opencode-go/deepseek-v4-flash
  2. Use Telegram direct chat
  3. Send a simple message like test
  4. Observe:
    • DeepSeek request fails with tools[0].function: missing field 'name'
    • OpenClaw falls back
    • Visible Telegram reply may include planning text

Evidence

Relevant log excerpts observed locally:

  • provider failure:
    • LLM request failed: provider rejected the request schema or tool payload.
    • Error from provider (DeepSeek): Failed to deserialize the JSON body into the target type: tools[0].function: missing field 'name'
  • fallback decision:
    • candidate failed for opencode-go/deepseek-v4-flash
    • next candidate succeeded on Fireworks / Kimi
  • leaked visible reply contained internal planning text instead of only final user-facing output

I can provide sanitized session/log snippets if needed, but the core failure is reproducible from the setup above.

extent analysis

TL;DR

The most likely fix involves modifying the tool payload schema to include the required name field for opencode-go/deepseek-v4-flash requests.

Guidance

  • Verify the tools array in the request payload includes a name field for each tool, as required by the DeepSeek provider schema.
  • Review the OpenClaw code responsible for serializing the tool payload to ensure it conforms to the expected schema.
  • Inspect the fallback logic to determine why internal planning text is being included in the visible reply and modify it to exclude such text.
  • Test the modified payload and fallback logic to ensure the DeepSeek requests succeed and the fallback replies do not contain internal planning text.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The exact modifications required to the tool payload schema and OpenClaw code depend on the specific implementation, which is not provided in the issue. Additional logging or debugging may be necessary to fully understand the fallback logic and why internal planning text is being included in the visible reply.

Recommendation

Apply a workaround by modifying the tool payload schema to include the required name field, as this is the most direct fix for the provider schema error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING