Skip to content

Export the verified selected Ollama model instead of a fixed model name #11857

Description

@cv

Parent: #10904. Implementation target: main.

Problem and outcome

An attached Ollama daemon can already serve a selected installed model, but export accepts only qwen3.5:9b. Export the actual selected model and independently verified digest using the existing attached-daemon/managed-proxy topology.

At f5c05a0e6a59bd5133c50e31becbff25af274c33, the schema fixes servedName to EXPORTED_OLLAMA_MODEL; proxy observation rejects other selections and emits that constant despite already reading the selected model's digest from both daemon and proxy.

Before / after

Before

At the recorded source revision, ollama-model uses the existing attached local daemon and authenticated managed proxy, with qwen2.5:0.5b selected and installed. The retained selection, live route, proxy model list and daemon model list agree.

nemoclaw config export ollama-model --output ollama-model.yaml

Export still exits nonzero without publishing YAML because the observer and schema allow only qwen3.5:9b.

After

The same source exports its actual selected model. For a fixture using daemon port 11434 and proxy port 11435, the serving fragment is below. The digest is a synthetic test value; production output must use the digest independently observed on both sides.

# spec.inferenceProviders[0].serving
backend: ollama
daemon:
  management: external
  hostPort: 11434
proxy:
  management: nemoclaw
  hostPort: 11435
model:
  servedName: qwen2.5:0.5b
  digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

The primary route also selects qwen2.5:0.5b. Other installed models are not exported or modified, and the existing qwen3.5:9b export remains valid.

A missing or duplicate selected model, differing/invalid digests, stale route, changed proxy mapping or unstable observation still refuses publication. Tests must prove successful non-default-model export and verify that export never pulls, deletes or replaces a model or reconfigures the proxy.

Scope

Native Linux, Docker, OpenClaw, an attached local Ollama daemon and the existing authenticated managed proxy. Accept model identities admitted by the existing selection/route contract; use one already-supported non-default installed model as the positive case.

Acceptance

  • Export a non-default selection such as qwen2.5:0.5b with its exact served name and normalized SHA-256 digest; keep the existing default-model output unchanged.
  • Require one unambiguous selected-model entry in both bounded model responses, matching digests, and agreement with the live route and retained selection.
  • Reject missing/duplicate selected models, invalid or differing digests, changed proxy backend/PID/ports and unstable observations.
  • Leave unrelated installed models external and out of the document.
  • Tests prove export performs no model pull, creation, deletion or proxy reconfiguration; qualify with the existing Ollama export scenario.

Daemon/model lifecycle expansion, custom model-building inputs and additional platforms are separate work.

Delivery boundary

Extend the existing observation → verification → document builder → schema → publication pipeline. Export remains read-only and emits credential references only. Preserve successful existing exports and refusals for unrelated unsupported state. Regenerate the checked-in schema when its source changes.

Use a failing behavioral test before implementation, focused schema/action tests, and an existing installed-CLI scenario for the real boundary. Reuse coverage work in #11485; branch-to-branch translation and deployment parity remain with #11810. This issue does not add config-driven apply, resource adoption, or change existing onboarding inputs.

YAML requirements — v1 scan (2026-09-21)

Target: v1 at 88c6600c06b0. The document version is nemoclaw.nvidia.com/v1alpha1, with kind: NemoClawConfig.

Format: Available. YAML availability does not establish exporter completion or live compatibility.

This is the current target reference. Earlier examples describe their original revision; this update does not change issue status.

The attached-daemon target is a named service at spec.services.<name>:

YAML path within the service Requirement
kind Literal ollamaProxy (camel case).
image Required immutable proxy image; current schema has no omitted-image default.
engine Optional local Docker Unix socket; omission uses the managed gateway engine.
endpoint Proxy publication: admitted private/loopback HTTP IPv4 address, verified proxy port, /v1.
upstream.endpoint External loopback Ollama HTTP endpoint, verified daemon port, and /v1 path.
upstream.model.name / digest Verified selected model name and immutable digest.

Provider serviceRef selects this service; omit provider endpoint and credential. Route overrides.model must match upstream.model.name.

Preserve daemon and proxy ownership separately. Do not emit the superseded provider-inline ollamaProxy/serving shape. The current format still requires an admitted proxy image and address; do not invent them from incomplete source evidence.

The selected model is not a fixed qwen fallback. Preserve the observed name, digest and route agreement for every admitted source model.

Acceptance for this mapping: Parse the raw result and verify agreement between the observed model, service model and agent route. Refuse missing, mismatched or changed model evidence.

Sources: registry.rs, config.rs, configuration.md.

Exporter acceptance scope

Apply these requirements to the feature or regression covered by this issue and its accepted scope.

  1. Define v1-compatible YAML. Document the required fields and an example using apiVersion: nemoclaw.nvidia.com/v1alpha1 and kind: NemoClawConfig. Record the target v1 revision and verify compatibility with its parser. If a required format does not exist, mark it N/A and link the schema dependency. N/A does not satisfy this requirement.
  2. Export the target feature. The real configuration exporter must export the feature from a representative, admitted v0 deployment. Preserve the issue's required settings in the generated YAML. The raw output must pass the target v1 parser without manual field rewriting or a compatibility translator.
  3. Provide manual or E2E proof with the real exporter. Attach a manual reproduction or an E2E run using the installed or built exporter CLI against a real source deployment. Record the source feature setup, exporter version/commit, target v1 commit, command, output artifact or run link, and result. Show that export succeeds, the required feature settings are preserved, and the raw YAML passes target validation. A handwritten example or mocked builder test alone does not satisfy this requirement.

For E2E proof, identify the owning feature or migration scenario and reuse it where possible. Deterministic mapping tests remain responsible for field and refusal cases; the live proof covers the real source-to-exporter boundary.

This section defines acceptance requirements; it does not assert that the evidence is already complete.

Activity

  1. added
    enhancement
    area: cli
    on Sep 15, 2026
  2. self-assigned this
    on Sep 16, 2026
  3. added a commit that references this issue on Sep 16, 2026
    4e5ccf7
  4. added
    area: providers
    provider: ollama
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: cliarea: providersenhancementprovider: ollama

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions