feat: Add Claude Opus 4.5 model via OpenRouter

- Add anthropic/claude-opus-4.5 with aliases: opus, opus4.5, claude-opus
- Set intelligence_score to 18 (matching Gemini 3 Pro)
- Update Opus 4.1 to use opus4.1 alias only
- Update tests to reflect new alias mappings

Note: supports_function_calling and supports_json_mode set to false
following existing project pattern for Claude models, despite
OpenRouter API support for these features.
This commit is contained in:
Robert Hyman
2025-11-29 18:00:31 -05:00
parent bcfaccecd4
commit 813ce5c9f7
3 changed files with 38 additions and 12 deletions

View File

@@ -88,8 +88,10 @@ class TestOpenRouterModelRegistry:
# Test various aliases
test_cases = [
("opus", "anthropic/claude-opus-4.1"),
("OPUS", "anthropic/claude-opus-4.1"), # Case insensitive
("opus", "anthropic/claude-opus-4.5"), # opus now points to 4.5
("OPUS", "anthropic/claude-opus-4.5"), # Case insensitive
("opus4.5", "anthropic/claude-opus-4.5"),
("opus4.1", "anthropic/claude-opus-4.1"), # 4.1 still accessible
("sonnet", "anthropic/claude-sonnet-4.5"),
("o3", "openai/o3"),
("deepseek", "deepseek/deepseek-r1-0528"),
@@ -131,9 +133,10 @@ class TestOpenRouterModelRegistry:
assert config is not None
# Registry now returns ModelCapabilities objects directly
# opus alias now points to 4.5
assert config.provider == ProviderType.OPENROUTER
assert config.model_name == "anthropic/claude-opus-4.1"
assert config.friendly_name == "OpenRouter (anthropic/claude-opus-4.1)"
assert config.model_name == "anthropic/claude-opus-4.5"
assert config.friendly_name == "OpenRouter (anthropic/claude-opus-4.5)"
assert config.context_window == 200000
assert not config.supports_extended_thinking