Skip to content

refactor(sdk): read managed-model settings through ServiceDefinition - #13105

Merged
cv merged 9 commits into
v1from
refactor/sdk-service-accessors
Oct 13, 2026
Merged

cv merged 9 commits into
v1from
refactor/sdk-service-accessors

Conversation

@cv

@cv cv commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Adds ServiceDefinition accessors for managed-model settings, so code outside the registry stops matching on vLLM and Ollama itself.

Why

Two places matched ServiceDefinition::Vllm(s) | Ollama(s) outside registry.rs:

  • the context advisory, to read serving.context_tokens;
  • preserve_docker_models, to read update_policy.

preserve_docker_models also rebuilt each model container's address with format!("nemoclaw_inference_service.inference_{name}") and format!("nemoclaw_ollama_service.{name}"). Those strings copy the installers' private address helpers. If the installers' naming changed, the update protection would stop finding the container, and nothing would report it.

Change

  • ServiceDefinition::context_tokens, update_policy, and model_address return None for an Ollama proxy.
  • model_address calls the new installers::{vllm, ollama}::service_address, which use the installers' own address helpers.
  • preserve_docker_models still skips only Recreate; every other policy protects the container.

Validation

  • cargo test -p nemoclaw-sdk --lib: 210 passed, including docker_model_updates_preserve_running_containers_unless_recreation_is_explicit, which finds the protected vLLM and Ollama addresses among the compiled targets.
  • cargo ci on linux_arm64: all steps passed.

cv added 4 commits October 13, 2026 10:36
ObservationError lost Copy in #13056, and #13081 merged after it with a test
that moves the class twice, so the SDK integration tests no longer compile on
v1 and CI fails at clippy.
Move the OpenClaw and Hermes context advisory out of Deployment::run into
deployment::context_advisory, which returns the warnings for a validated
document. Unit tests call it directly; one test still checks that plan and
apply report the same warnings before creating state or starting a mutation.
Add ServiceDefinition::context_tokens, update_policy, and model_address so the
context advisory and Docker model preservation no longer match on vLLM and
Ollama themselves. model_address uses each installer's own address helper, so
preservation can no longer drift from the compiled resource address.
Base automatically changed from refactor/sdk-context-advisory to v1 October 13, 2026 18:30
@cv
cv enabled auto-merge (squash) October 13, 2026 18:46
…cessors

# Conflicts:
#	crates/nemoclaw-sdk/src/deployment/context_advisory.rs
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit 10a4f5d into v1 Oct 13, 2026
@cv
cv deleted the refactor/sdk-service-accessors branch October 13, 2026 19:10
@wscurran wscurran added area: architecture Architecture, design debt, major refactors, or maintainability area: providers Inference provider integrations and provider behavior platform: container Affects Docker, containerd, Podman, or images provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior refactor PR restructures code without intended behavior change labels Oct 13, 2026
@wscurran wscurran added the v1 NemoClaw v1 branch label Oct 28, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: architecture Architecture, design debt, major refactors, or maintainability area: providers Inference provider integrations and provider behavior platform: container Affects Docker, containerd, Podman, or images provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior refactor PR restructures code without intended behavior change v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants