Skip to content

Commit

Permalink
Add Sonnet 3.7, including thinking version
Browse files Browse the repository at this point in the history
  • Loading branch information
scosman committed Feb 27, 2025
1 parent 4731d10 commit 9f76578
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions libs/core/kiln_ai/adapters/ml_model_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ class ModelName(str, Enum):
gemma_2_27b = "gemma_2_27b"
claude_3_5_haiku = "claude_3_5_haiku"
claude_3_5_sonnet = "claude_3_5_sonnet"
claude_3_7_sonnet = "claude_3_7_sonnet"
claude_3_7_sonnet_thinking = "claude_3_7_sonnet_thinking"
gemini_1_5_flash = "gemini_1_5_flash"
gemini_1_5_flash_8b = "gemini_1_5_flash_8b"
gemini_1_5_pro = "gemini_1_5_pro"
Expand Down Expand Up @@ -208,6 +210,34 @@ class KilnModel(BaseModel):
),
],
),
# Claude 3.7 Sonnet
KilnModel(
family=ModelFamily.claude,
name=ModelName.claude_3_7_sonnet,
friendly_name="Claude 3.7 Sonnet",
providers=[
KilnModelProvider(
name=ModelProviderName.openrouter,
structured_output_mode=StructuredOutputMode.function_calling,
provider_options={"model": "anthropic/claude-3.7-sonnet"},
),
],
),
# Claude 3.7 Sonnet Thinking
KilnModel(
family=ModelFamily.claude,
name=ModelName.claude_3_7_sonnet_thinking,
friendly_name="Claude 3.7 Sonnet Thinking",
providers=[
KilnModelProvider(
name=ModelProviderName.openrouter,
provider_options={"model": "anthropic/claude-3.7-sonnet:thinking"},
reasoning_capable=True,
# For reasoning models, we need to use json_instructions with OpenRouter
structured_output_mode=StructuredOutputMode.json_instructions,
),
],
),
# DeepSeek 3
KilnModel(
family=ModelFamily.deepseek,
Expand Down

0 comments on commit 9f76578

Please sign in to comment.