Repository navigation
feat(ai): map Grok and DeepSeek reasoning effort levels - #3164
Conversation
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Please add before-and-after captures of AI Services settings showing the missing-API-key required state for OpenCode Go and xAI/Grok. Include desktop and phone-width views, or explain why mobile is unaffected, and name the captured builds. The PR currently has no Evidence section or artifacts for this visible change. Since #3148 is only partly addressed, replace |
|
The existing comment covers the missing-key UI state. The reasoning changes also add Grok and DeepSeek options to the AI Services reasoning selector; please include before-and-after captures of that control for the affected models, at desktop and phone widths (or explain why mobile is unaffected), and name the builds. The hosted transcription request change can also make those provider transcriptions succeed; show before-and-after results for the same test audio/request and identify the builds. Automated check: Macroscope check run agent (gpt-6-luna). Evidence was not reviewed for correctness. Posted via Macroscope — Visible change evidence |
|
Please add the missing
Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed. Posted via Macroscope — v1 validation impact |
There was a problem hiding this comment.
Actionable comments posted: 3

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e57827d1-2604-4c51-903d-b4bad71904df
Files selected for processing: 4-
docs/architecture/ai-provider-authentication.mdinternal/ai/llm/transcribe.gointernal/ai/reasoning/reasoning.goweb/src/pages/admin-settings/AISettings.tsx
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
9952e1f to
78291f4
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fa29124e-55ae-46d9-9ebf-3b96d6455447
Files selected for processing: 2-
docs/architecture/ai-provider-authentication.mdweb/src/pages/admin-settings/AISettings.tsx
Files skipped from review as they are similar to previous changes: 1-
- docs/architecture/ai-provider-authentication.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
-
78291f4 to
b31fe8c
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
b31fe8c to
1ca8215
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
1ca8215 to
d1bef3d
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
d1bef3d to
1387c40
Compare
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
|
Updated the description with an Evidence section and a Reasoning levels: OpenCode Go transcription: the failure is not in Missing-key state: the |
Silo treats both families as custom models, so AI Settings offers all seven effort levels and sends the selected one as reasoning_effort, including levels these APIs do not accept. Grok 4.5, 4.6 and 4.7 offer low, medium, high and xhigh; earlier grok-4 names offer low, medium and high; DeepSeek offers low, high and max. xAI documents that reasoning cannot be disabled and DeepSeek switches thinking off through its thinking parameter rather than through reasoning_effort, so neither family offers none. Unlisted names keep the configurable vocabulary. temperature is unchanged for both families: Grok accepts it, and DeepSeek ignores it in thinking mode without returning an error. No transcription host is added. The OpenCode Go gateway answers 404 on /v1/audio/transcriptions and lists no speech model, so omitting vad_filter there would not make transcription work.
1387c40 to
3b53290
Compare
Quick104
left a comment
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
Review of 3b53290. The Grok 4.5–4.7 levels and the DeepSeek V4 levels match the xAI and DeepSeek reasoning guides. Two catch-all prefixes reach models those guides don't cover, the new docs section doesn't belong in docs/architecture/ and gets one behavior wrong, and two added tests check code this PR doesn't change. Details are inline. I'm fixing all four in a commit on this branch, so there's no need to change anything yourself.
Maintainer decision (no action needed from the author): after an upgrade, a stored ai.reasoning_effort that the narrower lists reject makes every chat request fail at internal/ai/llm/client.go:141, before anything reaches the provider. The clearest case is deepseek-v4.1-flash with medium: DeepSeek accepts it today and maps it to high, and this PR rejects it. Subtitle translation and other AI jobs then fail until an admin picks a new level. The AI Services page marks the stored value as unsupported. An unrelated settings save is not blocked, because validation is scoped to the setting groups a save touches.
The grok-4 catch-all gave grok-4.3 and grok-4.20 names levels xAI does not document for them and dropped xhigh for grok-4.20-multi-agent. The deepseek prefix applied DeepSeek's own API levels to deepseek-named models on other hosts, removing "none" for Ollama's deepseek-r1. Both now keep the custom vocabulary; only grok-4.5 to 4.7 and DeepSeek V4 names are narrowed. Drop the provider setup section from the architecture doc (it belongs in the user manual and misdescribed when temperature is omitted) and two test additions that cover unchanged code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
| case strings.HasPrefix(model, "deepseek-v4"), strings.HasPrefix(model, "deepseek-flash"): | ||
| return []string{levelLow, levelHigh, levelMax} |
There was a problem hiding this comment.
Existing DeepSeek settings become invalid after upgrade
Previously accepted DeepSeek V4 efforts such as medium and xhigh now cause chat requests and unrelated settings updates to fail. Preserve or migrate existing configurations before enforcing the narrower list.
Prompt for LLM
File internal/ai/reasoning/reasoning.go, lines 75-76:
Existing DeepSeek settings become invalid after upgrade
Existing DeepSeek V4 configurations with a previously accepted effort such as `medium` or `xhigh` now fail every chat request, and validation of the complete settings snapshot also rejects unrelated settings updates. Preserve or migrate existing valid configurations before enforcing the narrower list.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
🤖 Claude Code (claude-opus-5-5)
The chat-request half is real, and it's already listed in the PR body's Risks section. Whether to accept it or keep DeepSeek's alias levels valid is open for the maintainers, so this branch doesn't change it yet.
Unrelated settings updates are not affected. Both save paths build the validation snapshot from defaults plus the changed keys' dependency groups (adminSettingsValidationSnapshot in internal/api/handlers/admin.go). A stored ai.reasoning_effort is only checked when a save touches ai.chat_model, subtitle_ai.chat_model or ai.reasoning_effort.
There was a problem hiding this comment.
I agree with the correction: the suggestion is valid for chat requests, but not for unrelated settings updates.
Chatvalidates the configured model and effort before sending the request, so an existing DeepSeek configuration usingmediumorxhighwill fail locally after the upgrade (internal/ai/llm/client.go:135–143).- The settings snapshot includes the stored model-and-effort dependency group only when a member of that group is changed (
internal/api/handlers/admin.go:1293, 1317–1348). An unrelated settings save is therefore not blocked by that stored value.
The remaining question is whether the documented disruption is acceptable or whether to preserve compatibility—for example, by migrating DeepSeek’s medium and xhigh aliases to high, or by accepting those aliases for existing configurations while keeping them out of the selector. Any migration should account for other rejected values separately; not all necessarily have an equivalent supported level.
|
🤖 Claude Code (claude-opus-5-5) Review summaryReviewed head: Addressed in c99fb0f
Left for maintainers
Verification
Validated features: not checked. The validation board query wasn't available to this review. User manual: unaffected. The AI Services page says Silo lists only the levels a recognized model supports, which stays true. Its advice to set None for local models still works for Ollama's Other clients: the levels are data the web AI Services page renders. Apple, Android and Roku have no AI settings screen, so the PR's Fit: 8/10 · Readiness: 8/10 — conditional (assuming CI is green) Fit: it corrects the reasoning options Silo offers for two widely used provider families, using the pattern |
Problem
Related issue: #3148
Validation tasks: none
Other clients: Apple N/A (no client-visible change); Android N/A (no client-visible change); Roku N/A (no client-visible change)
Silo treats Grok and DeepSeek models as custom models, so AI Settings offers all
seven reasoning effort levels for them and sends the selected level verbatim as
reasoning_effort, including levels those APIs do not accept.This change gives the two families the levels their documentation lists.
Approach
ForModelgains two cases.grok-4.5,grok-4.6andgrok-4.7get low, medium,high and xhigh. DeepSeek's V4 API names (
deepseek-v4*,deepseek-flash) get low,high and max. xAI documents that reasoning cannot be disabled on those Grok models
and that
grok-4.5treatsxhighashigh. DeepSeek turns thinking off throughits
thinkingparameter rather thanreasoning_effort, and mapsmediumandxhighontohigh, so only its real levels are offered.Every other model name keeps the seven-level custom vocabulary. That includes
grok-4.3and thegrok-4.20models, which xAI documents with different or nolevels, and deepseek-named models served by other hosts (Ollama's
deepseek-r1,OpenRouter's
deepseek/...), whose effort values differ from DeepSeek's API.Ollama, for example, uses
noneto turn thinking off.OmitTemperatureis unchanged.Scope: reasoning levels only. No provider registry, provider type, client or
frontend code changes, and no docs change; OpenCode Go and xAI stay reachable
through the existing OpenAI-compatible endpoint fields. The xAI OAuth (SuperGrok)
sign-in from #3148 is tracked separately and is not part of this PR.
Parity: the option list is data returned by
GET /admin/ai/capabilities, and the onlysurface that renders it is the web admin AI Services page. The Apple, Android and Roku
clients have no AI settings screen and no reference to
reasoning_effortor thatendpoint, so none of them needs a change or a parity issue for this PR.
Validation
go test -count=1 ./internal/ai/...passes, all five packages;make lint-changedreports no issues.
TestThirdPartyModelCapabilitiesfails on the merge base and passes here. Itsgrok-4.20-multi-agent-0309anddeepseek-r1:8brows also fail on the PR's firstcommit, whose catch-all
grok-4anddeepseekcases narrowed those models.published docs.
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-3164/
The option list is
reasoning_levelsfromGET /admin/ai/capabilities?model=<model>,rendered by the reasoning level selector in Admin → Settings → AI Services.
reasoning.ForModelbefore and after this PR:"All seven" is
["none","minimal","low","medium","high","xhigh","max"]. There is noscreen capture: the selector renders whatever list the endpoint returns, at every width.
Risks
A deployment that already stores a reasoning level the narrower lists reject, such as
mediumondeepseek-v4.1-flashornoneongrok-4.5, fails its AI chat requestsafter the upgrade until an admin picks a supported level. The AI Services page marks
the stored value as unsupported. Saves of unrelated settings are not affected.
Checklist
AI Disclosure
had a human review outside them.
checked against docs.x.ai and api-docs.deepseek.com, and against live route
probes; that review corrected the sets, removed the retired Grok cases and
dropped the OpenCode Go transcription entry.
Note
Add Grok and DeepSeek reasoning effort levels to
reasoning.ForModelExtends the capability lookup in reasoning.go with effort levels for new model prefixes. Grok 4.5–4.7 models return low, medium, high, and extra-high; deepseek-v4 and deepseek-flash return low, high, and max. Other model names keep the existing levels or the configurable default.
Adds table-driven test cases for the new prefixes in reasoning_test.go, checking both
ForModellevels andValidateacceptance.Macroscope summarized c99fb0f.