feat(grpc-router): use per-model retry config from WorkerRegistry - #933
Conversation
gRPC router now looks up per-model retry config from WorkerRegistry at request time for all 3 endpoints (chat, generate, messages), falling back to the router-level default if no worker group override exists. Signed-off-by: Chang Su <chang.s.su@oracle.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe gRPC router now implements per-model retry configuration selection across chat, generate, and messages routes. For each request, it queries the worker registry for model-specific retry configuration, uses it if available, otherwise falls back to the router's default configuration, and passes the resolved config to the retry executor. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces per-model retry configurations within the gRPC router, enabling the system to prioritize model-specific settings over global defaults. The logic for resolving the effective retry configuration is duplicated across several methods. It is recommended to extract this logic into a private helper method, possibly utilizing std::borrow::Cow to efficiently handle both owned and borrowed configuration data.
…g-project#933) Signed-off-by: Chang Su <chang.s.su@oracle.com>
Description
Part of the per-worker resilience refactor series: #799 → #803 → #821 → #836 → #875 → #881 → this PR.
Problem
gRPC router uses a single global
retry_configfor all requests, ignoring per-model retry config set by workers.Solution
Look up per-model retry config from
WorkerRegistryat request time for all 3 endpoints (chat, generate, messages), falling back to the router-level default.Independent of #881 (HTTP router migration).
Changes
grpc/router.rsupdated to read fromWorkerRegistryTest Plan
cargo test -p smg --lib— all 450 tests passChecklist
cargo +nightly fmtpassescargo clippy --all-targets --all-features -- -D warningspassesSummary by CodeRabbit
Refactor
Summary by CodeRabbit