test: Add comprehensive test coverage for Opus 4.5 aliases

Address review feedback:
- Add test for claude-opus alias in test_alias_resolution
- Add tests for anthropic/claude-opus-4.5 full name and opus4.5 alias
  in test_registry_capabilities
This commit is contained in:
Robert Hyman
2025-11-29 18:23:44 -05:00
parent 813ce5c9f7
commit cf63fd2544
2 changed files with 11 additions and 0 deletions

View File

@@ -313,6 +313,16 @@ class TestOpenRouterRegistry:
assert caps.model_name == "anthropic/claude-opus-4.5"
assert caps.context_window == 200000 # Claude's context window
# Test using full model name for 4.5
caps = registry.get_capabilities("anthropic/claude-opus-4.5")
assert caps is not None
assert caps.model_name == "anthropic/claude-opus-4.5"
# Test opus4.5 alias
caps = registry.get_capabilities("opus4.5")
assert caps is not None
assert caps.model_name == "anthropic/claude-opus-4.5"
# Test using full model name for 4.1
caps = registry.get_capabilities("anthropic/claude-opus-4.1")
assert caps is not None

View File

@@ -90,6 +90,7 @@ class TestOpenRouterModelRegistry:
test_cases = [
("opus", "anthropic/claude-opus-4.5"), # opus now points to 4.5
("OPUS", "anthropic/claude-opus-4.5"), # Case insensitive
("claude-opus", "anthropic/claude-opus-4.5"),
("opus4.5", "anthropic/claude-opus-4.5"),
("opus4.1", "anthropic/claude-opus-4.1"), # 4.1 still accessible
("sonnet", "anthropic/claude-sonnet-4.5"),