Skip to content

fix(router): pass plugin selectors to the transcription router - #18116

Merged
karen-sy merged 5 commits into
ai-dynamo:mainfrom
glamr-agent:dyn-5370-transcription-router-plugin-selectors-42baa851ff72
Nov 5, 2026
Merged

karen-sy merged 5 commits into
ai-dynamo:mainfrom
glamr-agent:dyn-5370-transcription-router-plugin-selectors-42baa851ff72

Conversation

@glamr-agent

@glamr-agent glamr-agent commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Failure behavior

Overview

A worker that serves a transcription model cannot register with a frontend that uses round-robin, random or least-loaded routing. Round-robin is the frontend default. The frontend logs RoundRobin routing needs instance selectors; pass PushRouterOptions::selectors and retries. The model never appears in /v1/models, and /v1/audio/transcriptions returns 404.

Since #17713, these routing modes are built-in router plugins, and the router for each worker needs the plugins' instance selectors when it is created. #17713 changed every worker router in the frontend's model discovery to pass them. The transcription router came from #16208, which merged about a day earlier, so #17713 missed it. The transcription router still passes no selectors, and its creation fails for these modes. The defect is in Dynamo.

Reproduction Without the fix With the fix Note
Exact failure on the reported setup Not run — Needs a GPU and a vLLM transcription worker; the coding run had no GPU and no engine.
Exact failure on a similar setup ❌ Exact failure ✅ Passed Frontend with default round-robin and two minimal Python transcription workers on CPU. Without the fix the model never registered and requests got 404; with it, 4 of 4 requests succeeded across both workers.
Exact error in a test ❌ Exact error ✅ Passed The new watcher unit test, on CPU: RoundRobin routing needs instance selectors without the fix, passes for all three modes with it.

Key Changes

The frontend now creates the transcription router the same way as the other worker routers, with the selectors for the configured routing mode. Fault detection stays on, and no worker monitor is attached, as before.

Case Before After
Transcription worker, round-robin, random or least-loaded routing Registration fails; requests get 404 Model registers and serves requests
Transcription worker, other routing modes Registers Unchanged
Other model types Register Unchanged

Core change: about 6 lines (+4/−2). The logic is in 1 file:

  • about 6 lines in watcher.rs: Creates the transcription router with the routing-mode selectors, as the neighboring routers do.

The rest of the +89/−2 diff is a unit test.

Validation

This PR adds one unit test, text_transcriptions_register_under_selector_router_modes, to lib/llm/src/discovery/watcher.rs. It runs on CPU with a process-local runtime and needs no workers or GPU.

Behavior checked Checked by Without the fix With the fix
A transcription model registers under round-robin, random and least-loaded routing New unit test; also the reproduction above ❌ Exact error ✅ Passed

Issues and Ongoing Work

Closes DYN-5370.

Pull Request Checklist
  • I used Dynamo's /pr-checklist skill.

Summary by CodeRabbit

  • Bug Fixes
    • Text-input transcription cards now register transcription engines correctly when using RoundRobin, Random, or LeastLoaded routing modes.

The transcription PushRouter in the discovery watcher was still built with
`from_client_with_monitor(.., None)`, which leaves `PushRouterOptions::selectors`
unset. Since ai-dynamo#17713 made selectors required for RoundRobin, Random and
LeastLoaded, registering a `ModelType::Transcriptions` worker under those
modes (round-robin is the frontend default) failed with
"RoundRobin routing needs instance selectors; pass PushRouterOptions::selectors".

Build it with `from_client_with_options(.., push_router_options())` like the
other text routers. The old call passed no worker monitor, and
`push_router_options()` also leaves `worker_monitor` unset with fault
detection on, so only the selectors change.

Add a watcher test that registers a Text + Transcriptions card under each
selector mode.

Signed-off-by: svc-glamr@nvidia.com <svc-glamr@nvidia.com>
@glamr-agent
glamr-agent requested a review from a team as a code owner November 4, 2026 20:12
@copy-pr-bot

copy-pr-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 4, 2026 20:12 — with GitHub Actions Inactive
@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 4, 2026 20:12 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

👋 Hi glamr-agent! Thank you for contributing to ai-dynamo/dynamo.

Just a reminder: The NVIDIA Test Github Validation CI runs an essential subset of the testing framework to quickly catch errors.Your PR reviewers may elect to test the changes comprehensively before approving your changes.

🚀

@github-actions github-actions Bot added external-contribution Pull request is from an external contributor fix labels Nov 4, 2026
@glamr-agent

Copy link
Copy Markdown
Collaborator Author

factory: Initial validation snapshot.

Validation status: complete

Check Result Scope or reason
Checks the changed Rust crates with cargo check and Clippy. Passed (exit 0) Workspace cargo check --locked --all-targets and Clippy with -D warnings; the new watcher test failed without the fix (RoundRobin routing needs instance selectors) and passed with it; all 37 watcher tests passed.
Starts the Dynamo frontend with a Mocker worker on CPU and sends the reported request. Passed (exit 0) The Mocker cannot advertise a transcription model, so two minimal Python transcription workers stood in for it. Default round-robin: without the fix the model never registered and 4 of 4 requests got 404; with it, 4 of 4 requests returned 200 across both workers.

The reported setup, a vLLM transcription worker on a GPU, was not run; the run had no GPU and no engine.

Detailed evidence — validation complete

Left out of the table because CI repeats them: Builds the changed Dynamo source and confirms that Python can import its compiled extension (passed, exit 0).

Evidence tally: [3/3 validated]

Advisory AI assessment: sound

Validation result: pass — the new test fails without the fix with RoundRobin routing needs instance selectors and passes with it; a live frontend with round-robin and two transcription workers failed to register the model without the fix and served 4 of 4 requests with it; watcher tests, runtime selector test, fmt, workspace check, workspace Clippy and pre-commit are clean.

Evidence audit: complete [3/3 validated] — the command report comes from recorded runs.

Commands and results [3/3 validated]

Generated from the commands recorded during this run.

Check 1

Builds the changed Dynamo source and confirms that Python can import its compiled extension.

Result: Passed (exit 0)

Command:

Not shown because the exact command contained private run data.

Check 2

Checks the changed Rust crates with cargo check and Clippy.

Result: Passed (exit 0)

Command:

Not shown because the exact command contained private run data.

Check 3

Starts the Dynamo frontend with a Mocker worker on CPU and sends the reported request.

Result: Passed (exit 0)

Command:

Not shown because the exact command contained private run data.

@glamr-agent

Copy link
Copy Markdown
Collaborator Author

No description provided.

@glamr-agent

Copy link
Copy Markdown
Collaborator Author

factory: @dynamo-ops please run full CI for d6ca5bc

@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test d6ca5bc

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The transcription PushRouter now uses shared plugin router options. A test checks transcription engine registration for text-input transcription cards under RoundRobin, Random, and LeastLoaded modes.

Changes

Text-input transcription routing

Layer / File(s) Summary
Router setup and validation
lib/llm/src/discovery/watcher.rs
The transcription PushRouter now uses shared push-router options. The test prepares and commits a text-input transcription model under RoundRobin, Random, and LeastLoaded, then checks that each model has a transcription engine.

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

Merge Risk: Minimal · up to d6ca5

The change supplies transcription routing selectors; no merge-blocking issue was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the change: the transcription router now receives plugin selectors. The change set matches this. The title is short, specific, and uses the conventional prefix. It does not cover the u…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template closely. It has Overview, Key Changes, Validation, and Issues and Ongoing Work sections, plus the checklist and a Closes DYN-5370 line. It explains the …
Full details: Title check

Explanation

The title names the change: the transcription router now receives plugin selectors. The change set matches this. The title is short, specific, and uses the conventional prefix. It does not cover the unit test, which is expected.

Full details: Description check

Explanation

The description follows the repository template closely. It has Overview, Key Changes, Validation, and Issues and Ongoing Work sections, plus the checklist and a Closes DYN-5370 line. It explains the failure mode, the root cause (the transcription router created without plugin selectors after #17713), and the change itself. It gives reproduction evidence, both a CPU frontend reproduction and a unit test. The GPU/vLLM reproduction was not run, and the author says so. The template's 'Closes #XXXX' line is replaced with a Linear ticket reference, which the template's advisory issue-link check may not recognize. Several sections are supplemented with extra tables and a 'Failure behavior' heading that the template does not include. Overall the description is mostly complete and specific.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between d61b28b and d6ca5bc.

Files selected for processing: 1
  • lib/llm/src/discovery/watcher.rs

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@glamr-agent

Copy link
Copy Markdown
Collaborator Author

nursery: I changed nothing in watcher.rs for the documentation warning in CodeRabbit’s summary. prepare_worker_set already has a doc comment. The other function is the private test text_transcriptions_register_under_selector_router_modes; its name says what it checks. The repository’s Rust review guide asks us to avoid comments that repeat function names. I also added the requested PR headings and checklist, preserved the first description line, and used the supported Closes DYN-5370 reference.

Signed-off-by: GLAMR <svc-glamr@nvidia.com>
@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 4, 2026 21:56 — with GitHub Actions Inactive
@glamr-agent

Copy link
Copy Markdown
Collaborator Author

nursery: @dynamo-ops please run full CI for b03992a

@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test b03992a

@karen-sy karen-sy 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.

Good catch Glamr

@karen-sy
karen-sy enabled auto-merge (squash) November 4, 2026 21:57

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

Approved.

Signed-off-by: GLAMR <svc-glamr@nvidia.com>
@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 5, 2026 00:01 — with GitHub Actions Inactive
@glamr-agent

Copy link
Copy Markdown
Collaborator Author

nursery: @dynamo-ops please run full CI for 959286b

@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test 959286b

Signed-off-by: GLAMR <svc-glamr@nvidia.com>
@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 5, 2026 01:47 — with GitHub Actions Inactive
@glamr-agent

Copy link
Copy Markdown
Collaborator Author

nursery: @dynamo-ops please run full CI for a62cd9b

@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test a62cd9b

Signed-off-by: GLAMR <svc-glamr@nvidia.com>
@glamr-agent
glamr-agent temporarily deployed to external_collaborator November 5, 2026 03:48 — with GitHub Actions Inactive
@glamr-agent

Copy link
Copy Markdown
Collaborator Author

nursery: @dynamo-ops please run full CI for d3010dc

@dynamo-ops

Copy link
Copy Markdown
Contributor

/ok to test d3010dc

@karen-sy
karen-sy merged commit 5e03410 into ai-dynamo:main Nov 5, 2026
118 checks passed
ishandhanani added a commit to ishandhanani/dynamo that referenced this pull request Nov 5, 2026
Fifth upstream merge for the split v2 PR: the four commits past
20c5f11, no conflicts, no router-owned path.

- ai-dynamo#18116 pass plugin selectors to the transcription router:
  lib/llm/src/discovery/watcher.rs (auto-merged).
- ai-dynamo#17691 DynamoDB registration store for the Global Discovery Service:
  lib/global-discovery-service, root Cargo.toml workspace deps, Cargo.lock.
- ai-dynamo#16288 deployment diagnostics tests, ai-dynamo#16723 helm KAI queue wait: outside
  the router.

Signed-off-by: Ishan Dhanani <ishandhanani@gmail.com>

This branch was previously deployed

1 inactive deployment
external_collaborator — d3010dc4 Deployed Nov 5, 2026 by glamr-agent via ok-to-test #46327
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contribution Pull request is from an external contributor fix size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants