From f24d40a65f58b7df5b54e796dfbb568cb32c43cd Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 12 Aug 2026 13:48:50 +0000 Subject: [PATCH] fix(ai-chat): drop redundant "(free)" suffix from OpenRouter model names OpenRouter appends "(free)" to the display name of its free-tier model variants (e.g. "Liquid AI: LFM2.5-2.6B (free)"). The ":free" model id already conveys this, so the suffix is redundant in the human-facing name shown across Puter and the developer docs. Strip a trailing "(free)" from the coerced display name while keeping the original name as an alias so existing references still resolve. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_018q5AWeB6pvt3LPHYxknis6 --- .../ai-chat/providers/openrouter/OpenRouterProvider.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backend/drivers/ai-chat/providers/openrouter/OpenRouterProvider.ts b/src/backend/drivers/ai-chat/providers/openrouter/OpenRouterProvider.ts index 74a254418..e30d1165c 100644 --- a/src/backend/drivers/ai-chat/providers/openrouter/OpenRouterProvider.ts +++ b/src/backend/drivers/ai-chat/providers/openrouter/OpenRouterProvider.ts @@ -268,12 +268,17 @@ export class OpenRouterProvider implements IChatProvider { if (!microcentCosts.request) { microcentCosts.request = 0; } + // OpenRouter appends "(free)" to the display name of its free-tier + // model variants. The ":free" model id already conveys that, so + // drop the redundant suffix from the human-facing name. + const displayName = model.name.replace(/\s*\(free\)\s*$/i, ''); coerced_models.push({ id: `openrouter:${model.id}`, - name: `${model.name} (OpenRouter)`, + name: `${displayName} (OpenRouter)`, aliases: [ model.id, model.name, + displayName, `openrouter/${model.id}`, model.id.split('/').slice(1).join('/'), ],