fix: Stamp the selected ModelId on LlmRequest much earlier - #393
fix: Stamp the selected ModelId on LlmRequest much earlier#393grahamking wants to merge 1 commit into
Conversation
|
@CodeRabbit review |
✅ Action performedReview finished.
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (7)
WalkthroughRouting now stamps the selected model into requests. LLM clients, tracing, error handling, tests, and documentation use the request model as the routed target. ChangesRequest-Model Routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
Previously `libsy` would give `CallModel` a request with the wrong model ID, and a `Decision` with the correct (chosen by routing algo) model ID. `libsy-llm-client` would stamp the later onto the former before making the actual call. Now `Driver::call_model` stamps the correct model ID onto `LlmRequest`, so everything after that can use `LlmRequest` directly. This was confusing me for a while. Seems easier to understand like this. This also means `CallModel` can read the `selected_model_id()` off the request now, which gives us options for changing `Decision` later. Assisted-by: Codex:GPT 5.6 Sol high Signed-off-by: Graham King <grahamk@nvidia.com>
aa06e52 to
f5dfba6
Compare
Previously
libsywould giveCallModela request with the wrong modelID, and a
Decisionwith the correct (chosen by routing algo) model ID.libsy-llm-clientwould stamp the later onto the former before makingthe actual call.
Now
Driver::call_modelstamps the correct model ID ontoLlmRequest,so everything after that can use
LlmRequestdirectly.This was confusing me for a while. Seems easier to understand like this.
This also means
CallModelcan read theselected_model_id()off therequest now, which gives us options for changing
Decisionlater.Claude's review:
Assisted-by: Codex:GPT 5.6 Sol high
Signed-off-by: Graham King grahamk@nvidia.com
Summary by CodeRabbit
Improvements
Documentation