Repository navigation
feat(autoCombo): latency/speed-optimized routing mode + omniroute_pick_fastest_model MCP tool - #6011
Merged
diegosouzapw merged 10 commits intoJul 3, 2026
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…k_fastest_model MCP tool
KooshaPari
force-pushed
the
feat/port-pr-9999-latency-speed-mode
branch
from
July 3, 2026 00:10
fab2314 to
f4ef497
Compare
This was referenced Jul 3, 2026
KooshaPari
added a commit
to KooshaPari/OmniRoute
that referenced
this pull request
Jul 3, 2026
…oldown (cheaper-inference#6011 cheaper-inference#6004) (#239) * feat: generalize backend failure cooldown state (upstream cheaper-inference#6004) * feat(autoCombo): latency/speed routing mode + pick_fastest_model MCP tool (upstream cheaper-inference#6011)
2 tasks
KooshaPari
added a commit
to KooshaPari/OmniRoute
that referenced
this pull request
Jul 3, 2026
…lization (#241) * feat: generalize backend failure cooldown state (upstream cheaper-inference#6004) * feat(autoCombo): latency/speed routing mode + pick_fastest_model MCP tool (upstream cheaper-inference#6011)
…test_model MCP tool Re-cut onto release tip: keep speed-routing + MCP tool + supporting catalog split; drop out-of-scope translator split, en.json/ci.yml/package.json orphans, and unrelated proxyFetch/responsesStreamHelpers/tokenLimitCounter refactors. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
diegosouzapw
merged commit Jul 3, 2026
72ee806
into
cheaper-inference:release/v3.8.44
2 checks passed
This was referenced Jul 3, 2026
Merged
This was referenced Jul 11, 2026
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…k_fastest_model MCP tool (cheaper-inference#6011) * feat(autoCombo): latency/speed-optimized routing mode + omniroute_pick_fastest_model MCP tool * test(translator): split responses chat request coverage * refactor(mcp): extract fastest-model tool modules * fix(i18n): cover provider icon and cors labels * test(mutation): register latency coverage files * test(ci): collect executor unit tests * refactor(ci): reduce latency path complexity * fix(mcp): include models catalog module * feat(autoCombo): latency/speed-optimized routing + omniroute_pick_fastest_model MCP tool Re-cut onto release tip: keep speed-routing + MCP tool + supporting catalog split; drop out-of-scope translator split, en.json/ci.yml/package.json orphans, and unrelated proxyFetch/responsesStreamHelpers/tokenLimitCounter refactors. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: kooshapari <kooshapari@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@outlook.com> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
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
Adds a dedicated speed-optimized routing mode that scores every provider×model pair in a combo against TTFT, tokens-per-second, E2E latency, p95 latency, circuit-breaker health, failure rate, and latency stability (std-dev) — and ranks them so the fastest reliable pair wins.
The runtime router (
routerStrategy.ts → LatencyStrategyImpl) and the new MCP tool (omniroute_pick_fastest_model) now share a single pure scoring core atopen-sse/services/autoCombo/speedRanking.ts → rankBySpeed(), so the user-facing preview and the live router pick the same winner.What
rankBySpeed(candidates, weights?)— pure scoring function. Per-candidate factor breakdown (ttft/tps/e2e/p95/health/reliability/stability), weighted composite, OPEN-circuit penalty, deterministic ordering. Tunable weights viaSpeedRankingWeights(defaults bias toward perceived speed: TTFT 0.30, TPS 0.20, E2E 0.20, p95 0.10, health 0.08, reliability 0.07, stability 0.05).LatencyStrategyImplrefactored to delegate torankBySpeed— the runtime router now benefits from the same rigorous scoring (was previously onlyp95LatencyMs+errorRate).omniroute_pick_fastest_model(schemas/tools.ts+tools/advancedTools.ts) — returns the full ranked list with per-factor scores and per-metric breakdown, not just a winner. Optionally applies the result to a target combo by switching its strategy toauto+autoRoutingStrategy: "latency".includeUnhealthy=trueretains OPEN-circuit candidates (default drops them).open-sse/services/autoCombo/__tests__/speedRanking.test.tscovering: ranking stability, OPEN-circuit drop, weights effect, missing-telemetry neutrality, deterministic tie-breaks, malformed-input rejection, fast-but-flaky vs steady slower, apply-to-combo mutation.Why
The current
latencystrategy is naive — it invertsp95LatencyMsagainst the pool max and adds1 - errorRate, ignoring TTFT (the metric users actually feel), tokens-per-second (throughput), E2E latency, and latency stability (a flaky-fast provider can devastate UX). This PR brings the strategy up to par with how users actually think about "fast".Test results
autoCombo.test.ts+ 12 newspeedRanking.test.ts+ 8 existingroutingStrategyTool.test.ts+ 12 un-touched tests in adjacent files.open-sse/mcp-server/__tests__/{cacheTools,dbHealthTool,essentialTools,httpAuthContext,toolSearch.catalog,toolSearch.tool}.test.tsare unrelated — caused by missingsafe-regexdependency onccrQuery.ts, present on upstreamrelease/v3.8.44before this PR.tsc --noEmit -p open-sse/tsconfig.jsonclean (only pre-existingbaseUrlTS7 deprecation).eslintclean on all 6 modified files (only 3 pre-existing@typescript-eslint/no-explicit-anywarnings in unrelatedmemoryToolsregistration).Files
open-sse/services/autoCombo/speedRanking.tsopen-sse/services/autoCombo/routerStrategy.tsLatencyStrategyImpl→rankBySpeed; drop dead helpersopen-sse/mcp-server/schemas/tools.tspickFastestModelInput/pickFastestModelOutput/pickFastestModelToolopen-sse/mcp-server/tools/advancedTools.tshandlePickFastestModelhandleropen-sse/mcp-server/server.tsomniroute_pick_fastest_modelopen-sse/services/autoCombo/__tests__/speedRanking.test.tsCHANGELOG.md[3.8.44] → ✨ New FeaturesCompatibility
ProviderCandidate(health,quotaRemainingPct,capacityScore, etc. used by the MCP input mapping) are optional — existing callers are unaffected.routerStrategy: "latency"value, same response shape fromselect(), just a more accurate winner.LatencyStrategyImplfor the average case (TTFT-heavy for perceived speed, reliability multiplier prevents flakey-fast wins).Closes #6010