Skip to content

🐛 fix: fix deepseek-v4 thinking control UI#14117

Closed
hezhijie0327 wants to merge 1 commit into
lobehub:canaryfrom
hezhijie0327:deepseek
Closed

🐛 fix: fix deepseek-v4 thinking control UI#14117
hezhijie0327 wants to merge 1 commit into
lobehub:canaryfrom
hezhijie0327:deepseek

Conversation

@hezhijie0327

@hezhijie0327 hezhijie0327 commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

💻 Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • ✅ test
  • 📝 docs
  • 🔨 chore

🔗 Related Issue

🔀 Description of Change

  1. 修正思考模式切换 UI, 无 Auto 选项, thinking -> enableReasoning
image
Before After
image image

🧪 How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

📸 Screenshots / Videos

Before After
... ...

📝 Additional Information

@vercel

vercel Bot commented Apr 24, 2026

Copy link
Copy Markdown

@hezhijie0327 is attempting to deploy a commit to the LobeHub OSS Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. provider:deepseek labels Apr 24, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@lobehubbot

Copy link
Copy Markdown
Member

@sxjeru - This is a provider:deepseek fix for the thinking control UI. Please take a look.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9bfaf4fb9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/model-bank/src/aiModels/deepseek.ts
@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.28%. Comparing base (421427f) to head (79184ba).

Additional details and impacted files
@@            Coverage Diff             @@
##           canary   #14117      +/-   ##
==========================================
- Coverage   67.28%   67.28%   -0.01%     
==========================================
  Files        2157     2157              
  Lines      185062   185062              
  Branches    22662    19095    -3567     
==========================================
- Hits       124522   124520       -2     
- Misses      60415    60417       +2     
  Partials      125      125              
Flag Coverage Δ
app 60.08% <ø> (-0.01%) ⬇️
database 92.23% <ø> (ø)
packages/agent-runtime 79.82% <ø> (ø)
packages/context-engine 83.10% <ø> (ø)
packages/conversation-flow 92.40% <ø> (ø)
packages/file-loaders 87.02% <ø> (ø)
packages/memory-user-memory 74.74% <ø> (ø)
packages/model-bank 99.89% <ø> (ø)
packages/model-runtime 84.07% <ø> (ø)
packages/prompts 70.14% <ø> (ø)
packages/python-interpreter 92.90% <ø> (ø)
packages/ssrf-safe-fetch 0.00% <ø> (ø)
packages/utils 88.41% <ø> (ø)
packages/web-crawler 88.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Store 67.17% <ø> (ø)
Services 51.84% <ø> (ø)
Server 66.39% <ø> (-0.01%) ⬇️
Libs 52.50% <ø> (ø)
Utils 80.09% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sxjeru

sxjeru commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

When thinking.type = enabled and reasoning_effort is left empty, will it throw an error, or will it automatically select the reasoning intensity? Have you tried it?


This comment was translated by Claude.

Original Content

thinking.type = enabled,reasoning_effort 留空的情况下,是会报错,还是能自动选择推理强度?老哥有试过吗。

@hezhijie0327

Copy link
Copy Markdown
Contributor Author

默认为 High

image

ref: https://api-docs.deepseek.com/zh-cn/guides/thinking_mode


JSON_PAYLOAD=$(cat <<EOF
{
  "model": "deepseek-v4-flash",
  "messages": [
    {"role": "user", "content": "Hi"}
  ],
  "stream": true,
  "thinking": {"type": "enabled"}
}
EOF
)

curl --request POST "${API_ENDPOINT}" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $API_KEY" \
  -d "$JSON_PAYLOAD"
data: {"id":"0c9d3efa-3adc-40a3-a0f3-da4fdf5c33d9","object":"chat.completion.chunk","created":1777012052,"model":"deepseek-v4-flash","system_fingerprint":"fp_058df29938_prod0820_fp8_kvcache_20260402","choices":[{"index":0,"delta":{"role":"assistant","content":null,"reasoning_content":""},"logprobs":null,"finish_reason":null}]}

data: {"id":"0c9d3efa-3adc-40a3-a0f3-da4fdf5c33d9","object":"chat.completion.chunk","created":1777012052,"model":"deepseek-v4-flash","system_fingerprint":"fp_058df29938_prod0820_fp8_kvcache_20260402","choices":[{"index":0,"delta":{"content":null,"reasoning_content":"好的"},"logprobs":null,"finish_reason":null}]}

data: {"id":"0c9d3efa-3adc-40a3-a0f3-da4fdf5c33d9","object":"chat.completion.chunk","created":1777012052,"model":"deepseek-v4-flash","system_fingerprint":"fp_058df29938_prod0820_fp8_kvcache_20260402","choices":[{"index":0,"delta":{"content":null,"reasoning_content":","},"logprobs":null,"finish_reason":null}]}

data: {"id":"0c9d3efa-3adc-40a3-a0f3-da4fdf5c33d9","object":"chat.completion.chunk","created":1777012052,"model":"deepseek-v4-flash","system_fingerprint":"fp_058df29938_prod0820_fp8_kvcache_20260402","choices":[{"index":0,"delta":{"content":null,"reasoning_content":"用户"},"logprobs":null,"finish_reason":null}]}

@vercel

vercel Bot commented Apr 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lobehub Ready Ready Preview, Comment Apr 24, 2026 8:47am

Request Review

@tjx666

tjx666 commented Apr 24, 2026

Copy link
Copy Markdown
Member

I'll fix it.


This comment was translated by Claude.

Original Content

我修吧

@tjx666 tjx666 closed this Apr 24, 2026
@hezhijie0327 hezhijie0327 deleted the deepseek branch April 24, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

provider:deepseek size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants