Skip to content

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 ​

bash
export NVIDIA_API_KEY="nvapi-..."
m31a

You 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:

  1. the NVIDIA_API_KEY environment variable,
  2. a key saved by /auth in local storage,
  3. 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 ​

bash
m31a --list-models
m31a models list

Inside 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, and M31A_PROVIDER_MODEL environment 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:

json
{
  "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 ​

SymptomResolution
"You must specify the NVIDIA_API_KEY environment variable"Export the key or run /auth.
Rate-limit errorsWait and retry; check your NVIDIA NIM quota.
Unknown modelRun --list-models and select a published NIM slug.
Key appears in tool outputEnable security.environmentVariableRedaction.enabled.

Next steps ​

Continue with the quickstart.

Built with VitePress. Powered by NVIDIA NIM.