#1478·claudian

Claude provider: the picker shows a model name the plugin never verifies against the model it actually sends

Author: HuHong-TaoCreated Sep 30, 2026Updated Sep 30, 2026

Claude provider: the picker shows a model name the plugin never verifies against the model it actually sends

Environment

  • Claudian 2.3.9, Obsidian 1.13.7, macOS
  • Provider: Claude Code (local claude CLI behind a self-hosted Anthropic-compatible gateway)
  • loadUserSettings: true, no provider-level environmentVariables

What happens

Every model slot in the picker can display one model name while the plugin sends a different model — with no warning anywhere in the UI.

My config, from claudian-settings.json, providerConfigs.claude.selectedModels:

json
[
  { "value": "opus",   "label": "deepseek/deepseek-v4.1-flash",    "resolvedModel": "group/auto-deepseek-v4-1-flash[1m]" },
  { "value": "fable",  "label": "meta/muse-spark-1.3-contributor", "resolvedModel": "group/auto-deepseek-v4-1-flash[1m]" },
  { "value": "sonnet", "label": "Qwen/Qwen3.8-Flash",              "resolvedModel": "group/auto-deepseek-v4-1-flash[1m]" },
  { "value": "haiku",  "label": "deepseek/deepseek-v4.1-flash",    "resolvedModel": "group/auto-deepseek-v4-1-flash[1m]" }
]

Four slots, four different displayed names, one and the same resolvedModel. Selecting "Qwen/Qwen3.8-Flash" sends DeepSeek. Selecting "meta/muse-spark-1.3-contributor" sends DeepSeek. The picker renders label; resolvedModel is internal only, so the mismatch is invisible.

The gateway's own request log confirms what actually went out — the four slots collapse onto one upstream model:

103  commandcode/deepseek/deepseek-v4.1-flash
 14  group/auto-deepseek-v4-1-flash
  8  commandcode/meta/muse-spark-1.3-contributor

How the data gets into this state

claude CLI's supportedModels() returns per slot a value, a displayName, and a resolvedModel. Claudian stores the triple directly (main.js: value: b.value, resolvedModel: b.resolvedModel, label: b.displayName) and never checks the three agree.

They are populated from two independent sources, so they can drift apart freely:

field env var it comes from
displayName / label ANTHROPIC_DEFAULT_<SLOT>_MODEL_NAME
resolvedModel / value ANTHROPIC_DEFAULT_<SLOT>_MODEL

In my ~/.claude/settings.json these two were set inconsistently — the _MODEL variables all held the same value, the _NAME variables each held a different one:

ANTHROPIC_DEFAULT_OPUS_MODEL      = group/auto-deepseek-v4-1-flash[1m]
ANTHROPIC_DEFAULT_OPUS_MODEL_NAME = deepseek/deepseek-v4.1-flash
ANTHROPIC_DEFAULT_SONNET_MODEL      = group/auto-deepseek-v4-1-flash[1m]
ANTHROPIC_DEFAULT_SONNET_MODEL_NAME = Qwen/Qwen3.8-Flash
ANTHROPIC_DEFAULT_HAIKU_MODEL      = group/auto-deepseek-v4-1-flash[1m]
ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME = deepseek/deepseek-v4.1-flash
ANTHROPIC_DEFAULT_FABLE_MODEL      = group/auto-deepseek-v4-1-flash[1m]
ANTHROPIC_DEFAULT_FABLE_MODEL_NAME = meta/muse-spark-1.3-contributor

That is a legitimate way for a user's model switcher/gateway to configure Claude Code: it rewrites the _MODEL variables when the user picks a model, leaving _NAME as the label. In my case a local gateway app did exactly this and recorded the write:

json
{ "claude": { "at": "2026-09-30T11:05:22", "fields": { "model": "group/auto-deepseek-v4-1-flash[1m]" } } }

So the env vars are not "misconfigured" in any sense Claudian can assume — they are two fields with different owners, and they will differ in normal use.

A second way the displayed name drifts

modelAliases overrides label after the fact (main.js):

javascript
label: modelAliases?.[n.value] || n.label

With my aliases { "fable": "Muse1.3 Contributor", "sonnet": "Qwen3.8Flash", ... } the picker shows yet another name that corresponds to neither displayName nor resolvedModel. Whatever is displayed, it is never reconciled with what will be sent.

Why this is worth fixing

It is silent. Nothing errors, nothing warns, and the wrong model answers. The user believes they selected a specific model — the whole point of having per-slot configuration is to route different work to different models (a cheap one for titles, a strong one for reasoning). Collapsing them all onto one model while the UI claims otherwise defeats that, and the only way I found out was reading the gateway's request log, outside the plugin.

Related but distinct: #1472 reports resolvedModel being ignored so the CLI default is used instead, surfacing as a 400. That is a different failure — it is loud, and the displayed name was not in question. This one is the opposite: the request succeeds, and the label is what lies.

What I'd suggest

Any one of these would close the hole; I'd take the first:

  1. Validate on discovery — when displayName and resolvedModel disagree, surface it (inline warning in the picker, or flag the entry), instead of rendering a name that is not what gets sent.
  2. Show both — render resolvedModel as the authoritative text, with displayName as secondary. Right now the effective model is the one thing the UI never shows.
  3. Make modelAliases opt-in for display only, and keep it from being the sole visible identifier of a model.

Notes

  • Happy to test a build against my gateway; I can capture the supportedModels() payload for all four slots if that helps.
  • I can also reproduce on demand by pointing the _MODEL vars at one model and leaving _NAME distinct — that's a two-line settings change, no gateway needed.