Repository navigation
fix(server): stop listing auto as available because a remote's own auto is available - #473
Merged
Merged
Conversation
…by a remote's auto GET /v1/server marked auto available whenever a remote offered its own auto, which resolves on the remote. A job that names no model runs what auto resolves to here, and that is what gets forwarded, so the flag could say yes to a job the route refuses and no to one it forwards. auto now counts a remote only the way the job route would send it the job: by the preset or recognizer it resolves to here. Fixes #470
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
GET /v1/serversaidautowas available whenever a remote listed its ownautoas available. But the remote'sautoresolves on the remote. A job that names no model runs whatautoresolves to here (server.default_model, or what the hardware picks), and that is what gets forwarded. So the flag and the job route could disagree in both directions:autoisbest, the remote offersfastand its ownauto.autowas listed as available, but a job with no model was refused, since no remote offersbest.autoisfast, the remote offersfastbut its ownautois not available.autowas listed as unavailable, though a job with no model was forwarded and ran.Fix
In
src/main/api/routes/server.ts,autonow counts a remote the way the job route sends it the job:autoresolves to here, asadmitchecks;remoteChoice({})finds a remote for it, the fallback the job route uses once this server cannot run the default.The remote's own
autoflag no longer counts. Other presets are unchanged. AnAkou-Forwardedprobe still gets only what this server runs itself.The mirrors already work this way.
/healthzmodels_ready(defaultOnDisk) and the queue'snamesOffilterautoout of the names they match. The Wyominginfolisting does not look at remotes, and job admission never matched a remote'sauto.Evidence
New
tests/server-auto-remote.e2e.test.ts: both cases from the issue, each on a server with an engine and on one without. Every case also checks a job with no model against the flag (refused vs 202 and reaches the remote), and checks that a forwarded probe is not offeredauto.server.tsreverted to main: 0 pass, 4 fail.bun run checkon the branch (macOS): 3510 pass, 37 skip, 0 fail, floor met. CI green on every leg.Fixes #470