chore: Add Opus 4.6 with 1M context window [OPUS-46] (#9301)
opus 4.6 1M version
This commit is contained in:
committed by
Caren Thomas
parent
34159ffa21
commit
644f7b9d5d
@@ -71,7 +71,7 @@ class AnthropicClient(LLMClientBase):
|
||||
else:
|
||||
betas.append("interleaved-thinking-2025-05-14")
|
||||
|
||||
# 1M context beta for Sonnet 4/4.5 when enabled
|
||||
# 1M context beta for Sonnet 4/4.5 or Opus 4.6 when enabled
|
||||
try:
|
||||
from letta.settings import model_settings
|
||||
|
||||
@@ -79,6 +79,8 @@ class AnthropicClient(LLMClientBase):
|
||||
llm_config.model.startswith("claude-sonnet-4") or llm_config.model.startswith("claude-sonnet-4-5")
|
||||
):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
elif model_settings.anthropic_opus_1m and llm_config.model.startswith("claude-opus-4-6"):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -118,7 +120,7 @@ class AnthropicClient(LLMClientBase):
|
||||
else:
|
||||
betas.append("interleaved-thinking-2025-05-14")
|
||||
|
||||
# 1M context beta for Sonnet 4/4.5 when enabled
|
||||
# 1M context beta for Sonnet 4/4.5 or Opus 4.6 when enabled
|
||||
try:
|
||||
from letta.settings import model_settings
|
||||
|
||||
@@ -126,6 +128,8 @@ class AnthropicClient(LLMClientBase):
|
||||
llm_config.model.startswith("claude-sonnet-4") or llm_config.model.startswith("claude-sonnet-4-5")
|
||||
):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
elif model_settings.anthropic_opus_1m and llm_config.model.startswith("claude-opus-4-6"):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -291,7 +295,7 @@ class AnthropicClient(LLMClientBase):
|
||||
else:
|
||||
betas.append("interleaved-thinking-2025-05-14")
|
||||
|
||||
# 1M context beta for Sonnet 4/4.5 when enabled
|
||||
# 1M context beta for Sonnet 4/4.5 or Opus 4.6 when enabled
|
||||
try:
|
||||
from letta.settings import model_settings
|
||||
|
||||
@@ -299,6 +303,8 @@ class AnthropicClient(LLMClientBase):
|
||||
llm_config.model.startswith("claude-sonnet-4") or llm_config.model.startswith("claude-sonnet-4-5")
|
||||
):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
elif model_settings.anthropic_opus_1m and llm_config.model.startswith("claude-opus-4-6"):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -849,6 +855,8 @@ class AnthropicClient(LLMClientBase):
|
||||
and (model.startswith("claude-sonnet-4") or model.startswith("claude-sonnet-4-5"))
|
||||
):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
elif model and model_settings.anthropic_opus_1m and model.startswith("claude-opus-4-6"):
|
||||
betas.append("context-1m-2025-08-07")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user