fix(webui): remove space before [1m] suffix in Gemini model names

The WebUI was generating model names like "gemini-3-flash [1m]" with a
space before the suffix, causing 404 errors when Claude Code used
sub-agents. Changed to "gemini-3-flash[1m]" (no space).

Fixes #97

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Badri Narayanan S
2026-01-11 11:16:37 +05:30
parent a06cd30f61
commit 7b921abb1d
2 changed files with 7 additions and 7 deletions

View File

@@ -61,7 +61,7 @@ window.Components.claudeConfig = () => ({
// Fix: Case-insensitive check for gemini
if (val && /gemini/i.test(val)) {
if (enabled && !val.includes('[1m]')) {
this.config.env[field] = val.trim() + ' [1m]';
this.config.env[field] = val.trim() + '[1m]';
} else if (!enabled && val.includes('[1m]')) {
this.config.env[field] = val.replace(/\s*\[1m\]$/i, '').trim();
}
@@ -82,7 +82,7 @@ window.Components.claudeConfig = () => ({
// If 1M mode is enabled and it's a Gemini model, append the suffix
if (this.gemini1mSuffix && modelId.toLowerCase().includes('gemini')) {
if (!finalModelId.includes('[1m]')) {
finalModelId = finalModelId.trim() + ' [1m]';
finalModelId = finalModelId.trim() + '[1m]';
}
}