Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
0ca6a23
Configure Alice custom inference workspace
sauagarwa Nov 12, 2026
c0ca6cb
Allow OpenClaw automation create commands
sauagarwa Nov 16, 2026
124d26f
Update custom inference server
sauagarwa Nov 18, 2026
91f1b8c
Simplify container-mode saw-users entries for static GitOps
sauagarwa Nov 18, 2026
1a0b143
Resolve leftover rebase conflict in OpenShell 0.1.6 release notes
sauagarwa Nov 18, 2026
70885c1
Add make saw-init and prepare this cluster for container workspaces
sauagarwa Nov 19, 2026
79a98c0
Name alice's model and require it for custom-inference entries
sauagarwa Nov 19, 2026
c44414d
Remove alice's first container registration
sauagarwa Nov 19, 2026
0e78e16
Re-register alice as generation 2
sauagarwa Nov 19, 2026
597359c
Use the in-cluster governance interceptor build
sauagarwa Nov 19, 2026
a3cfa5c
Let the RHDH portal create container workspaces from containerDefaults
sauagarwa Nov 19, 2026
7d6f7e4
fix(network): refresh container topology after cluster restart
sauagarwa Nov 20, 2026
976015d
fix(alice): restore VM deployment with scoped inference secret
sauagarwa Nov 20, 2026
e759a09
fix(alice): disable unavailable web search on VM
sauagarwa Nov 20, 2026
db1961a
Default alice's custom model to medium thinking
sauagarwa Nov 23, 2026
754487b
Turn reasoning off for alice's custom model
sauagarwa Nov 23, 2026
733c306
Keep the medium case in the thinking-level test
sauagarwa Nov 23, 2026
68764a3
Set alice's model to 32k output, 128k context, high thinking, no reas…
sauagarwa Nov 23, 2026
5f225a6
Drop container-network.yaml and the in-cluster interceptor image
sauagarwa Nov 30, 2026
8ee9123
Use alice's stable Vault prefix without the registration id
sauagarwa Nov 30, 2026
c6b4488
Find VMs waiting on a restart and survive the poweroff disconnect
sauagarwa Nov 30, 2026
7490b8e
docs: drop the stale saw-init block and the 0.1.6 trace note
sauagarwa Nov 30, 2026
d3893cf
docs: tidy the container installation guide
sauagarwa Nov 30, 2026
42905ac
Read the custom model's settings from the inference Secret
sauagarwa Nov 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions charts/openshell-rhdh/files/create-workspace-for-user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ spec:
inference__url: {title: 'inference: Endpoint base URL (OpenAI-compatible, ending in /v1)',
type: string, pattern: '^https?://'}
inference__model: {title: 'inference: Model', type: string}
inference__thinking: {title: 'inference: Default thinking level', type: string}
inference__reasoning: {title: 'inference: Reasoning model (true or false)', type: string}
inference__max_tokens: {title: 'inference: Maximum output tokens', type: string}
inference__context_window: {title: 'inference: Context window (tokens)', type: string}
required: [inference__api_key, inference__url, inference__model]
allOf:
- if:
Expand Down Expand Up @@ -116,11 +120,13 @@ spec:
stringData: {action: create, token: '${{ secrets.backstageToken }}', profile: '${{ parameters.profile
}}', deploymentMode: '${{ parameters.deploymentMode }}', forUser: '${{ parameters.forUser
}}', inference.api_key: '${{ secrets.inference__api_key }}', inference.url: '${{ parameters.inference__url
}}', inference.model: '${{ parameters.inference__model }}', web-search.api_key: '${{ secrets.web_search__api_key
}}', inference.cuda_model: '${{ parameters.inference__cuda_model }}', gmail.client_id: '${{
secrets.gmail__client_id }}', gmail.client_secret: '${{ secrets.gmail__client_secret }}',
gmail.refresh_token: '${{ secrets.gmail__refresh_token }}', slack.bot_token: '${{ secrets.slack__bot_token
}}'}
}}', inference.model: '${{ parameters.inference__model }}', inference.thinking: '${{ parameters.inference__thinking
}}', inference.reasoning: '${{ parameters.inference__reasoning }}', inference.max_tokens: '${{
parameters.inference__max_tokens }}', inference.context_window: '${{ parameters.inference__context_window
}}', web-search.api_key: '${{ secrets.web_search__api_key }}', inference.cuda_model: '${{
parameters.inference__cuda_model }}', gmail.client_id: '${{ secrets.gmail__client_id }}',
gmail.client_secret: '${{ secrets.gmail__client_secret }}', gmail.refresh_token: '${{ secrets.gmail__refresh_token
}}', slack.bot_token: '${{ secrets.slack__bot_token }}'}
- id: run
name: Start the pipeline
action: http:backstage:request
Expand Down
15 changes: 11 additions & 4 deletions charts/openshell-rhdh/files/create-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ spec:
inference__url: {title: 'inference: Endpoint base URL (OpenAI-compatible, ending in /v1)',
type: string, pattern: '^https?://'}
inference__model: {title: 'inference: Model', type: string}
inference__thinking: {title: 'inference: Default thinking level', type: string}
inference__reasoning: {title: 'inference: Reasoning model (true or false)', type: string}
inference__max_tokens: {title: 'inference: Maximum output tokens', type: string}
inference__context_window: {title: 'inference: Context window (tokens)', type: string}
required: [inference__api_key, inference__url, inference__model]
allOf:
- if:
Expand Down Expand Up @@ -108,10 +112,13 @@ spec:
stringData: {action: create, token: '${{ secrets.backstageToken }}', profile: '${{ parameters.profile
}}', deploymentMode: '${{ parameters.deploymentMode }}', inference.api_key: '${{ secrets.inference__api_key
}}', inference.url: '${{ parameters.inference__url }}', inference.model: '${{ parameters.inference__model
}}', web-search.api_key: '${{ secrets.web_search__api_key }}', inference.cuda_model: '${{
parameters.inference__cuda_model }}', gmail.client_id: '${{ secrets.gmail__client_id }}',
gmail.client_secret: '${{ secrets.gmail__client_secret }}', gmail.refresh_token: '${{ secrets.gmail__refresh_token
}}', slack.bot_token: '${{ secrets.slack__bot_token }}'}
}}', inference.thinking: '${{ parameters.inference__thinking }}', inference.reasoning: '${{
parameters.inference__reasoning }}', inference.max_tokens: '${{ parameters.inference__max_tokens
}}', inference.context_window: '${{ parameters.inference__context_window }}', web-search.api_key: '${{
secrets.web_search__api_key }}', inference.cuda_model: '${{ parameters.inference__cuda_model
}}', gmail.client_id: '${{ secrets.gmail__client_id }}', gmail.client_secret: '${{ secrets.gmail__client_secret
}}', gmail.refresh_token: '${{ secrets.gmail__refresh_token }}', slack.bot_token: '${{ secrets.slack__bot_token
}}'}
- id: run
name: Start the pipeline
action: http:backstage:request
Expand Down
24 changes: 24 additions & 0 deletions charts/openshell-rhdh/files/profile-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,30 @@
"kind": "text",
"required": true,
"title": "Model"
},
{
"key": "thinking",
"kind": "text",
"required": false,
"title": "Default thinking level"
},
{
"key": "reasoning",
"kind": "text",
"required": false,
"title": "Reasoning model (true or false)"
},
{
"key": "max_tokens",
"kind": "text",
"required": false,
"title": "Maximum output tokens"
},
{
"key": "context_window",
"kind": "text",
"required": false,
"title": "Context window (tokens)"
}
],
"provider": "custom-inference",
Expand Down
46 changes: 30 additions & 16 deletions charts/openshell-saw/files/installer/apply_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -3997,9 +3997,17 @@ def start_openclaw(self, ws, sb, provider):
except ValueError as exc:
raise InstallerError(f"cannot read OpenClaw managed models: {exc}") from None
thinking = (sb.inference_values or {}).get("thinking", "")
if thinking:
# An explicit reasoning flag wins (MODEL_REASONING=false keeps a
# thinking default but sends no reasoning_effort); otherwise any
# thinking level but off marks the model as reasoning.
reasoning = (sb.inference_values or {}).get("reasoning")
if reasoning is None and thinking:
reasoning = thinking != "off"
limits = {k: (sb.inference_values or {})[k] for k in MODEL_LIMIT_KEYS
if k in (sb.inference_values or {})}
if reasoning is not None or limits:
self.mark_reasoning_model(exec_cmd, oc_env, provider.type, model_id,
reasoning=thinking != "off")
reasoning=reasoning, limits=limits)
if (sb.inference_values or {}).get("models") or previous or thinking:
current_models = self.cli(*exec_cmd, "sh", "-c",
f"{oc_env} openclaw config get agents.defaults --json",
Expand Down Expand Up @@ -4088,13 +4096,17 @@ def launch_openclaw(self, ws, sb, exec_cmd, oc_env):
self.clear_confinement_stop(ws, sb)
self.install_keepalive(ws, sb)

def mark_reasoning_model(self, exec_cmd, oc_env, provider_type, model_id, reasoning=True):
"""Set whether OpenClaw treats a custom provider's model as reasoning.
def mark_reasoning_model(self, exec_cmd, oc_env, provider_type, model_id, reasoning=True,
limits=None):
"""Set whether OpenClaw treats a custom provider's model as reasoning,
and its maxTokens / contextWindow when the profile gives them.

OpenClaw knows which of its own models reason; a custom model offers
only default and off unless its entry says reasoning: true and lists
the efforts the endpoint accepts (sent as reasoning_effort). Thinking
off marks it reasoning: false, so no effort is sent."""
off (or reasoning: false) marks it reasoning: false, so no effort is
sent. reasoning None leaves the flag as it is."""
limits = limits or {}
key = f"models.providers.{shlex.quote(provider_type)}.models"
found = self.cli(*exec_cmd, "sh", "-c", f"{oc_env} openclaw config get {key} --json",
check=False, quiet=True)
Expand All @@ -4108,19 +4120,21 @@ def mark_reasoning_model(self, exec_cmd, oc_env, provider_type, model_id, reason
entry = next((m for m in models or [] if isinstance(m, dict) and m.get("id") in (bare, model_id)), None)
if entry is None:
log(f"WARN: {provider_type} has no model entry for '{bare}'; its thinking level "
"applies only if OpenClaw already treats it as a reasoning model")
"and token limits apply only if OpenClaw already has them")
return
compat = entry.setdefault("compat", {})
efforts = REASONING_EFFORTS if reasoning else None
if entry.get("reasoning") is reasoning and compat.get("supportedReasoningEfforts") == efforts:
before = json.dumps(entry, sort_keys=True)
entry.update(limits)
if reasoning is not None:
compat = entry.setdefault("compat", {})
entry["reasoning"] = reasoning
if reasoning:
compat["supportedReasoningEfforts"] = REASONING_EFFORTS
else:
compat.pop("supportedReasoningEfforts", None)
if not compat:
entry.pop("compat")
if json.dumps(entry, sort_keys=True) == before:
return
entry["reasoning"] = reasoning
if reasoning:
compat["supportedReasoningEfforts"] = REASONING_EFFORTS
else:
compat.pop("supportedReasoningEfforts", None)
if not compat:
entry.pop("compat")
self.cli(*exec_cmd, "sh", "-c",
f"{oc_env} openclaw config set {key} {shlex.quote(json.dumps(models))}")

Expand Down
92 changes: 79 additions & 13 deletions charts/openshell-saw/files/installer/saw_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,11 @@ class Sandbox:
# (the agent, and argv, can read these): those stay on providers.
env: dict = field(default_factory=dict)
# `inference:` -- how the agent reaches its model: {providerRef, protocol,
# baseUrl?, model, models?, timeoutSeconds?, thinking?}. models maps optional native
# baseUrl?, model, models?, timeoutSeconds?, thinking?, reasoning?, maxTokens?,
# contextWindow?}. models maps optional native
# provider names to additional chat model inputs. baseUrl/model/timeoutSeconds
# is a literal or an input ({secretKeyRef: {name, key}, default?,
# and the model settings (thinking, reasoning, maxTokens, contextWindow)
# are each a literal or an input ({secretKeyRef: {name, key}, default?,
# required?, title?}); inference_values is it resolved. The installer onboards the
# agent from it (by protocol, so any profile-backed provider type works).
inference: dict = field(default_factory=dict)
Expand Down Expand Up @@ -419,9 +421,12 @@ def validate_profile_document(doc, kind, where="profile"):
if "protocol" in inference and not isinstance(inference["protocol"], str):
raise InstallerError(f"{where}: inference.protocol must be a string")
inference = _thinking_off(inference)
if "thinking" in inference and inference["thinking"] not in THINKING_LEVELS:
raise InstallerError(f"{where}: inference.thinking must be one of "
+ ", ".join(THINKING_LEVELS))
for field_name in MODEL_SETTING_KEYS:
if isinstance(inference.get(field_name), dict):
_profile_input(inference[field_name], (str,), where)
elif field_name in inference and model_setting_problem(field_name, inference[field_name]):
raise InstallerError(f"{where}: inference.{field_name} "
+ model_setting_problem(field_name, inference[field_name]))
for field_name in ("model", "baseUrl", "timeoutSeconds"):
kinds = (str, int) if field_name == "timeoutSeconds" else (str,)
if field_name in inference:
Expand Down Expand Up @@ -732,7 +737,51 @@ def _thinking_off(inference):
return inference


INFERENCE_KEYS = {"providerRef", "protocol", "baseUrl", "model", "models", "timeoutSeconds", "thinking"}
INFERENCE_KEYS = {"providerRef", "protocol", "baseUrl", "model", "models", "timeoutSeconds", "thinking",
"reasoning", "maxTokens", "contextWindow"}
# The custom model's output and context limits, written to its OpenClaw model
# entry (like NemoClaw's MODEL_MAX_TOKENS and MODEL_CONTEXT_WINDOW).
MODEL_LIMIT_KEYS = ("maxTokens", "contextWindow")
# OpenClaw model settings a profile may give as a literal or as an input
# (usually optional: {secretKeyRef, required: false}); an input that resolves
# to "" leaves the setting unapplied.
MODEL_SETTING_KEYS = ("thinking", "reasoning") + MODEL_LIMIT_KEYS


def _positive_int(value):
"""An int (or digit string) above zero; YAML booleans are not ints here."""
if isinstance(value, bool):
return False
if isinstance(value, str):
return value.isdigit() and int(value) > 0
return isinstance(value, int) and value > 0

def model_setting_problem(key, value):
"""What is wrong with a literal model setting ("" when fine)."""
if key == "thinking":
return "" if value in THINKING_LEVELS else "must be one of " + ", ".join(THINKING_LEVELS)
if key == "reasoning":
return "" if isinstance(value, bool) else "must be true or false"
return "" if _positive_int(value) else "must be a positive integer"


def parse_model_setting(key, text, what):
"""A model setting read from a Secret (text) as its typed value."""
text = text.strip()
if key == "reasoning":
if text.lower() not in ("true", "false"):
raise InstallerError(f"{what} must be true or false")
return text.lower() == "true"
if key == "thinking":
value = text.lower()
else:
value = int(text) if text.isdigit() else text
problem = model_setting_problem(key, value)
if problem:
raise InstallerError(f"{what} {problem}")
return value


# OpenClaw thinking levels a profile may make the model's default. A level
# other than off also marks the model as a reasoning model that accepts
# these efforts, which OpenClaw only assumes for its own known models.
Expand Down Expand Up @@ -964,8 +1013,19 @@ def resolve_inference(ws, sb, read_value, validate_endpoint, forbidden=()):
if timeout and (not str(timeout).isdigit() or int(timeout) < 0):
raise InstallerError(f"{where}: inference timeoutSeconds must be a non-negative integer")
out["timeoutSeconds"] = int(timeout) if timeout else 0
if spec.get("thinking"):
out["thinking"] = spec["thinking"]
for key in MODEL_SETTING_KEYS:
if key not in spec:
continue
src = spec[key]
if isinstance(src, dict):
text = resolve_bom_input(src, read_value, f"{where}: inference {key}", forbidden)
if text:
out[key] = parse_model_setting(key, text, f"{where}: inference {key}")
elif key == "thinking":
if src:
out[key] = src
else:
out[key] = int(src) if key in MODEL_LIMIT_KEYS else src
if "models" in spec:
out["models"] = {}
for name, src in spec["models"].items():
Expand Down Expand Up @@ -1025,11 +1085,17 @@ def sandbox_inference_problems(sb, provider_types, declared_provider_types=None)
for key in ("baseUrl", "model"):
if key in spec:
out += [f"inference {key} {p}" for p in input_problems(spec[key])]
if "thinking" in spec:
if spec["thinking"] not in THINKING_LEVELS:
out.append(f"inference thinking must be one of {', '.join(THINKING_LEVELS)}")
for key in MODEL_SETTING_KEYS:
if key not in spec:
continue
src = spec[key]
problems = ([f"inference {key} {p}" for p in input_problems(src)] if isinstance(src, dict)
else [f"inference {key} {model_setting_problem(key, src)}"]
if model_setting_problem(key, src) else [])
if problems:
out += problems
elif sb.type != "openclaw":
out.append("inference thinking is supported only for openclaw sandboxes")
out.append(f"inference {key} is supported only for openclaw sandboxes")
models = spec.get("models", {})
if not isinstance(models, dict):
out.append("inference models must be a mapping of provider names to model inputs")
Expand Down Expand Up @@ -1081,7 +1147,7 @@ def profiles_from_plan(data):
'SANDBOX_TYPES', 'BASE_URL_CONFIG_KEYS', 'InstallerError', 'Provider', 'Sandbox', 'Workspace',
'Profile', 'HarnessBundle', 'read_profile_files', '_yaml', 'parse_profiles', 'enabled_workspaces',
'validate_profiles', 'ENV_NAME_RE', 'CREDENTIAL_NAME_RE', 'ENV_VALUE_LIMIT', 'SANDBOX_ENV_KEYS',
'INPUT_KEYS', 'secret_ref', 'secret_ref_problems', 'INFERENCE_KEYS', 'INFERENCE_PROTOCOLS', 'THINKING_LEVELS', 'REASONING_EFFORTS',
'INPUT_KEYS', 'secret_ref', 'secret_ref_problems', 'INFERENCE_KEYS', 'MODEL_LIMIT_KEYS', 'MODEL_SETTING_KEYS', 'INFERENCE_PROTOCOLS', 'THINKING_LEVELS', 'REASONING_EFFORTS',
'PROVIDER_PROTOCOLS', 'check_env_value', 'sandbox_env_problems', 'input_problems',
'check_base_url', 'resolve_bom_input', 'resolve_inference', 'inference_protocol', 'sandbox_inference_problems', 'harness_from_plan', 'profiles_from_plan',
'validate_profile_document', 'apply_workspace_sequence', 'select_inference_provider',
Expand Down
24 changes: 24 additions & 0 deletions charts/saw-bom/profiles/custom-inference/default/sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,29 @@ spec:
title: Model
# Self-hosted models can take longer than the agent's default.
timeoutSeconds: "300"
# Optional model settings, read from the same `inference` Secret
# (values-secret.yaml). A key that is absent or empty is not applied:
# OpenClaw keeps its own default for that setting.
# The model's default thinking level (off, minimal, low, medium or high;
# a chat's /think overrides it).
thinking:
secretKeyRef: {name: inference, key: thinking}
required: false
title: Default thinking level
# false for a model that is not a reasoning model (MODEL_REASONING=false):
# no reasoning_effort is sent, whatever the thinking level.
reasoning:
secretKeyRef: {name: inference, key: reasoning}
required: false
title: Reasoning model (true or false)
# MODEL_MAX_TOKENS / MODEL_CONTEXT_WINDOW for the model's entry.
maxTokens:
secretKeyRef: {name: inference, key: max_tokens}
required: false
title: Maximum output tokens
contextWindow:
secretKeyRef: {name: inference, key: context_window}
required: false
title: Context window (tokens)
ui:
route: true
24 changes: 24 additions & 0 deletions charts/saw-users/files/profile-catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,30 @@
"kind": "text",
"required": true,
"title": "Model"
},
{
"key": "thinking",
"kind": "text",
"required": false,
"title": "Default thinking level"
},
{
"key": "reasoning",
"kind": "text",
"required": false,
"title": "Reasoning model (true or false)"
},
{
"key": "max_tokens",
"kind": "text",
"required": false,
"title": "Maximum output tokens"
},
{
"key": "context_window",
"kind": "text",
"required": false,
"title": "Context window (tokens)"
}
],
"provider": "custom-inference",
Expand Down
Loading
Loading