From 4fa0111c331d02fdda4eb105faf4842559712137 Mon Sep 17 00:00:00 2001 From: Meleki Date: Tue, 3 Mar 2026 09:22:47 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20Erweiterte=20Model-Auswahl=20f=C3=BCr?= =?UTF-8?q?=20Agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Model-Optionen: sonnet-4-5, sonnet-4-6, opus-4-5, opus-4-6, haiku-4-5 - ChatEndpoint + TelegramService: Model-Mapping für alle Varianten - Agent-Formular: Dropdown mit allen Model-Versionen - ui.js: prettyModelName() vereinfacht für neue Model-Werte --- Endpoints/ChatEndpoint.cs | 7 ++++++- Models/AgentRecord.cs | 2 +- Services/TelegramService.cs | 7 ++++++- wwwroot/index.html | 8 +++++--- wwwroot/js/ui.js | 20 +++++++++----------- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/Endpoints/ChatEndpoint.cs b/Endpoints/ChatEndpoint.cs index 640929c..9b1f9ad 100644 --- a/Endpoints/ChatEndpoint.cs +++ b/Endpoints/ChatEndpoint.cs @@ -70,9 +70,14 @@ public static class ChatEndpoint var modelId = agent.Model switch { - "opus" => "claude-opus-4-6", "sonnet" => "claude-sonnet-4-6", + "sonnet-4-5" => "claude-sonnet-4-5", + "sonnet-4-6" => "claude-sonnet-4-6", + "opus" => "claude-opus-4-6", + "opus-4-5" => "claude-opus-4-5", + "opus-4-6" => "claude-opus-4-6", "haiku" => "claude-haiku-4-5", + "haiku-4-5" => "claude-haiku-4-5", _ => "claude-sonnet-4-6" }; diff --git a/Models/AgentRecord.cs b/Models/AgentRecord.cs index de50504..af90eec 100644 --- a/Models/AgentRecord.cs +++ b/Models/AgentRecord.cs @@ -7,7 +7,7 @@ public class AgentRecord public string Name { get; set; } public string Avatar { get; set; } // base64 data url public string Description { get; set; } - public string Model { get; set; } // sonnet, opus, haiku + public string Model { get; set; } // sonnet, sonnet-4-5, sonnet-4-6, opus, opus-4-5, opus-4-6, haiku, haiku-4-5 public string ToolChoice { get; set; } // "any" oder "auto" public string CustomCommands { get; set; } public string AutoCommit { get; set; } = ""; // "", "mention", "forbid" diff --git a/Services/TelegramService.cs b/Services/TelegramService.cs index 4653d5c..9296757 100644 --- a/Services/TelegramService.cs +++ b/Services/TelegramService.cs @@ -312,9 +312,14 @@ public class TelegramService { var modelId = agent.Model switch { - "opus" => "claude-opus-4-6", "sonnet" => "claude-sonnet-4-6", + "sonnet-4-5" => "claude-sonnet-4-5", + "sonnet-4-6" => "claude-sonnet-4-6", + "opus" => "claude-opus-4-6", + "opus-4-5" => "claude-opus-4-5", + "opus-4-6" => "claude-opus-4-6", "haiku" => "claude-haiku-4-5", + "haiku-4-5" => "claude-haiku-4-5", _ => "claude-sonnet-4-6" }; diff --git a/wwwroot/index.html b/wwwroot/index.html index e7786c1..9835cb5 100644 --- a/wwwroot/index.html +++ b/wwwroot/index.html @@ -136,9 +136,11 @@