Repository navigation
refactor(sdk): extract the managed-model context advisory - #13104
Merged
Merged
Conversation
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.
cv
enabled auto-merge (squash)
October 13, 2026 18:12
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-13104.docs.buildwithfern.com/nemoclaw |
cv
added a commit
that referenced
this pull request
Oct 13, 2026
…13105) Adds `ServiceDefinition` accessors for managed-model settings, so code outside the registry stops matching on vLLM and Ollama itself. Stacked on #13104. ## 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.
gaveezy
added a commit
that referenced
this pull request
Oct 13, 2026
PR-7 now includes v1 337d668 (#13104), which moves the OpenClaw and Hermes context advisory from `Deployment::run` into `deployment::context_advisory` and its tests into context_advisory/tests.rs. deployment/context_warnings.rs conflicted: #13104 deletes it, and PR-8 changes its tests. The resolution deletes the file and ports PR-8's test changes to context_advisory/tests.rs: - The eight tests that cover both Docker examples also cover the cluster vLLM and Ollama examples. - The tests that used only the Docker vLLM example use the cluster vLLM example, which authors maxTokens 2048 and contextWindow 32768. - `with_route_budget` is gone; it added that budget to the Docker vLLM example. The ported tests call `context_warnings` after `defaults` and `validate`, as #13104's tests do. PR-8 changes no advisory code: the advisory already reads `serving.contextTokens` from cluster vLLM and Ollama services. deployment/mod.rs merges cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
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.
Moves the OpenClaw and Hermes context advisory out of
Deployment::runinto its own module. The warnings stay the same.Why
#13059 added about 90 lines of advisory logic inline in
Deployment::run, between validation and opening the state store. Each of its four warnings repeated the(self.progress)(Progress::Warning { … })call. Its tests went throughDeployment::planandapplyagainst a missing bundle, and almost every case looped over both operations.Change
deployment::context_advisory::context_warnings(&Document) -> Result<Vec<String>, ConfigError>returns the warnings in sandbox and route order.Deployment::runemits each one asProgress::Warningat the same point as before.defaultsandvalidatethatrunperforms.plan_and_apply_report_the_advisory_before_creating_state_or_mutating, checks that plan and apply report the same warnings before they create state or start a mutation. That covers the wiring the old per-test loops checked.One difference:
runnow emits warnings after evaluating every route, not as it goes. The lookups that could fail at that point already passedvalidate, so the output is the same.Validation
cargo test -p nemoclaw-sdk --lib deployment::: 107 passed (12 advisory tests before, 13 now).cargo cion linux_arm64: all steps passed.