From cf63fd25440d599f2ec006bb8cfda5b8a6f61524 Mon Sep 17 00:00:00 2001 From: Robert Hyman <13157542+brt-h@users.noreply.github.com> Date: Sat, 29 Nov 2025 18:23:44 -0500 Subject: [PATCH] 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 --- tests/test_openrouter_provider.py | 10 ++++++++++ tests/test_openrouter_registry.py | 1 + 2 files changed, 11 insertions(+) diff --git a/tests/test_openrouter_provider.py b/tests/test_openrouter_provider.py index bc67d75..b7cff4c 100644 --- a/tests/test_openrouter_provider.py +++ b/tests/test_openrouter_provider.py @@ -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 diff --git a/tests/test_openrouter_registry.py b/tests/test_openrouter_registry.py index 936d60f..1194106 100644 --- a/tests/test_openrouter_registry.py +++ b/tests/test_openrouter_registry.py @@ -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"),