mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4327] [Engine] DeepSeek: send the medium effort to the template as 62 #5009
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5009
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4327
Author: @nayuta-yanagisawa
Created: 10/27/2026
Status: 🔄 Open
Base:
main← Head:engine-deepseek-effort-medium📝 Commits (1)
2fb2b59serve: DeepSeek's medium effort goes to the template as 62📊 Changes
2 files changed (+26 additions, -6 deletions)
View changed files
📝
serve/frontend.py(+6 -4)📝
serve/test_dsv41.py(+20 -2)📄 Description
Problem and result
DeepSeek-V4.1's effort words are low, high and max, or a number from 1 to 100.
mediumcomes from Unsloth's template (the fixture inserve/fixtures/deepseek41), which maps it to 62. The server passed the wordmediumto the template as it was.ISTA's shard 1 of 2026-10-26, which setup accepts since
94d7aab2, carries a template with DeepSeek's three words only, andpick_templatekeeps it. On a pack built from it, every request that asks for medium fails with HTTP 400:This covers
reasoning_effort,output_config.effort,reasoning.effortand an Anthropic thinking budget of 2K to 8K tokens. When the config or the shared Chat settings say medium, every request that names no effort fails too.With this change, medium reaches the template as 62. The fixture template renders the same prompt as before.
Related discussion
None. This is a focused fix.
Approach
EFFORT_DEEPSEEKmapsmediumto 62, andbudget_efforttakes medium from that table. The rest of the server treats"medium"and62alike. Qwen is unchanged.pick_templatecould swap out templates without medium instead, but it only decides how tool calls are spelled. The server already maps the API's words to the template's values, so the fix goes there.Validation
Passed:
python -m unittest serve.test_dsv41 serve.test_effort_paths serve.test_responseson5e8a4ccawith this change (Linux, Python 3.14): 116 tests, OK. The new test serves the fixture template with medium removed and sends medium over Chat Completions and over Messages (budget 4000). It fails with HTTP 400 without the change, and passes with it.DSV41_NEW_SHARD1(I read only its first 16 MB, so the SHA-256 was not checked). Its template is identical to theirchat_template.jinja, andpick_templatekeeps it. After the change it rendersReasoning Effort: 62for medium. Every other effort word, the numbers 1, 40 and 100, and the thinking-off words render the same prompt with this template as with the fixture."medium"and for 62.Failed:
servesuite on2fb2b59a: 1,218 tests, 1 failure (test_server.GpuChoice.test_hip_ordinal), which fails the same way without this change.Not run:
serve/only.Limits
On DeepSeek the server now always sends 62 for medium, so a template's own value for medium is not used. 62 is Unsloth's value, not DeepSeek's.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.