feat(router): warn when client-supplied model is rewritten#1550
Closed
laitingsheng wants to merge 1 commit into
Closed
feat(router): warn when client-supplied model is rewritten#1550laitingsheng wants to merge 1 commit into
laitingsheng wants to merge 1 commit into
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-1550.docs.buildwithfern.com/openshell |
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
The privacy router silently overwrites the client-supplied `model` field with the route's configured model before forwarding to the upstream provider. The rewrite lets operators swap upstream models without reconfiguring agents, but it also masks typos and stale model references on the caller side — the upstream's "unknown model" error never reaches the caller. When the caller sends a non-empty model that differs from the configured route model, emit a `warn`-level tracing event with both identifiers and the route endpoint. The rewrite still happens (no behaviour change for healthy deployments); operators get a visible signal in logs whenever a caller and the route disagree on the model. Fixes NVIDIA/NemoClaw#994 Signed-off-by: Tinson Lai <tinsonl@nvidia.com>
ce3d85b to
7ac700a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The privacy router silently overwrites the client-supplied
modelwithroute.model, masking caller-side typos and stale references. Emit awarn-level tracing event when the supplied model differs from the configured route model. The rewrite itself is preserved.Related Issue
Fixes NVIDIA/NemoClaw#994
Changes
crates/openshell-router/src/backend.rs— warn withclient_model,route_model, andendpointwhen the caller's non-emptymodeldiffers fromroute.model.Testing
mise run pre-commitpassesChecklist