Skip to content

feat(ai): map Grok and DeepSeek reasoning effort levels - #3164

Merged
Quick104 merged 2 commits into
Silo-Server:mainfrom
apoapostolov:feat/ai-providers-opencode-grok
Nov 14, 2026
Merged

Quick104 merged 2 commits into
Silo-Server:mainfrom
apoapostolov:feat/ai-providers-opencode-grok

Conversation

@apoapostolov

@apoapostolov apoapostolov commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

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

ForModel gains two cases. grok-4.5, grok-4.6 and grok-4.7 get 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.5 treats xhigh as high. DeepSeek turns thinking off through
its thinking parameter rather than reasoning_effort, and maps medium and
xhigh onto high, so only its real levels are offered.

Every other model name keeps the seven-level custom vocabulary. That includes
grok-4.3 and the grok-4.20 models, which xAI documents with different or no
levels, 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 none to turn thinking off.

OmitTemperature is 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 only
surface 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_effort or that
endpoint, 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-changed
    reports no issues.
  • TestThirdPartyModelCapabilities fails on the merge base and passes here. Its
    grok-4.20-multi-agent-0309 and deepseek-r1:8b rows also fail on the PR's first
    commit, whose catch-all grok-4 and deepseek cases narrowed those models.
  • Not tested live against xAI, DeepSeek or Ollama; the level sets come from their
    published docs.

Evidence

Evidence: https://evidence.siloserver.org/r/silo-server/pr-3164/

The option list is reasoning_levels from GET /admin/ai/capabilities?model=<model>,
rendered by the reasoning level selector in Admin → Settings → AI Services.
reasoning.ForModel before and after this PR:

model                       before (main)   after
grok-4.5 / grok-4.7         all seven       ["low","medium","high","xhigh"]
grok-4.3, grok-4.20-*       all seven       all seven
deepseek-v4.1-flash         all seven       ["low","high","max"]
deepseek-flash              all seven       ["low","high","max"]
deepseek-r1:8b (Ollama)     all seven       all seven
llama-3.3-70b               all seven       all seven

"All seven" is ["none","minimal","low","medium","high","xhigh","max"]. There is no
screen 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
medium on deepseek-v4.1-flash or none on grok-4.5, fails its AI chat requests
after 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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or says there is none.

AI Disclosure

  • Harness: Hermes Agent
  • Tool(s): terminal, gh CLI
  • Model(s): deepseek-v4.1-flash; review fixes (c99fb0f) by Claude Code (claude-opus-5-5)
  • Involvement: AI-assisted. The branch was produced in agent sessions and has not
    had a human review outside them.
  • Adversarial review: the provider level sets and the transcription host were
    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.ForModel

Extends 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 ForModel levels and Validate acceptance.

Macroscope summarized c99fb0f.

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 27, 2026
@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The documentation adds OpenCode Go and xAI/Grok provider details. Runtime changes add OpenCode host handling for transcription and reasoning-level and temperature rules for Grok and DeepSeek models.

Changes: Provider compatibility

Layer / File(s) Summary
Provider capabilities
internal/ai/reasoning/reasoning.go, internal/ai/llm/transcribe.go, docs/architecture/ai-provider-authentication.md
Reasoning selection now includes Grok and DeepSeek models, and temperature omission applies to both model families. Transcription requests to opencode.ai omit vad_filter. The documentation describes provider endpoints, authentication, model defaults, reasoning support, and planned xAI OAuth.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related PRs

Suggested labels: impact: usability

Merge Risk: Low · up to 1ca82

Translation requests using Grok 4.5 with reasoning set to none may fail; another effort level is available. The remaining risk is bounded, but the unsupported option should be removed.

Security architecture risk: Low · up to 78291

The change reuses existing provider connections and does not demonstrate a new authorization bypass or wider credential access. Risk is low, but incomplete security coverage and differences between documented and implemented provider support limit confidence.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The demonstrated behavioral scope is requests using matching configured hosts or model names. Prompts, audio, and configured credentials continue through existing external-provider request paths. The inspected changes do not establish additional tenant reachability, privileges, or downstream credential inheritance; deployment-specific exposure remains unverified.

Trust Boundaries and Controls

  • observed — The hosted-provider suffix lists are compatibility and readiness classifications, not network allowlists or server-side authorization controls. In particular, the unused frontend helper cannot enforce an API-key requirement. The backend request builders retain their existing behavior of omitting Authorization when no key is configured.

Resilience and Maintainability Implications

  • observed — The existing transcription parser rejects missing timed segments and invalid nonempty segment timestamps instead of accepting them as a successful transcription. This preserves the inspected response-validation boundary, but does not prove that the newly documented providers satisfy the required response contract.
Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Linked Issues check Warning Issue #3148 is open and directly linked, so its coding requirements apply. The PR documents OpenCode Go with the requested endpoint, model, and API-key authentication. It adds Grok and DeepSeek reason… Implement the remaining #3148 SuperGrok OAuth and settings requirements: add device authorization and polling, token persistence and refresh, filtered model retrieval, the xai-oauth auth mode, the SuperGrok connection tile and model picke…
Passed Passed checks: 3 passed

Check name Status Explanation
Out of Scope Changes check Passed The changed files support issue #3148. The documentation records the requested OpenCode Go and xAI/Grok endpoints, models, and authentication. The transcription change supports the documented OpenCode…
Title check Passed The title "feat(ai): map Grok and DeepSeek reasoning effort levels" matches the main change in the changeset. The reasoning.go diff adds ForModel cases that assign supported reasoning levels for grok-…
Description check Passed The description is related to the changeset. It explains that Silo treats Grok and DeepSeek as custom models, so AI Settings offers all seven reasoning effort levels, and that the change narrows them …
Full details: Out of Scope Changes check

Explanation

The changed files support issue #3148. The documentation records the requested OpenCode Go and xAI/Grok endpoints, models, and authentication. The transcription change supports the documented OpenCode Go host. The reasoning changes support Grok and DeepSeek models for the requested provider compatibility. The planned OAuth documentation is directly related to the linked issue. No unrelated product behavior is shown.

Full details: Title check

Explanation

The title "feat(ai): map Grok and DeepSeek reasoning effort levels" matches the main change in the changeset. The reasoning.go diff adds ForModel cases that assign supported reasoning levels for grok-4, grok-3, grok-2, and deepseek, and the PR description centers on this mapping. The title is concise and specific. It does not mention the transcription host or documentation changes, which the PR objectives also cover, but the title does not need to cover every detail.

Full details: Description check

Explanation

The description is related to the changeset. It explains that Silo treats Grok and DeepSeek as custom models, so AI Settings offers all seven reasoning effort levels, and that the change narrows them to the levels each documentation lists. It names the affected function (reasoning.ForModel), lists the model families and levels, gives validation results, and notes the deliberate scope limits (no OAuth, no provider registry changes, no docs change). The description also mentions the OpenCode Go and xAI endpoint routing, which the raw summary lists under the docs and transcribe.go changes. That mismatch is worth noting but does not make the description off-topic.

Full details: Linked Issues check

Explanation

Issue #3148 is open and directly linked, so its coding requirements apply. The PR documents OpenCode Go with the requested endpoint, model, and API-key authentication. It adds Grok and DeepSeek reasoning mappings and omits temperature for those models. It does not implement the required SuperGrok OAuth device flow, token storage or refresh, model catalog retrieval, xai-oauth auth mode, connection tile and model picker, or xai/xai-oauth recommended-family pairing. The whole-PR diff also contains no AISettings.tsx change for the requested KEY_REQUIRED_HOSTS entries. No automated tests cover the new reasoning or transcription behavior.

Resolution

Implement the remaining #3148 SuperGrok OAuth and settings requirements: add device authorization and polling, token persistence and refresh, filtered model retrieval, the xai-oauth auth mode, the SuperGrok connection tile and model picker, and recommended-family pairing. Add the required hosted-provider key detection for opencode.ai and api.x.ai if the current settings architecture still requires it. Add automated tests for the new reasoning, temperature omission, host detection, and strict ASR behavior.

Finishing Touches

🧪 Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent 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: 03510173-f6ea-4e8f-9ded-93817e1023a0
Commits

Reviewing files that changed from the base of the PR and between b31fe8c and 1ca8215.

Files selected for processing: 1

  • docs/architecture/ai-provider-authentication.md
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.

@silo-triage silo-triage Bot added documentation Improvements or additions to documentation enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code priority: P2 Limited scope, workaround exists, or polish labels Oct 27, 2026
@silo-triage

silo-triage Bot commented Oct 27, 2026

Copy link
Copy Markdown

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 Closes #3148 (partial) with Related issue: #3148 so merging this PR does not close the remaining work.

@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown

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

@coderabbitai coderabbitai Bot added javascript Pull requests that update javascript code size/M 50–199 added + deleted lines (all files); change volume, not priority. labels Oct 27, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 27, 2026

Copy link
Copy Markdown

Please add the missing Validation tasks: line. The relevant AI-generated-subtitles tasks—silo-server #1164/#1165/#1166, silo-apple #317/#318, and silo-android #327/#328—currently record only Not run, so this PR invalidates or unblocks no recorded result. Add:

Validation tasks: none

Automated check: Macroscope check run agent (gpt-6-luna). No validation was performed.

Posted via Macroscope — v1 validation impact

@coderabbitai coderabbitai 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.

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
Commits

Reviewing files that changed from the base of the PR and between 62b1a6e and c5f295e.

Files selected for processing: 4
  • docs/architecture/ai-provider-authentication.md
  • internal/ai/llm/transcribe.go
  • internal/ai/reasoning/reasoning.go
  • web/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.

Comment thread internal/ai/llm/transcribe.go Resolved
@silo-triage silo-triage Bot removed the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 27, 2026
@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌
⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Preserve optional store capabilities through production wrappers
  • Detach mandatory cleanup from request cancellation and bound its lifetime

@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from 9952e1f to 78291f4 Compare October 27, 2026 20:11
@silo-triage silo-triage Bot added the size/M 50–199 added + deleted lines (all files); change volume, not priority. label Oct 27, 2026
@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot removed the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Oct 27, 2026
@coderabbitai coderabbitai Bot added the impact: usability Core flow broken or severely blocked label Oct 27, 2026

@coderabbitai coderabbitai 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.

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
Commits

Reviewing files that changed from the base of the PR and between 9952e1f and 78291f4.

Files selected for processing: 2
  • docs/architecture/ai-provider-authentication.md
  • web/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.

@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from 78291f4 to b31fe8c Compare October 27, 2026 20:31
@silo-triage silo-triage Bot added size/S 0–49 added + deleted lines (all files); change volume, not priority. and removed size/M 50–199 added + deleted lines (all files); change volume, not priority. labels Oct 27, 2026
@silo-kody

silo-kody Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from b31fe8c to 1ca8215 Compare October 28, 2026 06:20
@silo-kody

silo-kody Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@coderabbitai coderabbitai Bot removed the javascript Pull requests that update javascript code label Oct 28, 2026
@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from 1ca8215 to d1bef3d Compare October 28, 2026 06:26
@silo-triage silo-triage Bot added size/M 50–199 added + deleted lines (all files); change volume, not priority. and removed size/S 0–49 added + deleted lines (all files); change volume, not priority. labels Oct 28, 2026
@silo-kody

silo-kody Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@apoapostolov apoapostolov changed the title feat(ai): add OpenCode Go and xAI/Grok as known compatible providers feat(ai): map Grok and DeepSeek reasoning levels, mark opencode.ai a hosted ASR endpoint Oct 28, 2026
@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from d1bef3d to 1387c40 Compare October 28, 2026 14:37
@silo-kody

silo-kody Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@apoapostolov apoapostolov changed the title feat(ai): map Grok and DeepSeek reasoning levels, mark opencode.ai a hosted ASR endpoint feat(ai): map Grok and DeepSeek reasoning effort levels Oct 28, 2026
@apoapostolov

Copy link
Copy Markdown
Contributor Author

Updated the description with an Evidence section and a Validation tasks: none line, and corrected two things the captures would have shown as intended behaviour.

Reasoning levels: none is gone for Grok and DeepSeek, xhigh is offered for grok-4.5/4.6/4.7 and max for DeepSeek, per docs.x.ai and api-docs.deepseek.com. The retired grok-2/grok-3 cases are removed rather than mapped to levels no live endpoint can confirm. OmitTemperature no longer drops temperature for Grok, which accepts it.

OpenCode Go transcription: the failure is not in vad_filter. POST https://opencode.ai/zen/go/v1/audio/transcriptions answers 404 with and without a key as of today, and GET /zen/go/v1/models lists no speech model, so the strictHostedASRHosts entry and its documentation line are removed. There is no before-and-after transcription result to capture for that host.

Missing-key state: the AISettings.tsx change is no longer in this PR, so there is no key-readiness surface to capture. Desktop captures of the reasoning selector will follow from a source build; the selector is the same component at phone width and only its data changed.

@coderabbitai coderabbitai Bot mentioned this pull request Oct 30, 2026
4 tasks done
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.
@apoapostolov
apoapostolov force-pushed the feat/ai-providers-opencode-grok branch from 1387c40 to 3b53290 Compare November 13, 2026 12:12

@Quick104 Quick104 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.

🤖 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.

Comment thread internal/ai/reasoning/reasoning.go Resolved
Comment thread internal/ai/reasoning/reasoning.go Resolved
Comment thread internal/ai/reasoning/reasoning_test.go Resolved
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-triage silo-triage Bot added size/S 0–49 added + deleted lines (all files); change volume, not priority. and removed size/M 50–199 added + deleted lines (all files); change volume, not priority. labels Nov 14, 2026
@silo-kody

silo-kody Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

Comment on lines +75 to +76
case strings.HasPrefix(model, "deepseek-v4"), strings.HasPrefix(model, "deepseek-flash"):
return []string{levelLow, levelHigh, levelMax}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

kody code-review Bug high

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.

​

​

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.

🤖 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I agree with the correction: the suggestion is valid for chat requests, but not for unrelated settings updates.

  • Chat validates the configured model and effort before sending the request, so an existing DeepSeek configuration using medium or xhigh will 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.

Comment thread internal/ai/reasoning/reasoning.go Resolved
@Quick104

Copy link
Copy Markdown
Contributor

🤖 Claude Code (claude-opus-5-5)

Review summary

Reviewed head: c99fb0f27 (the contributor's 3b53290df plus one review fix commit; no rebase).

Addressed in c99fb0f

  • The grok-4 catch-all is gone. grok-4.3 and the grok-4.20 models keep the custom vocabulary, so grok-4.20-multi-agent gets xhigh back.
  • DeepSeek levels apply only to DeepSeek's V4 API names (deepseek-v4*, deepseek-flash). Ollama's deepseek-r1 and OpenRouter's deepseek/... keep the custom vocabulary, including none.
  • The provider setup section is removed from docs/architecture/ai-provider-authentication.md. It is operator guidance, and its temperature paragraph contradicted reasoning.OmitTemperature.
  • TestOmitTemperature and the api.x.ai VAD row are removed. Both pass on the base and test code this PR doesn't change.

Left for maintainers

  • A deployment that already stores a level the new lists reject (for example medium on deepseek-v4.1-flash, which DeepSeek accepts and maps to high) fails its AI chat requests at internal/ai/llm/client.go:141 after the upgrade, until an admin picks a supported level. The PR body's Risks section now says so. Whether to accept that or keep DeepSeek's accepted aliases valid is a maintainer call.

Verification

  • TestThirdPartyModelCapabilities fails on the merge base and passes here. The fix's grok-4.20-multi-agent-0309 and deepseek-r1:8b rows fail on 3b53290df.
  • go test ./internal/ai/... passes, and make lint-changed reports no issues.
  • Level sets were checked against the xAI reasoning guide, DeepSeek's thinking-mode guide and Ollama's OpenAI-compatibility page. Nothing was sent to those providers live.
  • A cross-provider review (Codex, gpt-6.1-sol) ran on 3b53290df. It confirmed the four findings above and raised the stored-level upgrade case.
  • Evidence: https://evidence.siloserver.org/r/silo-server/pr-3164/

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 deepseek-r1 after this fix.

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 N/A lines hold.

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 ForModel already follows for OpenAI models. The cost is another name-keyed list to keep current as xAI and DeepSeek ship models.
Readiness: the code is small and a test that failed on the base backs it. The open condition is the upgrade behavior for stored levels described above.

@Quick104
Quick104 merged commit c16f789 into Silo-Server:main Nov 14, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request evidence-required Needs before-and-after evidence before the Evidence check passes go Pull requests that update go code impact: usability Core flow broken or severely blocked priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants