feat: Update Claude models to Opus 4.1 and Sonnet 4.1

This commit updates all references to Claude Opus 4 and Sonnet 4 to their newer 4.1 versions throughout the codebase.

The changes include:
- Updating model names in `conf/custom_models.json` and `providers/dial.py`.
- Updating aliases and descriptions to match the new model versions.
- Updating `.env.example` to reflect the new model names.
- Updating all relevant test suites to use the new model names and ensure all tests pass.
This commit is contained in:
google-labs-jules[bot]
2025-08-17 16:08:52 +00:00
parent e6213d4ca1
commit 0959d6f0fa
12 changed files with 93 additions and 93 deletions

View File

@@ -87,9 +87,9 @@ class TestOpenRouterModelRegistry:
# Test various aliases
test_cases = [
("opus", "anthropic/claude-opus-4"),
("OPUS", "anthropic/claude-opus-4"), # Case insensitive
("claude", "anthropic/claude-sonnet-4"),
("opus", "anthropic/claude-opus-4.1"),
("OPUS", "anthropic/claude-opus-4.1"), # Case insensitive
("claude", "anthropic/claude-sonnet-4.1"),
("o3", "openai/o3"),
("deepseek", "deepseek/deepseek-r1-0528"),
("mistral", "mistralai/mistral-large-2411"),
@@ -105,9 +105,9 @@ class TestOpenRouterModelRegistry:
registry = OpenRouterModelRegistry()
# Should be able to look up by full model name
config = registry.resolve("anthropic/claude-opus-4")
config = registry.resolve("anthropic/claude-opus-4.1")
assert config is not None
assert config.model_name == "anthropic/claude-opus-4"
assert config.model_name == "anthropic/claude-opus-4.1"
config = registry.resolve("openai/o3")
assert config is not None
@@ -131,8 +131,8 @@ class TestOpenRouterModelRegistry:
# Registry now returns ModelCapabilities objects directly
assert config.provider == ProviderType.OPENROUTER
assert config.model_name == "anthropic/claude-opus-4"
assert config.friendly_name == "OpenRouter (anthropic/claude-opus-4)"
assert config.model_name == "anthropic/claude-opus-4.1"
assert config.friendly_name == "OpenRouter (anthropic/claude-opus-4.1)"
assert config.context_window == 200000
assert not config.supports_extended_thinking