Skip to content

Route Ollama decision-model requests (/v1/systemone) by model - #241

Open
michaelcizmar wants to merge 2 commits into
NVIDIA:developfrom
michaelcizmar:fix/240-ollama-decision-route
Open

michaelcizmar wants to merge 2 commits into
NVIDIA:developfrom
michaelcizmar:fix/240-ollama-decision-route

Conversation

@michaelcizmar

Copy link
Copy Markdown

Description

Ollama decision models (capability decision, for example a vision classifier) answer only POST /v1/systemone; they refuse /api/chat and /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:

  • requests reached a node without the model and returned its 404 model ... not found to the client;
  • a stale-inventory 404 was not failed over to another owner;
  • the requests never appeared as jobs.

This classifies POST /v1/systemone as an inference route on the Ollama facade, so it gets the same model-owner filtering, 404 failover, retry budget and workload events as /api/chat.

Closes #240

Release intent

Changelog title

Ollama decision-model requests are routed by model

Changelog body

  • Requests to Ollama's decision-model endpoint (/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

  • services: patch
  • nvpair-cluster-manager: none
  • nvpair-engine-manager: none
  • nvpair-errors: none
  • nvpair-job-scheduler: none
  • nvpair-manual-nodes: none
  • nvpair-node-info: none
  • nvpair-node-scanner: none
  • nvpair-node-settings: none
  • nvpair-proxy: patch
  • nvpair-tui: none
  • nvpair-ui-broker: none
  • nvpair-workload-manager: none

Scope

  • Included: one route-table entry in services/nvpair-proxy/engines.go, unit tests, and the route lists in the proxy README and docs/getting-started.mdx.
  • Excluded: other engines (LM Studio, llama.cpp and vLLM do not serve this route, so it stays a verbatim pass-through there), and any JSON-RPC or desktop change.

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 and TestHandleHTTP_RoutesDecisionRequestToAModelOwner pass. With the new route entry removed, both fail.
  • gofmt -l on the changed Go files: clean.

New tests:

  • TestRoleFor_ClassifiesOnlyDeclaredRoutes: POST /v1/systemone is inference on Ollama, GET /v1/systemone is 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 (answers 404) and a node that serves it, the request skips the first, fails over from the second, reaches the third with the body unchanged, and emits workload: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

  • I have read the Contributing Guidelines.
  • Every commit is signed off (git commit -s), certifying the Developer Certificate of Origin.
  • New or existing tests cover the change.
  • Relevant documentation is updated.
  • I checked the diff, changed filenames, and commit messages for credentials, private data, internal URLs, internal issue identifiers, and generated artifacts.
  • I recorded the validation commands and results above.
  • I declared version bumps in the release-intent block above. services/versions.json is written by automation — do not edit it by hand.

🤖 Generated with Claude Code

michaelcizmar and others added 2 commits November 25, 2026 00:17
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support Ollama's /v1/systemone (decision models): route by model, list as jobs, fail over on 404

1 participant