fix(router): pin combo child routes to concrete targets - #1379
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThe change adds concrete model routing that bypasses combo aliases and policy evidence. Combo validation, child dispatch, and combo attempts use this route. Regular requests retain policy-aware routing. An end-to-end test covers a shadowing combo alias. ChangesConcrete combo target routing
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request has been marked Ready for Review. |
f7eb387 to
b3a29d6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/server-combo-failover-e2e.test.ts`:
- Around line 384-397: Update the regression test setup around comboConfig so
config.defaultProvider is set to "b" after creation, while preserving the shadow
combo target as "a/m1". Ensure the request cannot independently resolve bare
model "m1" to provider "a", so the test only passes when the child request
retains the explicit provider qualifier and routes through the intended combo
target.
🪄 Autofix
❌ Autofix failed (check again to retry)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2f790653-ef0a-420f-8f4d-4f2a65df765d
📒 Files selected for processing (3)
src/router.tssrc/server/responses/core.tstests/server-combo-failover-e2e.test.ts
|
An unexpected error occurred while generating fixes: Not Found - https://docs.github.com/rest/git/refs#get-a-reference |
b3a29d6 to
4a5037c
Compare
|
|
|
Thanks @luvs01! Nice targeted routing fix, and the regression makes the provider-pinning contract much clearer. Appreciate the quick review iteration. Merged. 🙏 |
Summary
The router already bypasses combo and policy aliases when it first resolves a selected target. The Responses combo path later called the public alias-aware resolver again, which could move the child to a different configured provider.
Verification
bun test tests/server-combo-failover-e2e.test.ts— 47 passed, 0 failed.bun test tests/router.test.ts tests/combos.test.ts— 59 passed, 0 failed.bun run typecheck— passed.bun run privacy:scan— passed.git diff --check— passed.bun run testwas attempted once. On Windows, Bun 1.3.14 panicked with an internal assertion after 287 seconds in the storage-policy area; the changed routing/combo suites did not fail.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
All CI tests are green on my local testing.
I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Bug Fixes
Tests