mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
fix(router): decision call skips settled requests and ignores client cancels
Live mode no longer calls the decision model when a floor or keyword rule already fixes the tier. A client cancel during the call no longer counts toward the breaker.
This commit is contained in:
@@ -563,7 +563,8 @@ func classifySmartV2With(rt *smartRouter, req map[string]any, endpoint string, f
|
||||
rank, reason, next = smartSessionRoute(&rt.session, top, f, sc.sess, verdict, sc.now, askHash)
|
||||
out.hardRank = smartMaxInt(out.hardRank, next.pin)
|
||||
}
|
||||
if assist != nil && reason == smartReasonScore && f.found && smartNearBoundary(rt, verdict.score) {
|
||||
if assist != nil && reason == smartReasonScore && f.found && smartNearBoundary(rt, verdict.score) &&
|
||||
(!rt.decision.live || smartMaxInt(floorRank, kwRank) < smartMinInt(rank+1, top)) {
|
||||
ans := assist(f)
|
||||
newRank, outcome := applyDecision(rt, rank, ans)
|
||||
out.heuristicRank, out.decisionOutcome = rank, outcome
|
||||
|
||||
Reference in New Issue
Block a user