From 05544eca15a655aea74ecda77d3a555759205a39 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 25 May 2025 15:53:47 +0200 Subject: [PATCH] Added support for Claude 4 models to Anthropic provider (#482) --- .../Provider/Anthropic/ProviderAnthropic.cs | 10 ++++++++++ app/MindWork AI Studio/wwwroot/changelog/v0.9.45.md | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/MindWork AI Studio/Provider/Anthropic/ProviderAnthropic.cs b/app/MindWork AI Studio/Provider/Anthropic/ProviderAnthropic.cs index 75c424d4..7ff631fd 100644 --- a/app/MindWork AI Studio/Provider/Anthropic/ProviderAnthropic.cs +++ b/app/MindWork AI Studio/Provider/Anthropic/ProviderAnthropic.cs @@ -89,6 +89,8 @@ public sealed class ProviderAnthropic(ILogger logger) : BaseProvider("https://ap { var additionalModels = new[] { + new Model("claude-opus-4-0", "Claude Opus 4.0 (Latest)"), + new Model("claude-sonnet-4-0", "Claude Sonnet 4.0 (Latest)"), new Model("claude-3-7-sonnet-latest", "Claude 3.7 Sonnet (Latest)"), new Model("claude-3-5-sonnet-latest", "Claude 3.5 Sonnet (Latest)"), new Model("claude-3-5-haiku-latest", "Claude 3.5 Haiku (Latest)"), @@ -114,6 +116,14 @@ public sealed class ProviderAnthropic(ILogger logger) : BaseProvider("https://ap { var modelName = model.Id.ToLowerInvariant().AsSpan(); + // Claude 4.x models: + if(modelName.StartsWith("claude-opus-4") || modelName.StartsWith("claude-sonnet-4")) + return [ + Capability.TEXT_INPUT, Capability.MULTIPLE_IMAGE_INPUT, + Capability.TEXT_OUTPUT, + + Capability.OPTIONAL_REASONING, Capability.FUNCTION_CALLING]; + // Claude 3.7 is able to do reasoning: if(modelName.StartsWith("claude-3-7")) return [ diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.45.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.45.md index 7746e2dd..1b10be23 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.45.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.45.md @@ -1,7 +1,8 @@ # v0.9.45, build 220 (2025-05-xx xx:xx UTC) - Added chat templates. They are similar to common AI companies' playgrounds, where you can define your own system prompts and leverage assistant prompts for providers that support them. We thank Peer `peerschuett` for the work on this feature. - Added Russian as a language option for various assistants (e.g., translations, text summarization). -- Improved password and API key input fields: they now optionally display their content to allow users to verify manual input. +- Improved the password and API key input fields: they now optionally display their content to allow users to verify manual input. +- Improved the Anthropic provider by adding aliase and capabilities for the new Claude 4 models. - Improved the German translation. - Changed the design of the data source settings to match the new design. - Moved the chat options: you can access them directly from the chat interface.