Skip to content

models.mode: "replace" does not filter openclaw models list output #94705

Description

@apoapostolov

Description

Setting models.mode: "replace" with a restricted models.providers list does not filter the output of openclaw models list. Built-in provider catalogs (openai, groq, opencode-go, zai, cerebras, anthropic, etc.) continue to appear in the model list despite not being in the configured providers.

Steps to Reproduce

  1. Set models.mode to "replace" in config:
{
  "models": {
    "mode": "replace",
    "providers": ["deepseek", "xai"]
  }
}
  1. Set plugins.allow to only the desired providers:
{
  "plugins": {
    "allow": ["deepseek", "xai", "infra"]
  }
}
  1. Set agents.defaults.models as an explicit allowlist:
{
  "agents": {
    "defaults": {
      "models": {
        "deepseek/deepseek-v4-pro": true,
        "deepseek/deepseek-v4-flash": true,
        "xai/grok-4.3": true
      }
    }
  }
}
  1. Remove API keys from .env and gateway.systemd.env for unwanted providers
  2. Full gateway restart (systemctl stop + start)
  3. Run openclaw models list

Expected Behavior

openclaw models list should only show models from configured providers (deepseek + xai). The replace mode documentation suggests it replaces the built-in catalog with only the configured providers.

Actual Behavior

openclaw models list still shows 40+ models from 6 providers including openai, groq, opencode-go, zai (plus deepseek and xai).

$ openclaw models list | awk -F/ 'NR>1{print $1}' | sort -u
deepseek
groq
manifest
openai
opencode-go
xai
zai

Workaround / Observations

  • The agents.defaults.models allowlist does work at runtime — trying to switch to a non-allowlisted model correctly returns "Model is not allowed"
  • The issue is cosmetic but confusing — openclaw models list output doesn't reflect what the agent can actually use

Environment

  • OpenClaw version: 2026.6.8 (844f405)
  • OS: Linux (WSL2)
  • Node: v24.16.0
  • Config: standard openclaw.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions