Summary
Claude Desktop 1.6259.1 adds client-side model name validation in Gateway mode that rejects any model name not containing Anthropic-specific keywords (claude, sonnet, opus, haiku, anthropic). This breaks all third-party gateway users with custom model names. The validation did not exist in 1.5354.0.
Root Cause
In app.asar → .vite/build/index.js, the gateway validation function q5r calls Jte, which checks the model name against:
// Byte offset 6215292 in index.js
const eRt = /^(sonnet|opus|haiku)(-[\d.]+)?$/;
// Byte offset 6215331
const Y5r = ["claude", "sonnet", "opus", "haiku", "anthropic"];
// Byte offset 6216424 — gateway validator
function q5r(e) {
return Jte(e)
? { ok: true }
: {
ok: false,
reason:
"expected a gateway model route referencing an Anthropic model " +
"(e.g. claude-sonnet-4-5, anthropic/claude-*). " +
"Name routes to match the underlying model.",
};
}
A model name like mimo-v2.5-pro matches neither the regex nor any keyword, so it is rejected.
Steps to Reproduce
- Install Claude Desktop (auto-updates to
1.6259.1).
- Create a gateway config at
%LOCALAPPDATA%\Claude-3p\configLibrary\<uuid>.json:
{
"inferenceProvider": "gateway",
"inferenceGatewayBaseUrl": "https://your-gateway.example.com/anthropic",
"inferenceGatewayApiKey": "sk-xxx",
"inferenceModels": [{ "name": "custom-model-v1" }]
}
- Launch Claude Desktop, select
custom-model-v1, send any message.
Expected: Message sent through gateway.
Actual: Error: expected a gateway model route referencing an Anthropic model...
What Should Happen
Gateway mode should pass through whatever model name the user configured. The gateway is responsible for routing — client-side validation of model names in gateway mode is incorrect behavior.
Proposed Fix
Remove or bypass the q5r validation for gateway connections:
function q5r(e) {
- return Jte(e)
- ? { ok: true }
- : {
- ok: false,
- reason:
- "expected a gateway model route referencing an Anthropic model " +
- "(e.g. claude-sonnet-4-5, anthropic/claude-*). " +
- "Name routes to match the underlying model.",
- };
+ return { ok: true };
}
Or gate it behind an environment variable:
function q5r(e) {
+ if (process.env.CLAUDE_CODE_SKIP_MODEL_VALIDATION) return { ok: true };
return Jte(e) ? { ok: true } : { ok: false, reason: "..." };
}
Additional Issue: Squirrel Launcher Crash
During investigation, we also found that the Squirrel launcher (%LOCALAPPDATA%\AnthropicClaude\claude.exe, 363KB, 32-bit PE) crashes with exit code -1073740791 (STATUS_INVALID_CRUNTIME_PARAMETER) when launched without arguments. This is independent of the asar issue — it crashes even with the original unmodified asar.
The app exe itself (app-1.6259.1\claude.exe, 64-bit PE) works fine when launched directly. The Squirrel launcher only works when called with explicit arguments: claude.exe --processStartAndWait claude.exe.
This means the Start Menu / desktop shortcuts (which point to the Squirrel launcher) don't work. Users must create a shortcut directly to app-1.6259.1\claude.exe.
Workaround (Verified Working)
Step 1: Replace app.asar (fixes model name validation)
Copy-Item "$env:LOCALAPPDATA\AnthropicClaude\app-1.5354.0\resources\app.asar" `
"$env:LOCALAPPDATA\AnthropicClaude\app-1.6259.1\resources\app.asar" -Force
Step 2: Create direct shortcut (bypasses broken Squirrel launcher)
$shell = New-Object -ComObject WScript.Shell
$lnk = $shell.CreateShortcut("$env:USERPROFILE\Desktop\Claude.lnk")
$lnk.TargetPath = "$env:LOCALAPPDATA\AnthropicClaude\app-1.6259.1\claude.exe"
$lnk.WorkingDirectory = "$env:LOCALAPPDATA\AnthropicClaude\app-1.6259.1"
$lnk.IconLocation = "$env:LOCALAPPDATA\AnthropicClaude\app-1.6259.1\claude.exe,0"
$lnk.Save()
Restart Claude Desktop via the new shortcut. Both steps must be re-done after each update.
Why direct patching of app.asar doesn't work: The new app.asar has an Electron integrity check (asar_util.cc:143) that rejects modified archives. The expected hash is not stored in any discoverable file — it appears to be computed or embedded in a way that cannot be updated externally.
Impact
- Affected: All third-party gateway users with custom model names (e.g. Xiaomi MiMo, corporate API gateways, any non-Anthropic inference provider).
- Not affected: Users of Anthropic API, AWS Bedrock, Google Vertex AI, or gateways that happen to use model names containing Anthropic keywords.
- CLI not affected:
claude --model <any-name> works fine — this validation only exists in the Desktop app.
Environment
- OS: Windows 11 Home China (10.0.26200)
- Claude Desktop:
1.6259.1 (regression from 1.5354.0)
- Gateway: Xiaomi MiMo API (
token-plan-cn.xiaomimimo.com)
- Model:
mimo-v2.5-pro
Related Issues
None report this specific model name validation regression.
Summary
Claude Desktop
1.6259.1adds client-side model name validation in Gateway mode that rejects any model name not containing Anthropic-specific keywords (claude,sonnet,opus,haiku,anthropic). This breaks all third-party gateway users with custom model names. The validation did not exist in1.5354.0.Root Cause
In
app.asar→.vite/build/index.js, the gateway validation functionq5rcallsJte, which checks the model name against:A model name like
mimo-v2.5-promatches neither the regex nor any keyword, so it is rejected.Steps to Reproduce
1.6259.1).%LOCALAPPDATA%\Claude-3p\configLibrary\<uuid>.json:{ "inferenceProvider": "gateway", "inferenceGatewayBaseUrl": "https://your-gateway.example.com/anthropic", "inferenceGatewayApiKey": "sk-xxx", "inferenceModels": [{ "name": "custom-model-v1" }] }custom-model-v1, send any message.Expected: Message sent through gateway.
Actual: Error:
expected a gateway model route referencing an Anthropic model...What Should Happen
Gateway mode should pass through whatever model name the user configured. The gateway is responsible for routing — client-side validation of model names in gateway mode is incorrect behavior.
Proposed Fix
Remove or bypass the
q5rvalidation for gateway connections:function q5r(e) { - return Jte(e) - ? { ok: true } - : { - ok: false, - reason: - "expected a gateway model route referencing an Anthropic model " + - "(e.g. claude-sonnet-4-5, anthropic/claude-*). " + - "Name routes to match the underlying model.", - }; + return { ok: true }; }Or gate it behind an environment variable:
function q5r(e) { + if (process.env.CLAUDE_CODE_SKIP_MODEL_VALIDATION) return { ok: true }; return Jte(e) ? { ok: true } : { ok: false, reason: "..." }; }Additional Issue: Squirrel Launcher Crash
During investigation, we also found that the Squirrel launcher (
%LOCALAPPDATA%\AnthropicClaude\claude.exe, 363KB, 32-bit PE) crashes with exit code-1073740791(STATUS_INVALID_CRUNTIME_PARAMETER) when launched without arguments. This is independent of the asar issue — it crashes even with the original unmodified asar.The app exe itself (
app-1.6259.1\claude.exe, 64-bit PE) works fine when launched directly. The Squirrel launcher only works when called with explicit arguments:claude.exe --processStartAndWait claude.exe.This means the Start Menu / desktop shortcuts (which point to the Squirrel launcher) don't work. Users must create a shortcut directly to
app-1.6259.1\claude.exe.Workaround (Verified Working)
Step 1: Replace
app.asar(fixes model name validation)Step 2: Create direct shortcut (bypasses broken Squirrel launcher)
Restart Claude Desktop via the new shortcut. Both steps must be re-done after each update.
Why direct patching of
app.asardoesn't work: The newapp.asarhas an Electron integrity check (asar_util.cc:143) that rejects modified archives. The expected hash is not stored in any discoverable file — it appears to be computed or embedded in a way that cannot be updated externally.Impact
claude --model <any-name>works fine — this validation only exists in the Desktop app.Environment
1.6259.1(regression from1.5354.0)token-plan-cn.xiaomimimo.com)mimo-v2.5-proRelated Issues
ConfigHealthstuck inprovider_errorafter cold-path helper auth succeeds #56758 — ConfigHealth stuck inprovider_errorNone report this specific model name validation regression.