Repository navigation
refactor(mm-routing): propagate image token accounting failures - #16947
Conversation
Return Result from image token accounting and propagate failures through batch counting and preprocessing. Disable exact routing and image-token metrics when accounting fails, while preserving worker-bound inputs. Add backend-independent tests for failures before and after a valid image count, including atomic routing/hash fallback. Validation: targeted preprocessor Rust tests passed (376 passed, 2 ignored); cargo fmt and git diff --check passed. Signed-off-by: Fang Han <fangh@nvidia.com>
|
👋 Hi HanFa! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
|
/ok-to-test 1728307 |
|
/ok to test 1728307 |
|
/ok to test 1728307 |
⏹️ Dynamo PR CI cancelled — run 39510330241 (attempt 1) on
|
| Framework | Build |
|---|---|
| SGLang | ⏹️ 1 |
Failure details
No job failed. 1 build was cancelled (backend-status-check fails only because of it): it was not a fail-fast cancel, since nothing else failed; it stopped ~60 min after starting (22:45 → 23:45 UTC), which looks like a job time limit or a manual cancel. Rerunning the failed jobs should be enough.
⏹️ sglang-runtime / Build multi-arch cuda13.0: The operation was canceled
Job: sglang-runtime / Build multi-arch cuda13.0 · Cancelled step: Compliance extract · Logs: gh run view --job 118929612042 -R ai-dynamo/dynamo --log-failed
2026-10-20T23:45:49Z ##[error]The operation was canceled.
Cancelled during Compliance extract with no prior error in the log.
For agents
{"pr": 16947, "run_id": 39510330241, "run_attempt": 1, "head_sha": "172830710b205e1891e3d76d59abb560a3125669",
"failures": [{"job": "sglang-runtime / Build multi-arch cuda13.0", "job_id": 118929612042, "failed_step": "Compliance extract", "signature": "cancelled: The operation was canceled (~60 min after start)", "tests": [], "log_cmd": "gh run view --job 118929612042 -R ai-dynamo/dynamo --log-failed"}]}Posted automatically by Devin for run 39510330241. Updated on every full-CI run of this PR.
…ynamo#16947) Signed-off-by: Fang Han <fangh@nvidia.com>
…ynamo#16947) Signed-off-by: Fang Han <fangh@nvidia.com>
Summary
Make per-image token accounting fallible so routing planners can reject unsupported geometry without substituting a zero or approximate count. If any image fails accounting, disable exact multimodal routing and image-token metrics for the request while preserving the worker-bound prompt and media.
Details
Ok.Stack
This is the prerequisite for the GLM-5.3-Flash image planner integration. It introduces no GLM dependency or model-specific layout hook. The follow-up is HanFa#3, based on this PR's head branch in the contributor fork so it shows only the GLM integration diff. After this prerequisite merges, the GLM commit will be submitted in a separate upstream PR.
Where should the reviewer start?
Start with
ImageRoutingBackendinlib/llm/src/preprocessor/mm_routing/image.rs, then review the three accounting call sites inlib/llm/src/preprocessor.rs.Validation
cargo test -p dynamo-llm --no-default-features --features mm-routing --locked --lib preprocessor:: -- --test-threads=4: 376 passed, 2 ignored on this commit alone.cargo fmt --all --checkandgit diff --check: passed.Related Issues
Part of #16948.
Internal tracking: DIS-3123 (multimodal-aware KV routing model support).