From 7b921abb1df4d34eb85044efd008298b5a12d575 Mon Sep 17 00:00:00 2001 From: Badri Narayanan S Date: Sun, 11 Jan 2026 11:16:37 +0530 Subject: [PATCH] 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 --- public/js/components/claude-config.js | 4 ++-- public/views/settings.html | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/js/components/claude-config.js b/public/js/components/claude-config.js index 8b4c645..d240ab0 100644 --- a/public/js/components/claude-config.js +++ b/public/js/components/claude-config.js @@ -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]'; } } diff --git a/public/views/settings.html b/public/views/settings.html index 72d114f..1d1e844 100644 --- a/public/views/settings.html +++ b/public/views/settings.html @@ -257,7 +257,7 @@
  • + :class="config.env.ANTHROPIC_MODEL === modelId || config.env.ANTHROPIC_MODEL === modelId + '[1m]' ? 'text-neon-cyan bg-space-800/50' : 'text-gray-300'">
    @@ -306,7 +306,7 @@
  • + :class="config.env.CLAUDE_CODE_SUBAGENT_MODEL === modelId || config.env.CLAUDE_CODE_SUBAGENT_MODEL === modelId + '[1m]' ? 'text-neon-cyan bg-space-800/50' : 'text-gray-300'">
    @@ -360,7 +360,7 @@
  • + :class="config.env.ANTHROPIC_DEFAULT_OPUS_MODEL === modelId || config.env.ANTHROPIC_DEFAULT_OPUS_MODEL === modelId + '[1m]' ? 'text-neon-cyan bg-space-800/50' : 'text-gray-300'">
    @@ -406,7 +406,7 @@
  • + :class="config.env.ANTHROPIC_DEFAULT_SONNET_MODEL === modelId || config.env.ANTHROPIC_DEFAULT_SONNET_MODEL === modelId + '[1m]' ? 'text-neon-cyan bg-space-800/50' : 'text-gray-300'">
    @@ -452,7 +452,7 @@
  • + :class="config.env.ANTHROPIC_DEFAULT_HAIKU_MODEL === modelId || config.env.ANTHROPIC_DEFAULT_HAIKU_MODEL === modelId + '[1m]' ? 'text-neon-cyan bg-space-800/50' : 'text-gray-300'">