Skip to content

[Router] remove dead modelselection config analyzer - #2747

Closed
drivebyer wants to merge 1 commit into
mainfrom
refactor/remove-dead-config-analyzer
Closed

[Router] remove dead modelselection config analyzer#2747
drivebyer wants to merge 1 commit into
mainfrom
refactor/remove-dead-config-analyzer

Conversation

@drivebyer

Copy link
Copy Markdown
Collaborator

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:

  • AnalyzeConfigForModelSelection
  • AnalyzeConfig
  • ConfigAnalysisResult, with its PrintAnalysisSummary and NeedsModelSelectionTraining methods
  • MultiModelCategory
  • GetModelEndpoints

AnalyzeConfigForModelSelection is also broken for canonical configs. It unmarshals the file straight into RouterConfig with a bare yaml.Unmarshal. Canonical configs keep decisions under the routing: block and the loader normalizes them, so the bare unmarshal always sees 0 decisions. The fix would be to route through config.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 ./... in src/semantic-router passes. The only failure is cmd/wasm, which fails identically on main because its main_stub.go intentionally has no main function.
  • 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.
  • Repo-wide grep for each removed symbol returns no matches outside the deleted file.

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>
@netlify

netlify Bot commented Aug 2, 2026

Copy link
Copy Markdown

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 49b4af9
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/6a6efabe1df15f00086840ea
😎 Deploy Preview https://deploy-preview-2747--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

👥 vLLM Semantic Team Notification

The 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:

📁 src/semantic-router

Owners: @FAUST-BENCHOU, @shraderdm, @drivebyer, @ramkrishs, @WUKUNTAI-0211, @AayushSaini101, @siloteemu
Files changed:

  • src/semantic-router/pkg/modelselection/config_analyzer.go

vLLM Semantic Router

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

✅ Supply Chain Security Report — All Clear

Scanner Status Findings
AST Codebase Scan (Py, Go, JS/TS, Rust) 31 finding(s) — MEDIUM: 24 · LOW: 7
AST PR Diff Scan No issues detected
Regex Fallback Scan No issues detected

Scanned at 2026-08-02T08:08:45.947Z · View full workflow logs

@drivebyer drivebyer closed this Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Performance Benchmark Results

Component benchmarks completed with no regressions beyond thresholds.

Summary

  • Classification benchmarks: ✅
  • Decision engine benchmarks: ✅
  • Cache benchmarks: ✅
  • Looper family benchmarks: ✅
  • Regression gate: ✅ no regressions beyond thresholds

Details

See attached benchmark artifacts for detailed results and profiles.


Performance testing powered by vLLM Semantic Router

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants