Skip to content

fix(ai-models): mark deepseek-v4-flash as reasoning-capable - #118

Merged
KrasimirKralev merged 1 commit into
betafrom
fix/clawai-flash-reasoning-flag
May 2, 2026
Merged

KrasimirKralev merged 1 commit into
betafrom
fix/clawai-flash-reasoning-flag

Conversation

@KrasimirKralev

@KrasimirKralev KrasimirKralev commented May 2, 2026

Copy link
Copy Markdown
Contributor

Summary

The configure route was emitting `reasoning: false` for ClawBox AI Flash in the deepseek provider definition. OpenClaw's gateway uses that flag to gate effort-param forwarding, so on Flash:

  • The chat's Effort picker became a no-op β€” switching between Off / Low / Medium / High / Max produced a "Switched effort to X" toast but the agent kept reporting "thinking off" regardless.
  • `reasoning_effort` was never sent to DeepSeek.
  • `thinking: { type: "disabled" }` was never sent when picking Off, so users couldn't actually disable reasoning to get snappy chat.

Per OpenClaw's thinking-levels docs and built-in catalog, both V4 surfaces are thinking-capable: `deepseek-v4-flash` and `deepseek-v4-pro` are both classified as "V4 thinking-capable surface." Pro's flag was already correct; Flash was the outlier.

Verification

Direct test against the cloud API:

Payload reasoning_tokens total tokens Effect
baseline (no control) 31 44 default reasoning
`reasoning_effort: low` 19 32 reduced
`reasoning_effort: max` (per docs) (heavy) maximum depth
`thinking: { type: "disabled" }` none 12 fully disabled

The cloud honors the exact payloads OpenClaw's gateway sends β€” the flag was the only blocker.

Change

  • `reasoning: false β†’ true` for `deepseek-v4-flash`
  • Lift the explanatory comment to struct-level so it covers both Flash and Pro (a future regression on Pro's flag would now have a one-line warning sitting right next to it)
  • Comment cites the upstream behavior so future readers know why the flag matters even though Flash is "only" the cheap tier

Test plan

  • Verified manually on a Jetson: with `reasoning: true`, Effort=Off β†’ agent reports "thinking off" + responds in ~1s; Effort=High β†’ reasoning kicks in.
  • CI `test` passes (no test asserts `reasoning: false` for Flash β€” grep'd the test directory)
  • CI `e2e` passes
  • CodeRabbit review

Behavioral note

After this lands, fresh installs on Flash will start advertising the Effort picker as functional. No perf impact server-side; the gateway forwards a small extra param. The user-visible change is exactly what was missing: Effort: Off β†’ fast no-thinking responses.

Summary by CodeRabbit

  • Improvements
    • Enabled reasoning capabilities for the AI Flash model, allowing it to provide more advanced analytical and problem-solving features.

The configure route was writing `reasoning: false` for ClawBox AI
Flash, which silently suppresses OpenClaw's effort forwarding β€”
`reasoning_effort` and `thinking: { type: "disabled" }` payloads
never reach DeepSeek. The chat's Effort picker becomes a no-op: the
agent reports "thinking off" no matter which level you select.

Per OpenClaw's built-in catalog, both V4 surfaces (Flash + Pro) are
thinking-capable. Verified against the cloud API directly: sending
`thinking: { type: "disabled" }` truly disables reasoning (12 total
tokens vs 30+ baseline), and `reasoning_effort: high|max` graduates
the depth as advertised.

Flips Flash's flag to true and lifts the explanation comment to
struct level so it covers both entries β€” Pro will regress symmetric-
ally if someone flips its flag back to false in the future.
@KrasimirKralev
KrasimirKralev requested a review from a team as a code owner May 2, 2026 16:33
@coderabbitai

coderabbitai Bot commented May 2, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 340cfb02-9a6b-404c-91c8-560fe2b9e9c7

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 1de18e4 and 2179818.

πŸ“’ Files selected for processing (1)
  • src/app/setup-api/ai-models/configure/route.ts

πŸ“ Walkthrough

Walkthrough

The ClawBox AI Flash model configuration enables the reasoning flag and adds comments explaining that this setting controls whether the gateway forwards reasoning effort to DeepSeek.

Changes

AI Model Configuration Update

Layer / File(s) Summary
Model Configuration
src/app/setup-api/ai-models/configure/route.ts
ClawBox AI Flash model's reasoning flag set to true with explanatory comments on gateway forwarding behavior for reasoning effort settings.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A flag now flips from false to true,
Deep thoughts shall flow right through and through,
The gateway hops with reasoning cheer,
ClawBox Flash now thinks crystal clear! 🧠✨

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Title check βœ… Passed The title directly matches the main change: flipping the reasoning flag for deepseek-v4-flash from false to true.
Description check βœ… Passed The PR description covers the motivation, verification, and change details thoroughly, but the Type of change checkbox and some testing checkboxes remain unchecked or incomplete.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/clawai-flash-reasoning-flag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

CI Summary

βœ… Tests

  • Result: passed
  • View run
  • Coverage: statements 70.99%, branches 60.76%, functions 66.62%, lines 72.96%

βœ… E2E

βœ… E2E Install

@KrasimirKralev
KrasimirKralev merged commit aee5af2 into beta May 2, 2026
7 checks passed
@KrasimirKralev
KrasimirKralev deleted the fix/clawai-flash-reasoning-flag branch May 2, 2026 16:58
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.

1 participant