[Router] remove dead modelselection config analyzer - #2747
Closed
drivebyer wants to merge 1 commit into
Closed
Conversation
config_analyzer.go lost its last caller in #1260 when the old training flow was replaced by vsr validate. Since then every exported symbol in the file (AnalyzeConfigForModelSelection, AnalyzeConfig, ConfigAnalysisResult, MultiModelCategory, GetModelEndpoints) has zero references in code, tests, or docs. AnalyzeConfigForModelSelection was also broken for canonical configs: it unmarshaled the file straight into RouterConfig, but canonical configs keep decisions under routing: and the loader normalizes them, so a bare unmarshal always saw 0 decisions. Rather than fix parse logic nobody runs, delete the file. This removes exported API from pkg/modelselection. Signed-off-by: drivebyer <wuyangmuc@gmail.com>
✅ Deploy Preview for vllm-semantic-router ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned when their GitHub accounts are assignable in this repository: 📁
|
Contributor
✅ Supply Chain Security Report — All Clear
Scanned at |
Contributor
Performance Benchmark ResultsComponent benchmarks completed with no regressions beyond thresholds. Summary
DetailsSee attached benchmark artifacts for detailed results and profiles. Performance testing powered by vLLM Semantic Router |
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.
What
Delete
src/semantic-router/pkg/modelselection/config_analyzer.go. The whole file is dead code.Split out of #2724 to keep that PR scoped.
Why
The file lost its last caller in #1260, which replaced the old training flow with
vsr validate. Since then every exported symbol in it has zero references in code, tests, or docs:AnalyzeConfigForModelSelectionAnalyzeConfigConfigAnalysisResult, with itsPrintAnalysisSummaryandNeedsModelSelectionTrainingmethodsMultiModelCategoryGetModelEndpointsAnalyzeConfigForModelSelectionis also broken for canonical configs. It unmarshals the file straight intoRouterConfigwith a bareyaml.Unmarshal. Canonical configs keep decisions under therouting:block and the loader normalizes them, so the bare unmarshal always sees 0 decisions. The fix would be to route throughconfig.Parse, but fixing parse logic nobody runs just preserves a trap for future callers. Deleting the file is simpler.API note: this removes exported symbols from
pkg/modelselection. In-tree there are no references. If anyone imports these symbols out of tree, this is a breaking change for them.Test Plan
go build ./...insrc/semantic-routerpasses. The only failure iscmd/wasm, which fails identically onmainbecause itsmain_stub.gointentionally has nomainfunction.go test ./pkg/modelselection/...passes.make agent-lint CHANGED_FILES="src/semantic-router/pkg/modelselection/config_analyzer.go"passes, including structure checks and the reference config contract test.