> This page is for version Latest (default).
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemoclaw/latest/llms.txt

> 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.

# Configure Model Limits

> Context-window and output-token limits for a NemoClaw-managed sandbox.

## Set Pi Model Metadata

Pi accepts an explicit context window, maximum output-token count, and reasoning flag.

| Variable                  | Values                                  | Default                          |
| ------------------------- | --------------------------------------- | -------------------------------- |
| `NEMOCLAW_CONTEXT_WINDOW` | Positive integer up to `4194304` tokens | Unset; Pi uses the model default |
| `NEMOCLAW_MAX_TOKENS`     | Integer from `1` to `1000000000` tokens | Unset; Pi uses the model default |
| `NEMOCLAW_REASONING`      | `true` or `false`                       | Unset; Pi uses the model default |

Export the values before onboarding.

```bash
export NEMOCLAW_CONTEXT_WINDOW=65536
export NEMOCLAW_MAX_TOKENS=8192
export NEMOCLAW_REASONING=true
nemoclaw onboard --agent pi --name <sandbox-name>
```

NemoClaw validates each supplied value and writes it to `/sandbox/.pi/agent/models.json` through the managed startup profile.
An invalid value fails before Pi starts.
Pi does not support `NEMOCLAW_REASONING_EFFORT`.

## Recreate a Pi Sandbox

A normal Pi rebuild replays the recorded context window, maximum output-token count, and reasoning flag.
Changing those values requires a fresh replacement.
Keep an independent copy first when you need an extra recovery point, then export the new values and recreate the sandbox.

```bash
nemoclaw onboard --agent pi --name <sandbox-name> --fresh --recreate-sandbox
```

Pi has no runtime `inference set` configuration path.
Use the same fresh replacement flow to change its provider or model.

## Related Topics

* [Run and Manage Pi](../manage-sandboxes/run-pi) for rebuild and recovery behaviour.
* [Pi Support and Security](../reference/pi-support) for supported inference and credential boundaries.