Repository navigation
Route Ollama decision-model requests (/v1/systemone) by model - #241
Open
michaelcizmar wants to merge 2 commits into
Open
michaelcizmar wants to merge 2 commits into
michaelcizmar wants to merge 2 commits into
Conversation
Classify POST /v1/systemone as inference on the Ollama facade. Decision models answer only this route, so it was forwarded verbatim to one node without checking which nodes advertise the model: requests reached nodes without the model, a 404 was not failed over, and no workload was reported. As an inference route it now gets model-owner filtering, failover on a stale-inventory 404 and workload events, like /api/chat. Fixes NVIDIA#240 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Michael Cizmar <michael@michaelcizmar.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Michael Cizmar <michael@michaelcizmar.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.
Description
Ollama decision models (capability
decision, for example a vision classifier) answer onlyPOST /v1/systemone; they refuse/api/chatand/api/generate. The Ollama facade did not classify that path, so it was forwarded verbatim to one node without checking which nodes advertise the model. In a cluster where the model lives on some nodes:404 model ... not foundto the client;404was not failed over to another owner;This classifies
POST /v1/systemoneas an inference route on the Ollama facade, so it gets the same model-owner filtering,404failover, retry budget and workload events as/api/chat.Closes #240
Release intent
Changelog title
Ollama decision-model requests are routed by model
Changelog body
/v1/systemone) now go only to nodes that have the model, fail over when a node no longer has it, and show in the Jobs list.Bumps
Scope
services/nvpair-proxy/engines.go, unit tests, and the route lists in the proxy README anddocs/getting-started.mdx.Validation
Run with Go 1.26 in a Linux container, from
services/nvpair-proxy:go vet ./...: clean.go test ./...:ok nvpair-proxy.go test -count=1 -run 'TestHandleHTTP_RoutesDecisionRequestToAModelOwner|TestRoleFor_ClassifiesOnlyDeclaredRoutes' -v ./...: the new route-classification cases andTestHandleHTTP_RoutesDecisionRequestToAModelOwnerpass. With the new route entry removed, both fail.gofmt -lon the changed Go files: clean.New tests:
TestRoleFor_ClassifiesOnlyDeclaredRoutes:POST /v1/systemoneis inference on Ollama,GET /v1/systemoneis not classified, and LM Studio does not classify the path.TestHandleHTTP_RoutesDecisionRequestToAModelOwner: with a node that lacks the model, a node whose inventory is stale (answers404) and a node that serves it, the request skips the first, fails over from the second, reaches the third with the body unchanged, and emitsworkload:submitted.Not run:
services/tests(cross-process), desktop checks,make check.Risk
Low. The path was already forwarded; it now goes through the inference path, so it is subject to the 32 MiB request-body limit and the inference retry budget like the other inference routes. Clients that relied on it reaching the selected node regardless of its model list now get the model-owner filter.
Checklist
git commit -s), certifying the Developer Certificate of Origin.services/versions.jsonis written by automation — do not edit it by hand.🤖 Generated with Claude Code