> This page is for v0.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemoclaw/llms.txt.

# Understand Provider Validation

> Understand how NemoClaw validates inference credentials, models, APIs, and streaming behavior during onboarding.

NemoClaw validates the selected provider and model before it creates a sandbox.
The request depends on the provider API that the agent uses.

## Credential Validation

Credential recovery requires interactive terminals for both standard input and standard error.
When both streams are available, choose `retry` to open the secure API-key prompt, `back` to choose another provider, or `exit` to stop onboarding.
If either stream is not an interactive terminal, NemoClaw exits with a nonzero status.
Rerun onboarding with both streams attached to retry credential entry.
NemoClaw retries transient upstream failures before it reports a provider failure.
After a fatal provider or inference-validation failure before sandbox creation, NemoClaw attempts to release an unowned NemoClaw-managed OpenShell gateway and remove its registration so provider credentials do not remain in a live process.
It preserves a gateway that another registered sandbox uses, an external supervisor owns, or whose teardown authority cannot be proven.
If listener release cannot be confirmed, NemoClaw keeps the gateway registration for recovery and reports the remaining listener.

The `nvapi-` prefix check applies only to `NVIDIA_INFERENCE_API_KEY`.
OpenRouter keys must be non-empty and begin with `sk-or-`.
Other provider keys use provider-aware validation during the retry flow.

## Native Local Provider Profile Verification

During native local endpoint onboarding, NemoClaw retains the expected OpenShell provider profile after a successful inspection and checks it again after attaching the provider.
If the profile changed or the follow-up export fails or times out, NemoClaw warns the gateway operator without rolling back the attachment.
Ask the gateway operator to inspect the profile before you rely on its credential boundary.

## Provider Requests

NemoClaw sends a provider-specific request that exercises the API surface intended for the route.

| Provider                         | Validation request                                                                                       |
| -------------------------------- | -------------------------------------------------------------------------------------------------------- |
| OpenAI                           | Tries `/responses`, then `/chat/completions`.                                                            |
| NVIDIA Endpoints                 | Uses `/v1/chat/completions` for model and smoke validation and skips `/v1/responses`.                    |
| OpenRouter                       | Uses `/v1/chat/completions` for catalog, model, and smoke validation.                                    |
| Google Gemini                    | Uses the OpenAI-compatible chat-completions path and skips `/v1/responses`.                              |
| Other OpenAI-compatible endpoint | Tries `/v1/responses` with tool-calling and streaming checks, then falls back to `/v1/chat/completions`. |
| Local NVIDIA NIM                 | Uses `/v1/chat/completions` and skips `/v1/responses`.                                                   |

For an OpenAI-compatible endpoint, the runtime defaults to `/v1/chat/completions` even when the Responses probe succeeds.
Set `NEMOCLAW_PREFERRED_API=openai-responses` before onboarding to select `/v1/responses` only after the probe verifies the required streaming behavior.
Set `NEMOCLAW_PREFERRED_API=openai-completions` to skip the Responses probe and validate Chat Completions only.
The Responses streaming check waits up to 5 seconds for `response.output_text.delta` before onboarding falls back to Chat Completions.
Some Chat Completions validation requests require a structured tool call.
If such a request reaches the output-token limit after producing only reasoning content, NemoClaw retries with a 1024-token output limit and then, when reasoning still uses the full limit, with a 4096-token output limit and a doubled request deadline.
This applies to local runtimes such as Ollama and vLLM.
Onboarding continues only when a retry returns a structured tool call.
If the last retry fails or times out, validation stops without another Chat Completions attempt.

New OpenClaw Ollama, standalone vLLM, llama.cpp, and hosted compatible selections outside the Personal tier use their recorded sandbox-attached provider for validation.
Local NVIDIA NIM, new Personal-tier hosted compatible selections, and retained shared routes use `inference.local`.
An older OpenClaw Ollama, standalone vLLM, or llama.cpp sandbox without a native attachment can use supported shared-route model switches, but cannot resume or rebuild.
Back it up and re-onboard with `--fresh --name <sandbox-name> --recreate-sandbox`.
Owned Local NVIDIA NIM sandboxes can resume or rebuild on the shared route.

## Anthropic-Compatible Requests

For OpenClaw, NemoClaw sends a non-streaming request to `/v1/messages`, then sends a streaming request to the same path.
The streaming check requires exactly one `message_start`, at least one `content_block_delta`, and one `message_stop` event.
The streaming request also forces the `emit_ok` tool through Anthropic's `tool_choice` field.
Validation requires a native `tool_use` content block named `emit_ok` and a later `message_delta` with `stop_reason: tool_use`.
Text that merely contains JSON shaped like a tool request remains assistant text and fails validation.
The corresponding diagnostics are `anthropic-streaming-missing-tool-use` and `anthropic-streaming-missing-tool-use-stop-reason`.

Set `NEMOCLAW_REASONING=true` to skip both the streaming sequence and forced tool-call checks for a reasoning-only endpoint.
Agent runs still use streaming and native tool calls, so this setting moves either defect from onboarding to runtime.

## Compatible Endpoint Probes

Compatible endpoint validation sends a real inference request because many proxies do not expose `/models`.
For an OpenAI-compatible endpoint, a reasoning model that returns only reasoning content can receive retries with larger output token limits before NemoClaw reports failure.
Route, configuration, and authentication failures still fail immediately.

During one onboarding invocation, NemoClaw can reuse one successful Chat Completions validation instead of sending the same immediate host-side request.
Reuse requires all these inputs to match:

* The public endpoint URL.
* The model ID.
* The authentication mode.
* Whether tool calling is required.
* The validated DNS IP address set.

Trailing endpoint slashes, duplicate IP addresses, and IP address order do not prevent reuse.
NemoClaw sends another validation request in any of these cases:

* Any listed input differs after NemoClaw normalizes the endpoint URL and IP address set, including when the DNS IP address set changes.
* The endpoint URL contains embedded credentials, a query string, or a fragment.
* Validation uses custom headers.
* The endpoint is an operator-trusted private endpoint.

An endpoint that is reachable only through `http://host.openshell.internal:<port>` cannot receive the host-side API probe.
Verify that route from inside the sandbox after onboarding.

For a shared OpenClaw `compatible-endpoint` selection, the compatible endpoint check validates `inference.local` from inside the sandbox.
The check runs whether or not you select a messaging channel and stops onboarding if the route fails.

## Related Topics

* [Verify the Sandbox Inference Route](verify-inference-route) to test the route the agent uses.
* [Troubleshooting](../../reference/troubleshooting#tool-calls-appear-as-assistant-text) when a local server returns tool calls as text.
* [Troubleshooting Anthropic-compatible tool-call validation](../../reference/troubleshooting#onboarding-rejects-an-anthropic-compatible-tool-call) when the forced native tool probe fails during onboarding.
* [Set Up an OpenAI-Compatible Endpoint](../custom-endpoints/set-up-openai-compatible-endpoint) for custom endpoint setup.