M31A uses NVIDIA NIM as its model backend. Authentication uses an NVIDIA API key sent as a bearer token to the OpenAI-compatible NIM endpoint.
Set an API key
export NVIDIA_API_KEY="nvapi-..."
m31aYou can also authenticate interactively inside the app with the /auth slash command. Keys entered through /auth are stored in the per-user M31A configuration directory rather than in your shell profile.
Authentication types and precedence
The runtime detects NVIDIA NIM when NVIDIA_API_KEY is present. The effective key is resolved in this order:
- the
NVIDIA_API_KEYenvironment variable, - a key saved by
/authin local storage, - an explicitly configured provider key, when using a custom OpenAI-compatible provider.
Related settings live under security.auth in your settings file:
selectedType— the currently selected authentication type,enforcedType— a required type; a mismatch prompts you to switch,useExternal— whether to use an external authentication flow.
List available models
m31a --list-models
m31a models listInside the TUI, use /model list or /model set <name> to inspect and change the active model. The default model is nvidia/nemotron-3-ultra-550b-a55b.
Custom OpenAI-compatible providers
M31A can target additional OpenAI-compatible endpoints. Provider selection is exposed through:
- the
--provider <id>CLI flag, - the
M31A_PROVIDER,M31A_PROVIDER_API_KEY,M31A_PROVIDER_BASE_URL,M31A_PROVIDER_HEADERS, andM31A_PROVIDER_MODELenvironment variables, - the provider registry in
@m31a/core.
When using a custom provider, keep credentials in environment variables or the secure credential store — never in a workspace M31A.md file or a committed settings file.
Model configuration
Model behavior is controlled by the model settings object:
{
"model": {
"name": "nvidia/nemotron-3-ultra-550b-a55b",
"thinkingEffort": "default",
"contextWindow": 128000,
"maxSessionTurns": -1,
"compressionThreshold": 0.5
}
}See Settings reference for all model keys, including aliases, overrides, resolutions, and fallback chains in modelConfigs.
Troubleshooting authentication
| Symptom | Resolution |
|---|---|
| "You must specify the NVIDIA_API_KEY environment variable" | Export the key or run /auth. |
| Rate-limit errors | Wait and retry; check your NVIDIA NIM quota. |
| Unknown model | Run --list-models and select a published NIM slug. |
| Key appears in tool output | Enable security.environmentVariableRedaction.enabled. |
Next steps
Continue with the quickstart.