agents.defaults.model and agents.defaults.modelSelectionScope: which model an agent uses, what it falls back to, and how far a model change applies.

agents.defaults.model

{
  agents: {
    defaults: {
      models: {
        "anthropic/claude-opus-4-6": { alias: "opus" },
        "minimax/MiniMax-M2.7": { alias: "minimax" },
      },
      model: {
        primary: "anthropic/claude-opus-4-6",
        fallbacks: ["minimax/MiniMax-M2.7"],
      },
      utilityModel: "openai/gpt-5.4-mini",
      imageModel: {
        primary: "openrouter/qwen/qwen-2.5-vl-72b-instruct:free",
        fallbacks: ["openrouter/google/gemini-2.0-flash-vision:free"],
      },
      mediaModels: {
        image: {
          primary: "openai/gpt-image-2",
          fallbacks: ["google/gemini-3.1-flash-image"],
        },
        video: {
          primary: "qwen/wan2.6-t2v",
          fallbacks: ["qwen/wan2.6-i2v"],
        },
      },
      pdfModel: {
        primary: "anthropic/claude-opus-4-6",
        fallbacks: ["openai/gpt-5.4-mini"],
      },
      params: { cacheRetention: "long" }, // global default provider params
      pdfMaxMb: 10,
      pdfMaxPages: 20,
      thinkingDefault: "low",
      fastModeDefault: false,
      verboseDefault: "off",
      toolProgressDetail: "explain",
      reasoningDefault: "off",
      elevatedDefault: "on",
      mediaMaxMb: 5,
      maxConcurrent: 4,
    },
  },
}

Leaving agents.defaults.timeoutSeconds unset gives ordinary agent runs the 48-hour default. Set it only when you need a different whole-run limit; see Agent runtime.

agents.defaults.modelSelectionScope

Scope for chat commands and Gateway session model updates without an explicit scope. The default is "session": changing a model in one chat does not change other chats or the configured default, including when the caller is an owner/admin.

{
  agents: { defaults: { modelSelectionScope: "session" } },
}
Value Effect
"session" Change only the current session's model selection.
"agent" Also update the current agent's explicit primary at agents.entries.<agent>.model, creating that primary when needed. Never change the shared global fallback.
"global" Also update the shared agents.defaults.model fallback. Do not replace other agents' explicit primaries or other sessions' pins.
Unset Change only the current session, the same as "session".

Agent/global writes require an explicit scope flag or configuration choice. Explicit /model flags -s/--session, -a/--agent, and -g/--global take precedence over the setting. Without owner/admin authority, bare commands remain session-only and explicit -a or -g requests are rejected. Telegram callback pickers and the embedded local TUI remain session-only even when this setting is configured. There are no per-agent or per-channel overrides of this setting.

Agent and global updates can affect new and existing unpinned sessions and cron jobs that inherit the changed default on their next run. They do not rewrite other sessions' explicit model selections. /model default -s clears only the current session's selection so it inherits the current configured default. Selecting the effective configured default clears the session model pin, but agent/global scope still requests a write to the configured target. See Model selection in chat for persistence, permissions, and picker behavior.