Skip to content
15 changes: 15 additions & 0 deletions docs/reference/commands-nemohermes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1633,16 +1633,24 @@ If cloudflared is installed but not running, the host-service section reports wh

Show the active live inference provider and model from the NemoClaw-managed OpenShell gateway.
Use this command when you want the direct runtime route without the rest of the sandbox status output.
It is also available in sandbox-first form as `nemohermes <name> inference get`.

```bash
nemohermes inference get
nemohermes inference get --json
```

The sandbox-first grammar `nemohermes <name> inference get` is also accepted and reads the same gateway-wide route, so it stays symmetric with `nemohermes <name> inference set`.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
```bash
nemohermes my-assistant inference get
```

### `nemohermes inference set`

Switch the active inference provider or model for a NemoClaw-managed OpenClaw or Hermes sandbox.
The command updates the OpenShell gateway route, patches the selected running agent config so it matches the route, recomputes the config hash, and updates the NemoClaw registry.
It is also available in sandbox-first form as `nemohermes <name> inference set --provider <provider> --model <model>`.

For Hermes, the patch updates `/sandbox/.hermes/config.yaml` (`model.default`, `model.base_url`, `model.provider: custom`, API-family mode when needed, and the OpenShell proxy API-key placeholder) and does not rebuild or restart the gateway.
Keeping the placeholder preserves dashboard and API authentication after provider switches.
Expand All @@ -1656,6 +1664,13 @@ Run `nemohermes <name> shields down`, apply the inference change, then run `nemo
nemohermes inference set --provider <provider> --model <model> [--sandbox <name>] [--no-verify] [--endpoint-url <url>] [--credential-env <ENV>] [--inference-api <api>]
```

You can also name the sandbox in sandbox-first position instead of passing `--sandbox`.
`nemohermes <name> inference set --provider <provider> --model <model>` targets `<name>` directly and is equivalent to `nemohermes inference set --provider <provider> --model <model> --sandbox <name>`.

```bash
nemohermes my-assistant inference set --provider nvidia-prod --model nvidia/nemotron-3-super-120b-a12b
```

Pass both `--provider` and `--model` when you want NemoClaw to update the OpenShell inference route and sync the selected sandbox's agent config.
If you only want the lower-level OpenShell route operation, run `openshell inference set -g nemoclaw --model <model> --provider <provider>` directly.
When either flag is missing, `nemohermes inference set` prints that OpenShell command instead of an oclif flag-validation error.
Expand Down
15 changes: 15 additions & 0 deletions docs/reference/commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2011,16 +2011,24 @@ If cloudflared is installed but not running, the host-service section reports wh

Show the active live inference provider and model from the NemoClaw-managed OpenShell gateway.
Use this command when you want the direct runtime route without the rest of the sandbox status output.
It is also available in sandbox-first form as `$$nemoclaw <name> inference get`.

```bash
$$nemoclaw inference get
$$nemoclaw inference get --json
```

The sandbox-first grammar `$$nemoclaw <name> inference get` is also accepted and reads the same gateway-wide route, so it stays symmetric with `$$nemoclaw <name> inference set`.

Comment thread
coderabbitai[bot] marked this conversation as resolved.
```bash
$$nemoclaw my-assistant inference get
```

### `$$nemoclaw inference set`

Switch the active inference provider or model for a NemoClaw-managed OpenClaw or Hermes sandbox.
The command updates the OpenShell gateway route, patches the selected running agent config so it matches the route, recomputes the config hash, and updates the NemoClaw registry.
It is also available in sandbox-first form as `$$nemoclaw <name> inference set --provider <provider> --model <model>`.

<AgentOnly variant="openclaw">

Expand All @@ -2043,6 +2051,13 @@ Run `$$nemoclaw <name> shields down`, apply the inference change, then run `$$ne
$$nemoclaw inference set --provider <provider> --model <model> [--sandbox <name>] [--no-verify] [--endpoint-url <url>] [--credential-env <ENV>] [--inference-api <api>]
```

You can also name the sandbox in sandbox-first position instead of passing `--sandbox`.
`$$nemoclaw <name> inference set --provider <provider> --model <model>` targets `<name>` directly and is equivalent to `$$nemoclaw inference set --provider <provider> --model <model> --sandbox <name>`.

```bash
$$nemoclaw my-assistant inference set --provider nvidia-prod --model nvidia/nemotron-3-super-120b-a12b
```

Pass both `--provider` and `--model` when you want NemoClaw to update the OpenShell inference route and sync the selected sandbox's agent config.
If you only want the lower-level OpenShell route operation, run `openshell inference set -g nemoclaw --model <model> --provider <provider>` directly.
When either flag is missing, `$$nemoclaw inference set` prints that OpenShell command instead of an oclif flag-validation error.
Expand Down
14 changes: 3 additions & 11 deletions src/commands/inference/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@

import { Flags } from "@oclif/core";

function nonEmptyFlag(description: string) {
return Flags.string({
description,
parse: async (input: string) => {
const trimmed = input.trim();
if (!trimmed) throw new Error(`${description} cannot be empty`);
return trimmed;
},
});
}

import { InferenceSetError, runInferenceSet } from "../../lib/actions/inference-set";
import { CLI_NAME } from "../../lib/cli/branding";
import { nonEmptyFlag } from "../../lib/cli/flag-helpers";
import { NemoClawCommand } from "../../lib/cli/nemoclaw-oclif-command";

// Global inference:set is paired with the sandbox-first sandbox:inference:set
// command; both delegate to the shared runInferenceSet action.
export default class InferenceSetCommand extends NemoClawCommand {
static id = "inference:set";
static strict = true;
Expand Down
40 changes: 40 additions & 0 deletions src/commands/sandbox/inference/get.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { InferenceGetError, runInferenceGet } from "../../../lib/actions/inference-get";
import { NemoClawCommand } from "../../../lib/cli/nemoclaw-oclif-command";
import { sandboxNameArg } from "../../../lib/sandbox/command-support";

// Sandbox-first mirror of the global inference:get command; both delegate to
// the shared runInferenceGet action that reads the gateway-wide route.
export default class SandboxInferenceGetCommand extends NemoClawCommand {
static id = "sandbox:inference:get";
static strict = true;
static enableJsonFlag = true;
static summary = "Show the active NemoClaw inference route";
static description =
"Read the live OpenShell inference route through the NemoClaw CLI. The route is gateway-wide; the sandbox name is accepted so the sandbox-scoped grammar mirrors `inference set`.";
static usage = ["<name> inference get [--json]"];
static examples = [
"<%= config.bin %> my-assistant inference get",
"<%= config.bin %> my-assistant inference get --json",
];
static args = {
sandboxName: sandboxNameArg,
};
static flags = {};

public async run(): Promise<unknown> {
await this.parse(SandboxInferenceGetCommand);
try {
const result = await runInferenceGet({ quiet: this.jsonEnabled() });
if (this.jsonEnabled()) return result;
} catch (error) {
if (error instanceof InferenceGetError) {
this.failWithLines([error.message], error.exitCode);
return;
}
throw error;
}
}
}
Loading
Loading