Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions crates/forge_app/src/dto/anthropic/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ fn get_context_length(model_id: &str) -> Option<u64> {
return Some(1_000_000);
}

// Claude Sonnet 5 (1M context)
if model_id.starts_with("claude-sonnet-5") {
return Some(1_000_000);
}

// Current models (200K context)
if model_id.starts_with("claude-sonnet-4-5-")
|| model_id.starts_with("claude-haiku-4-5-")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ impl ModelSpecificReasoning {
AnthropicModelFamily::AdaptiveOnly
} else if id.contains("opus-4-6")
|| id.contains("46-opus")
|| id.contains("sonnet-5")
|| id.contains("sonnet-4-6")
|| id.contains("46-sonnet")
{
Expand Down
6 changes: 3 additions & 3 deletions crates/forge_repo/src/provider/anthropic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ impl<H: HttpInfra> Anthropic<H> {
}

/// Returns false when the model auto-enables interleaved thinking through
/// adaptive thinking (Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 4.6). When the model
/// is unknown (e.g., listing endpoints), the flag is included because it is
/// harmless on non-chat endpoints and necessary on older chat models.
/// adaptive thinking (Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 5, Sonnet 4.6). When
/// the model is unknown (e.g., listing endpoints), the flag is included because
/// it is harmless on non-chat endpoints and necessary on older chat models.
fn interleaved_thinking_required(model: Option<&ModelId>) -> bool {
let Some(model) = model else { return true };
let id = model.as_str().to_lowercase();
Expand Down
70 changes: 70 additions & 0 deletions crates/forge_repo/src/provider/provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,16 @@
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
Expand Down Expand Up @@ -1453,6 +1463,46 @@
"supports_reasoning": true,
"input_modalities": ["text"]
},
{
"id": "global.anthropic.claude-sonnet-5",
"name": "Claude Sonnet 5 (Global)",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "us.anthropic.claude-sonnet-5",
"name": "Claude Sonnet 5 (US)",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "eu.anthropic.claude-sonnet-5",
"name": "Claude Sonnet 5 (EU)",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "anthropic.claude-sonnet-5",
"name": "Claude Sonnet 5",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "global.anthropic.claude-sonnet-4-6",
"name": "Claude Sonnet 4.6 (Global)",
Expand Down Expand Up @@ -2305,6 +2355,16 @@
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
Expand Down Expand Up @@ -2847,6 +2907,16 @@
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-5",
"name": "Claude Sonnet 5",
"description": "The best combination of speed and intelligence",
"context_length": 1000000,
"tools_supported": true,
"supports_parallel_tool_calls": true,
"supports_reasoning": true,
"input_modalities": ["text", "image"]
},
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
Expand Down
Loading