Add Claude Opus 4.8 support (#57984)
<img width="627" height="752" alt="Screenshot 2026-05-28 at 1 20 22 PM" src="https://github.com/user-attachments/assets/0a7825f0-73c5-49e9-b59a-83924a45de98" /> Adds Claude Opus 4.8 for BYOK providers, including Anthropic fast-mode handling and Bedrock/OpenCode model definitions. Closes AI-336 Release Notes: - Added Claude Opus 4.8 BYOK support
This commit is contained in:
1 parent
3bb2f2a61d
commit
a6b0ee9f36
7 files changed
+136
-13
No files matched your search
@@ -56,6 +56,8 @@ impl OpenCodeSubscription {
|
||||
#[derive(Clone, Debug, Default, Serialize, Deserialize, PartialEq, EnumIter)]
|
||||
pub enum Model {
|
||||
// -- Anthropic protocol models --
|
||||
#[serde(rename = "claude-opus-4-8")]
|
||||
ClaudeOpus4_8,
|
||||
#[serde(rename = "claude-opus-4-7")]
|
||||
ClaudeOpus4_7,
|
||||
#[serde(rename = "claude-opus-4-6")]
|
||||
@@ -219,6 +221,7 @@ impl Model {
|
||||
|
||||
pub fn id(&self) -> &str {
|
||||
match self {
|
||||
Self::ClaudeOpus4_8 => "claude-opus-4-8",
|
||||
Self::ClaudeOpus4_7 => "claude-opus-4-7",
|
||||
Self::ClaudeOpus4_6 => "claude-opus-4-6",
|
||||
Self::ClaudeOpus4_5 => "claude-opus-4-5",
|
||||
@@ -273,6 +276,7 @@ impl Model {
|
||||
|
||||
pub fn display_name(&self) -> &str {
|
||||
match self {
|
||||
Self::ClaudeOpus4_8 => "Claude Opus 4.8",
|
||||
Self::ClaudeOpus4_7 => "Claude Opus 4.7",
|
||||
Self::ClaudeOpus4_6 => "Claude Opus 4.6",
|
||||
Self::ClaudeOpus4_5 => "Claude Opus 4.5",
|
||||
@@ -339,7 +343,8 @@ impl Model {
|
||||
}
|
||||
}
|
||||
|
||||
Self::ClaudeOpus4_7
|
||||
Self::ClaudeOpus4_8
|
||||
| Self::ClaudeOpus4_7
|
||||
| Self::ClaudeOpus4_6
|
||||
| Self::ClaudeOpus4_5
|
||||
| Self::ClaudeOpus4_1
|
||||
@@ -413,7 +418,7 @@ impl Model {
|
||||
pub fn max_token_count(&self, subscription: OpenCodeSubscription) -> u64 {
|
||||
match self {
|
||||
// Anthropic models
|
||||
Self::ClaudeOpus4_7 => 1_000_000,
|
||||
Self::ClaudeOpus4_8 | Self::ClaudeOpus4_7 => 1_000_000,
|
||||
Self::ClaudeOpus4_6 | Self::ClaudeSonnet4_6 => 1_000_000,
|
||||
Self::ClaudeSonnet4_5 => 1_000_000,
|
||||
Self::ClaudeOpus4_5 | Self::ClaudeHaiku4_5 => 200_000,
|
||||
@@ -464,7 +469,7 @@ impl Model {
|
||||
pub fn max_output_tokens(&self, subscription: OpenCodeSubscription) -> Option<u64> {
|
||||
match self {
|
||||
// Anthropic models
|
||||
Self::ClaudeOpus4_7 | Self::ClaudeOpus4_6 => Some(128_000),
|
||||
Self::ClaudeOpus4_8 | Self::ClaudeOpus4_7 | Self::ClaudeOpus4_6 => Some(128_000),
|
||||
Self::ClaudeOpus4_5
|
||||
| Self::ClaudeSonnet4_6
|
||||
| Self::ClaudeSonnet4_5
|
||||
@@ -531,7 +536,8 @@ impl Model {
|
||||
pub fn supports_images(&self) -> bool {
|
||||
match self {
|
||||
// Anthropic models support images
|
||||
Self::ClaudeOpus4_7
|
||||
Self::ClaudeOpus4_8
|
||||
| Self::ClaudeOpus4_7
|
||||
| Self::ClaudeOpus4_6
|
||||
| Self::ClaudeOpus4_5
|
||||
| Self::ClaudeOpus4_1
|
||||
@@ -596,6 +602,13 @@ impl Model {
|
||||
|
||||
pub fn supported_reasoning_effort_levels(&self) -> Option<Vec<ReasoningEffort>> {
|
||||
match self {
|
||||
Self::ClaudeOpus4_8 => Some(vec![
|
||||
ReasoningEffort::Low,
|
||||
ReasoningEffort::Medium,
|
||||
ReasoningEffort::High,
|
||||
ReasoningEffort::XHigh,
|
||||
]),
|
||||
|
||||
Self::MimoV2_5Pro | Self::MimoV2_5 => Some(vec![
|
||||
ReasoningEffort::Low,
|
||||
ReasoningEffort::Medium,
|
||||
|
||||
Reference in new issue
Block a user