Skip to content

When M31A says "model," it may mean a user-facing alias, a configuration alias, a concrete NIM model ID, or a position in a fallback chain. The resolution system keeps those distinct.

Main source files:

FileResponsibility
packages/core/src/services/modelConfigService.tsAlias chains, overrides, ID resolution, chains.
packages/core/src/config/defaultModelConfigs.tsBuilt-in aliases, definitions, resolutions, chains.
packages/core/src/config/models.tsShort aliases and the default NIM model.
packages/core/src/availability/policyHelpers.tsFallback chain selection and slicing.
packages/core/src/core/nvidiaNimProtocolHelpers.tsThinking effort to provider-specific fields.

1. Two kinds of aliases ​

There are two layers that both call something an alias:

Short aliases in packages/core/src/config/models.ts are auto, pro, flash, and flash-lite. All of them currently resolve to the default model nvidia/nemotron-3-ultra-550b-a55b. resolveModel() maps an unknown or empty string to that same default, and passes through any model ID containing a slash. With experimental.dynamicModelConfiguration enabled, resolveModel() delegates to modelConfigService.resolveModelId() instead.

Configuration aliases in modelConfigs.aliases are named presets that can inherit from a parent through extends. ModelConfigService builds the chain from root to leaf and merges configs as it walks, so children override parents.

Built-in examples include:

AliasExtendsNotable config
base—temperature: 0, topP: 1
chat-basebaseThoughts on, 8192 thinking budget, temperature: 1, topP: 0.95, topK: 64
flash-basebasePins the default model ID
classifierbaseflash-lite, small output and thinking budget
prompt-completionbaseflash-lite, zero thinking budget
summarizer-defaultbaseflash-lite, 2000 output tokens
chat-compression-default—Pins the default model ID

customAliases are merged over built-in aliases, and other runtime subsystems can register additional aliases programmatically. Alias chains are depth-limited to 100 entries.

2. Overrides ​

Overrides match a ModelConfigKey: model, optional overrideScope (for example a subagent name), and isRetry. Each override assigns a level based on where it matches in the alias hierarchy, then applies in order of level, specificity, and declaration order. Every field is treated equally, so a more specific override can even change the target model.

The built-in override is:

text
match: { model: "chat-base", isRetry: true }
=> temperature: 1

Set modelConfigs.overrides and modelConfigs.customOverrides in settings to add your own. This is an advanced feature; verify with /model list and a headless probe before relying on it in automation.

3. Model definitions ​

modelDefinitions is metadata, not routing logic. Each entry can declare displayName, tier (pro, flash, flash-lite, custom, auto), family, isPreview, isVisible, dialogDescription, and features such as thinking and multimodalToolUse.

ModelConfigService.getAvailableModelOptions() uses these entries, filtered by resolution context (for example hasAccessToPreview), to populate the TUI and ACP model lists. Hidden aliases such as pro and flash exist in the registry but are not shown as separate choices.

4. ID resolutions ​

modelIdResolutions maps a requested name to a concrete ID:

json
{
  "modelConfigs": {
    "modelIdResolutions": {
      "auto": {
        "default": "nvidia/nemotron-3-ultra-550b-a55b",
        "contexts": [
          {
            "condition": {"requestedModels": ["my-favorite"]},
            "target": "my-provider/my-model"
          }
        ]
      }
    }
  }
}

resolveModelId() walks contexts in order and returns the first target whose condition matches; otherwise it returns default. If the requested name has no resolution entry, it is returned unchanged. classifierIdResolutions works the same way for classifier tiers and falls back to regular model resolution when absent. Conditions can test flags such as useCustomTools, hasAccessToPreview, and requestedModels.

All built-in short aliases currently resolve to the single default NIM model, so the practical reason to customize resolutions is a custom provider or a different hosted model.

5. Fallback chains ​

modelChains maps a chain name to an ordered list of ModelPolicy entries. Each entry declares a model, isLastResort, optional maxAttempts, actions (prompt or silent) per failure kind, and stateTransitions per failure kind.

Built-in chains:

ChainBehavior
defaultOne last-resort model; prompts on every failure kind.
auto-defaultOne last-resort model with maxAttempts: 3; silent on transient failures with sticky_retry.
liteOne last-resort model; silent on all failure kinds.

applyModelSelection() chooses a chain:

  • In the dynamic path, flash-lite requests use lite; auto-preferred or auto-configured models use a chain named after the configured alias or auto-default; otherwise it falls back to a single-model chain.
  • resolveChain() resolves each entry's model ID through modelIdResolutions before use.
  • applyDynamicSlicing() rotates the chain so the currently resolved model is first. Auto and same-family selections wrap around; a model that is not in the chain produces a single-model chain with only that model.
  • In Plan Mode, chain actions are replaced with silent actions.

experimental.dynamicModelConfiguration is off by default, so the legacy hard-coded chain selection is used unless you opt in.

6. Thinking effort ​

model.thinkingEffort accepts default, off, minimal, low, medium, and high. For the main model role, M31aChat converts a non-default value into a thinkingConfig:

  • off sets includeThoughts: false and a zero budget.
  • minimal, low, medium, and high map to thinking levels and, for model families with a reasoning budget, budgets of 4096, 4096, at most 16384, and the family maximum respectively (32768 for Nemotron Ultra models).

resolveNimThinkingBodyPatch() then translates that config into provider fields per model family: reasoning_effort, reasoning_budget, or chat_template_kwargs such as thinking: true for DeepSeek and Kimi. The NIM generator adds these to the request body alongside max_tokens.

7. Verifying resolution ​

bash
m31a --list-models
m31a models list --output-format json
m31a -p "Reply with one word" --model nvidia/nemotron-3-ultra-550b-a55b -o json

In the TUI, /model list and /model set <name> inspect and change the active model. M31A_MODEL and NVIDIA_NIM_MODEL can override the model for some internal paths; --model is the user-facing flag. For a custom endpoint, see Custom provider.

Next steps ​

Built with VitePress. Powered by NVIDIA NIM.