Repository navigation
fix(auto-router): separate tuning and select chained heuristic - #44928
Conversation
|
bugbot run Please review the current tip, especially scorer selection, combined capability allowances, and create/edit persistence across mode switches |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@greptileai Please review current commit 86a9a82, focusing on classifier selection, v2 chaining behavior, preserved defaults, and combined capability allowances |
86a9a82 to
2b634df
Compare
|
@greptileai Please review current tip 2b634df, which adds the missing exhaustive saved-setting fixture and preserves the already-verified runtime behavior |
|
bugbot run Please review current tip 2b634df, including the updated exhaustive persistence fixture. Runtime code is unchanged from the previous tip |
|
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 2b634df. Configure here.
TLDR
Problem this solves:
How it solves it:
Intentional product change: Always-judge mode hides heuristic tuning, including fallback tuning, to keep judge settings focused. Existing fallback behavior stays unchanged
Companion documentation: Optimize your classifier, with 16 dashboard screenshots, matching YAML, and the full settings reference
User Flow
Before: configuring the judge exposes heuristic weights, while chaining has no version selector
http://classifier.localhost:3058/models-and-endpoints/, click Add Auto Router, and select LLMBefore screenshots
After: judge-only settings stay focused, and chained heuristics have their own controls
http://classifier.localhost:3058/models-and-endpoints/, click Add Auto Router, and select LLMSaved router with v2 chaining
Changes
Pre-Submission checklist
make checkpass locally2b634df9; Bugbot, Veria, and human review completeScreenshots / Proof of Fix
Real local proxy and isolated Postgres, with
demo-efficientanddemo-capablemodel aliases. The savedclassifier-chain-demorouter usesheuristic_first,local_heuristic: heuristic_v2, threshold0.6, and maximum local tierMEDIUMShared routing command, with an authenticated local master key:
The saved router overrides the required inline config
Before (b6d587d)
Tuning UI
Saved v2 Chain
cause: heuristic_first_short_circuit,tier: SIMPLE,score: -0.15000000000000002, and v1 keyword signals; no v2 forecastAfter (2b634df)
Tuning UI
Saved v2 Chain
cause: heuristic_first_short_circuit,tier: SIMPLE, andheuristic_v2_forecastwith threshold0.6and SIMPLE probability0.901084493010193330-second recording of real browser interactions:
classifier-tuning-demo.mp4
Type
Bug Fix, New Feature
Caveats
Medium
misc(provider_request_id) andproxy-infra-root(summary.priced_calls); both independently reproduced on pristine base5ed7ec8Final Attestation
Note
Medium Risk
Changes live routing short-circuit logic and multi-capability license enforcement on model writes; broad test coverage but behavior shifts for heuristic_first/hybrid operators.
Overview
Adds
local_heuristicsoheuristic_firstandhybridcan use heuristic v1 or v2 for local scoring before the LLM judge. Routing now picks the local scorer viaconfigured_local_heuristic, applies v2 success-threshold and margin rules for short-circuit vs judge escalation, and recordsheuristic_v2_forecaston v2 decisions. Standalone v2 behavior is unchanged; chained v2 defers to the judge when no tier qualifies.Licensing moves from a single gated capability per router to
gated_capabilities_of/claimed_capabilities, so a v2 chain plus a custom classifier prompt can consume both heuristic_v2 and customization slots. Proxy availability and model-write paths loop all claimed capabilities under the same advisory lock.Validation and tuning:
local_heuristicis only allowed on chaining modes; custom dimensions require v1. Heuristic-v1 tuning quotas ignore v2-chained configs until v1 is selected.Dashboard: Advanced settings split into selection, LLM/classifier tuning, and Heuristic tuning; judge-only mode hides heuristic knobs. Create/edit/build paths persist
local_heuristicand gate the v2 chain on allowance UI.Reviewed by Cursor Bugbot for commit 2b634df. Bugbot is set up for automated code reviews on this repo. Configure here.