You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(requests): let a requester or approving admin choose a request router plugin's settings - #4040
A request reaches its download server with the settings an admin saved on that server, or a routing rule's. Which quality profile or folder a title gets can only be decided in advance, per server or per rule. A requester can't ask for a different profile, and an admin approving a request can't set one for that request. This matters to anyone whose one Radarr or Sonarr serves several uses.
This change lets a request router plugin declare settings that can be chosen per request. The admin decides per server whether the saved value, the requester, or the approving admin chooses. It needs the manifest field from Silo-Server/silo-plugin-sdk#67.
Approach
A plugin lists config fields in request_router.requester_options. Each entry is a select and a second select in the same form where the admin says who chooses: the saved value, the requester, or the admin on approval.
listRequestOptions and listAdminRequestOptions return the choices the plugin's ListConfigOptions reports for the server the request would go to. createRequest and adminApproveRequest take the picks as options. Each list comes with an offer that goes back as options_offer, so picks made from a list the server no longer offers are refused.
A pick is refused unless the plugin listed that value for that server. Picks are stored on the request (requester_choices, new migration) and set in the server's config at submission, over its own values and a route's.
request_options_supported on the request status tells clients whether the server offers this.
Web: selects in the request dialog and the seasons dialog, a dialog on approval, and the picks as columns in the admin request queue. The queue shows one server row when both qualities are one download.
Affected: internal/requests, internal/apiv2 (OpenAPI, web types, fixtures), web, one migration.
Validation
golangci-lint v2.12.2 (the CI version) on the branch: 0 issues.
Go tests for internal/requests, internal/plugins, internal/api: pass.
Full internal/apiv2 suite: pass in a Linux container (golang:1.26). It crashes on SQLite open on my machine, and does so on a clean origin/main too.
Postgres: the migration applies cleanly to an empty database, and the request DB tests pass, including the new one for the requester_choices column.
Web tsc, eslint, prettier and the request and admin tests: pass.
Evidence
How I checked it, by hand in the web UI against a Seerr with one Radarr and one Sonarr, on this commit (304f6a166):
Requester chooses: the profile (and folder) set to "requester". The request dialog offered the server's profiles and folders, and the request was sent with the pick.
Default: with nothing picked, the request used the server's saved setting.
Admin chooses on approval: the setting set to "admin on approval". The approval dialog offered the choices, and the approved request used the admin's pick.
The admin queue showed the picks as columns.
Surface and build: web request dialog, seasons dialog, approval dialog and admin request queue; commit 304f6a166.
Settings:
Users chooses on request:
Admin chooses on approval:
Risks
go.mod replaces silo-plugin-sdk with a fork commit that carries the new manifest field. It must become a released SDK version before this can merge.
A new migration adds a requester_choices column to media_requests.
Clients that don't know request options ignore the field and use the saved settings.
With requester chosen, everyone who may request sees the choices, including folder paths. The admin turns this on per setting.
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 how I checked a change nobody sees.
AI Disclosure
Harness: Claude Code
Tool(s): Claude Code
Model(s): claude-fable-5-2 (code), claude-sonnet-5-5 (lint fixes, the Postgres test and this description)
Involvement: Fully AI-generated, human verified
Adversarial review: n/a
Note
Add requester-selectable request router options to media requests
Request router plugins can declare requester-selectable settings. Requesters pick them when creating a request, and approving admins can pick or change them at approval time (requester_options.go, router_seasons.go).
New v2 endpoints list the offered options: GET /api/v2/requests/options/{media_type}/{tmdb_id} and GET /api/v2/admin/requests/{id}/options. The request status endpoint now advertises request_options_supported (request_options.go, openapi.json).
Picks are validated against a SHA-256 offer token and stored in a new non-null requester_choices JSONB column on media_requests; picks are applied to router connection config at submission without changing the saved server config (repository.go, 20261111012048_request_requester_choices.sql).
…server settings
A request reaches its download server with the settings an admin saved on
the server, or a routing rule's. Which quality profile or folder a title
gets could only be decided in advance, per server or per rule. A
requester could not ask for a different profile, and an admin approving
a request could not set one for that request.
A request router plugin can now declare config fields that may be chosen
per request (request_router.requester_options in its manifest), each
with a select in which the admin says per server who chooses: the saved
value, the requester, or the admin when approving.
- listRequestOptions and listAdminRequestOptions return the choices the
plugin's ListConfigOptions reports for the server the request would go
to. createRequest and adminApproveRequest take the picks as options.
- A pick is refused unless the plugin listed that value for that server.
Picks are stored on the request (requester_choices) and set in the
server's config at submission, over its own values and a route's.
- Web: selects in the request dialog and the seasons dialog, a dialog on
approval, and the picks as columns in the admin request queue. The
queue shows one server row when both qualities are one download.
go.mod replaces silo-plugin-sdk with a fork commit that carries the new
manifest field. It has to become a released SDK version before this can
merge.
Not run: golangci-lint, and the Postgres-backed tests, so the new column
and SetPendingRequesterChoices are untested against a database. Follow-ups
not opened yet: silo-apple, silo-android and the user manual.
AI disclosure: written with Claude Fable 5.2 in Claude Code. The focused
Go tests, the v2 contract checks and the request web tests pass locally;
checked by hand in the web UI against a Seerr with one Radarr and one
Sonarr.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ings
Add a Postgres test for the requester_choices column and
SetPendingRequesterChoices: choices are stored on create, replaced while
the request is pending, and refused once it is approved or missing. The
test is listed in scripts/ci/db-contracts.txt so the go-db-pins job runs
it instead of skipping it.
Fix the findings golangci-lint reported on the changed lines: a
misspelling, an fmt.Errorf that should be errors.New, an unused test
variable, and an error from json.Marshal that cannot occur because the
value holds only strings. encodeRequesterChoices now returns the bytes
alone.
AI disclosure: written with Claude Sonnet 5.5 in Claude Code. Lint reports
0 issues; the request tests pass, as does the full internal/apiv2 suite in
a Linux container; the new test passes against Postgres.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
The pull request adds request-option listing and selection to the v2 API and web client. The backend validates and stores requester and approver choices, then applies eligible choices during fulfillment. The admin queue supports approval choices and displays selected options.
The API contracts and documentation describe option offers, submitted choices, and capability support. Plugin capability lookup provides admin field labels for declared options. Fixtures and route data include the new response fields and endpoints. go.mod adds a plugin SDK replacement.
API endpoints and response mapping internal/apiv2/*, internal/api/handlers/requests.go, internal/apiv2/router.go
The v2 API adds requester and admin option-list endpoints, request and approval option fields, response conversions, and request-status capability reporting.
Option resolution, persistence, and fulfillment internal/requests/*, migrations/sql/*, scripts/ci/db-contracts.txt
The service resolves and validates requester and admin choices, stores them with requests and approvals, and applies eligible choices during fulfillment. The migration adds a JSONB column. Database and service tests cover option validation and stored choices.
The web client loads options and displays selectors in movie and season request flows. It sends valid selections with their offer token. Tests cover default handling and dialog submission.
Admin approval and queue display web/src/api/v2/adminRequests.ts, web/src/hooks/queries/admin/requests.ts, web/src/pages/admin-requests/*, web/src/pages/AdminRequests.v2.test.tsx
The admin queue loads approval options and presents them for confirmation. The queue and request detail display selected options and deduplicated targets. Tests cover approval and queue helpers.
Request and approval choices are now bound to the offer the user saw, so a routing or label change is rejected instead of being applied silently. Two small items remain: the user-manual follow-up should be confirmed as linked, and an admin whose approval choices went stale has to reopen the approval dialog manually. Neither blocks merging.
Security architecture risk: Moderate · up to cd3df
Selections are constrained by server-provided choices and administrator permissions. However, queued or retried requests can retain selections after the destination or meaning of a choice changes, potentially applying a different folder or profile than originally selected.
Retained concerns
Medium · security · inferred: Queued selections lose their offer identity before fulfillment. Stored choices contain an integration ID and raw values, but that integration can be repointed or rebound without changing its ID. Ordinary approval and retries can subsequently apply those values without checking the original destination incarnation or choice mapping. A previously selected identifier or path can therefore be interpreted differently and override the destination's current saved settings. Admin-only configuration edits, chooser rechecks and expected downstream value validation limit exposure, but do not establish protection against valid identifiers being remapped. The persisted requester-controlled override path is introduced by this PR.
Security review details
Security Blast Radius
inferred — The identified exposure concerns stored picks on pending or retried requests associated with a changed integration. Multiple queued requests using that integration could inherit the changed interpretation. The inspected application code modifies a per-submission configuration copy, not the saved server configuration; changing the integration itself requires administrator authority.
Security Findings and Attack Paths
inferred — An eligible requester can save a currently valid nondefault selection. If the integration is later repointed or a choice identifier is reassigned while the request waits, ordinary approval or recovery can replay the stored value over current settings. Submission-time token checks do not cover this later transition. Downstream rejection of unknown values is useful counterevidence, but protection against valid remapped identifiers remains unestablished.
Trust Boundaries and Controls
observed — Administrator listing and approval operations use ClassActingAdmin, whose gate requires acting-admin authorization. Both service methods also reject non-admin viewers. The ordinary requester operation is profile-scoped and obtains its identity from the authorized request context.
observed — The new web listing does not need an explicit profileContext argument to send the active profile. Its shared session transport adds profile and PIN headers. The inspected source therefore does not support the supplied allegation that this call omits profile identity.
Resilience and Maintainability Implications
observed — Approval status, selected values and the status event share one guarded transaction, preventing competing approvals from storing a loser's picks. Post-commit submission reuses the existing lease, backoff and recovery flow. Cancellation and decline remain guarded against withdrawing work already submitted; partial fulfillment records missing qualities as failures for later recovery.
Hardening Proposals
proposed — Persist a destination generation and relevant choice identity with selections. Before deferred fulfillment, detect endpoint rebinding or choice remapping and require explicit reselection or another defined recovery policy rather than silently interpreting the old value under new settings.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: request router plugin settings that a requester or approving admin can choose per request. The changeset adds requester/approver option offers, validation, storage, AP…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is specific and on-topic. It explains the problem (requesters and approving admins cannot choose per-request router settings such as quality profile or folder), the approach (plugin-de…
Full details: Title check
Explanation
The title names the main change: request router plugin settings that a requester or approving admin can choose per request. The changeset adds requester/approver option offers, validation, storage, API endpoints, and web UI for this. The title uses the conventional commit form and is specific, so it passes.
Full details: Description check
Explanation
The description is specific and on-topic. It explains the problem (requesters and approving admins cannot choose per-request router settings such as quality profile or folder), the approach (plugin-declared requester_options, new list endpoints, offer tokens, requester_choices migration, web dialogs and queue columns), validation steps, manual evidence, and risks (go.mod SDK fork replace, new migration, requester-visible folder paths). These match the changeset summaries across the Go API, requests service, migration, OpenAPI, and web files.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
grtn91
changed the title
Grtn91/request requester options
feat(requests): let a requester or approving admin choose a request router plugin's settings
Nov 12, 2026
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
The web typecheck runs with noUncheckedIndexedAccess, so an array index
is T | undefined. Read the shared queue row before setting shared on it,
and read the first approve call with optional chaining in the approval
test.
AI disclosure: written with Claude Sonnet 5.5 in Claude Code. The repo
typecheck, eslint, prettier and the affected web tests pass locally.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The requester options change pushed internal/apiv2/requests.go past 1000
lines and web/src/pages/admin-requests/RequestQueue.tsx past 800, which
the size ratchet refuses. Move the requester option types and handler to
request_options.go, and the queue's target list, option cells and column
layout helper to QueueCells.tsx and requestQueueModel.ts. Behavior is
unchanged.
AI disclosure: written with Claude Sonnet 5.5 in Claude Code. The size
ratchet, repo typecheck, eslint, prettier, lint-changed, the request web
tests and the request apiv2 tests pass locally.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Approving with picks stores them in the same guarded update that
approves the request. Before, two admins approving at once could leave
the winner's approval with the other admin's picks.
- An option's default is the first choice when the server's own setting
is not on offer. A client now sends the selected value of every option,
and the server leaves out a pick that is its own setting, so the value a
form shows is the one that applies.
- Listing a title's options runs the create-time access check, so a
blocked account cannot read the server's choices.
- Plugin errors are sanitized before they are logged.
- Web: an approval prompt that is open is not replaced by another
request's, its picks reset per request, and a request made before the
server reported whether it has request options waits for that answer.
AI disclosure: written with Claude Fable 5.2 in Claude Code. The request
Go tests, the Postgres request tests, the v2 contract checks, lint, the
size ratchet, the web typecheck and the web tests for the touched files
pass locally.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
coderabbitaiBot
added
api-v2
API v2 / Huma migration program (epic #135); long-running, stacked by phase
go
Pull requests that update go code
javascript
Pull requests that update javascript code
labels
Nov 12, 2026
Files skipped from review as they are similar to previous changes: 1
web/src/api/v2/schema.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
A requester's pick the admin submitted unchanged stayed the requester's.
When the server had moved that option from requesters to the approver
while the request waited, the pick was left out at submit and the saved
setting applied instead of the value the admin confirmed.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Conflicts: the request status line (keeps upstream's profile-block check
and adds request_options_supported) and the DB contract list (both sides'
tests). RequesterOptions passes the viewer to ensureViewerRequestsAllowed,
whose signature changed upstream.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
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: 9d41e111-4615-4302-8f7d-c664992fcb34
Commits
Reviewing files that changed from the base of the PR and between efd6bb3 and 735d3ed.
Files ignored due to path filters: 1
go.sum is excluded by !**/*.sum
Files selected for processing: 21
contracts/api/v2/openapi.json
docs/architecture/api-contract.md
docs/architecture/media-requests.md
go.mod
internal/api/handlers/requests.go
internal/api/testdata/media_routes.txt
internal/apiv2/request_lifecycle.go
internal/apiv2/requests.go
internal/apiv2/router.go
internal/requests/repository.go
internal/requests/requester_options.go
internal/requests/service.go
internal/requests/service_test.go
internal/requests/store.go
internal/requests/types.go
scripts/ci/db-contracts.txt
web/src/api/types.ts
web/src/api/v2/schema.ts
web/src/hooks/queries/keys.ts
web/src/lib/mediaRequests.test.ts
web/src/lib/mediaRequests.ts
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.
Picks were checked against the server a title goes to when they are
submitted. When routing had moved the title to another server while a
dialog was open, or the server had relabelled a value, the same value
could pass and mean another choice.
Each list of options now comes with an offer token, a digest of the
server and its choices. createRequest and adminApproveRequest take it
back as options_offer and refuse picks when it is missing or no longer
the current offer. The web app sends it, reads the choices again after a
refusal, and drops picks made from a replaced list.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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 settingsReview Options
The following review options are enabled or disabled:
Options
Enabled
Bug
✅
Performance
✅
Security
✅
Business Logic
❌
⚠️ 4 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
Preserve durable media identity and share identity-evidence precedence
Bound decoder throughput trades and share direct-play eligibility
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api-v2API v2 / Huma migration program (epic #135); long-running, stacked by phaseenhancementNew feature or requestgoPull requests that update go codejavascriptPull requests that update javascript codepriority: P2Limited scope, workaround exists, or polishsize/XXXL3000+ added + deleted lines (all files); change volume, not priority.
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Related issue: Silo-Server/silo-plugin-sdk#67, Silo-Community/silo-plugins-requests-seerr#10
Validation tasks: none
A request reaches its download server with the settings an admin saved on that server, or a routing rule's. Which quality profile or folder a title gets can only be decided in advance, per server or per rule. A requester can't ask for a different profile, and an admin approving a request can't set one for that request. This matters to anyone whose one Radarr or Sonarr serves several uses.
This change lets a request router plugin declare settings that can be chosen per request. The admin decides per server whether the saved value, the requester, or the approving admin chooses. It needs the manifest field from Silo-Server/silo-plugin-sdk#67.
Approach
A plugin lists config fields in
request_router.requester_options. Each entry is a select and a second select in the same form where the admin says who chooses: the saved value, the requester, or the admin on approval.listRequestOptionsandlistAdminRequestOptionsreturn the choices the plugin'sListConfigOptionsreports for the server the request would go to.createRequestandadminApproveRequesttake the picks asoptions. Each list comes with anofferthat goes back asoptions_offer, so picks made from a list the server no longer offers are refused.requester_choices, new migration) and set in the server's config at submission, over its own values and a route's.request_options_supportedon the request status tells clients whether the server offers this.Affected:
internal/requests,internal/apiv2(OpenAPI, web types, fixtures),web, one migration.Validation
golangci-lintv2.12.2 (the CI version) on the branch: 0 issues.internal/requests,internal/plugins,internal/api: pass.internal/apiv2suite: pass in a Linux container (golang:1.26). It crashes on SQLite open on my machine, and does so on a cleanorigin/maintoo.requester_choicescolumn.verify-local-paths,verify-apiv2-openapi,verify-apiv2-web-types,verify-route-inventory,verify-apiv2-fixtures,verify-migration-ledger,migrate-validate): pass.tsc,eslint,prettierand the request and admin tests: pass.Evidence
How I checked it, by hand in the web UI against a Seerr with one Radarr and one Sonarr, on this commit (
304f6a166):Surface and build: web request dialog, seasons dialog, approval dialog and admin request queue; commit
304f6a166.Settings:

Users chooses on request:

Admin chooses on approval:

Risks
go.modreplacessilo-plugin-sdkwith a fork commit that carries the new manifest field. It must become a released SDK version before this can merge.requester_choicescolumn tomedia_requests.Related PR's
Checklist
AI Disclosure
Note
Add requester-selectable request router options to media requests
GET /api/v2/requests/options/{media_type}/{tmdb_id}andGET /api/v2/admin/requests/{id}/options. The request status endpoint now advertisesrequest_options_supported(request_options.go, openapi.json).requester_choicesJSONB column onmedia_requests; picks are applied to router connection config at submission without changing the saved server config (repository.go, 20261111012048_request_requester_choices.sql).requester_choicestomedia_requests(default{}); go.mod adds a replace directive pinning the Silo plugin SDK.Macroscope summarized cd3df81.