fix: exclude internal providers from routing_preferences model validation#880
Open
octo-patch wants to merge 2 commits intokatanemo:mainfrom
Open
Conversation
added 2 commits
April 8, 2026 12:51
Fixes katanemo#643 Move request_id and traceparent initialization to the start of on_http_request_headers so that all subsequent log messages within the same handler (including select_llm_provider) carry the correct request ID instead of showing 'no_request_id'.
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.
Fixes #645
Problem
The
routing_preferencesvalidation ininit_app_statebuilt the set of valid model names from all model providers, including internal ones (arch-router,arch-function,plano-orchestrator). This meant a user could accidentally reference an internal provider inrouting_preferences.models, which would pass validation but then route requests to an internal model — producing undefined behavior.Solution
Added a
.filter(|p| p.internal != Some(true))step when buildingprovider_model_namesduring routing_preferences validation. Internal providers are now excluded from the set of valid routing targets, consistent with howLlmProviders::to_models()andIntoModels for Vec<LlmProvider>already filter them out when listing models.Testing
All existing lib tests pass (
cargo test --lib):