AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(Platform): add claude 4 sonnet and opus models to platform (#10018)
Bentlydc981b52a3b9
diff --git a/autogpt_platform/backend/backend/blocks/llm.py b/autogpt_platform/backend/backend/blocks/llm.pyindex 675b77ee5d..2ff5687f5c 100644--- a/autogpt_platform/backend/backend/blocks/llm.py+++ b/autogpt_platform/backend/backend/blocks/llm.py@@ -101,6 +101,8 @@ class LlmModel(str, Enum, metaclass=LlmModelMeta):GPT4_TURBO = "gpt-4-turbo"GPT3_5_TURBO = "gpt-3.5-turbo"# Anthropic models+ CLAUDE_4_OPUS = "claude-opus-4-20250514"+ CLAUDE_4_SONNET = "claude-sonnet-4-20250514"CLAUDE_3_7_SONNET = "claude-3-7-sonnet-20250219"CLAUDE_3_5_SONNET = "claude-3-5-sonnet-latest"CLAUDE_3_5_HAIKU = "claude-3-5-haiku-latest"@@ -184,6 +186,12 @@ MODEL_METADATA = {), # gpt-4-turbo-2024-04-09LlmModel.GPT3_5_TURBO: ModelMetadata("openai", 16385, 4096), # gpt-3.5-turbo-0125# https://docs.anthropic.com/en/docs/about-claude/models+ LlmModel.CLAUDE_4_OPUS: ModelMetadata(+ "anthropic", 200000, 8192+ ), # claude-4-opus-20250514+ LlmModel.CLAUDE_4_SONNET: ModelMetadata(+ "anthropic", 200000, 8192+ ), # claude-4-sonnet-20250514LlmModel.CLAUDE_3_7_SONNET: ModelMetadata("anthropic", 200000, 8192), # claude-3-7-sonnet-20250219diff --git a/autogpt_platform/backend/backend/data/block_cost_config.py b/autogpt_platform/backend/backend/data/block_cost_config.pyindex 1e15b5f620..8e6ca55f7e 100644--- a/autogpt_platform/backend/backend/data/block_cost_config.py+++ b/autogpt_platform/backend/backend/data/block_cost_config.py@@ -47,6 +47,8 @@ MODEL_COST: dict[LlmModel, int] = {LlmModel.GPT4O: 3,LlmModel.GPT4_TURBO: 10,LlmModel.GPT3_5_TURBO: 1,+ LlmModel.CLAUDE_4_OPUS: 21,+ LlmModel.CLAUDE_4_SONNET: 5,LlmModel.CLAUDE_3_7_SONNET: 5,LlmModel.CLAUDE_3_5_SONNET: 4,LlmModel.CLAUDE_3_5_HAIKU: 1, # $0.80 / $4.00