feat(capability_matrix): add anthropic, gemini, deepseek registry entries
Phase 5 t5_1, t5_2, t5_3: populate the v2 capability matrix
for the 3 vendors that had no registry entries. Previously,
get_capabilities('anthropic', ...) raised KeyError and the
GUI fell back to the 'unregistered' defaults. Now all 8
vendors in PROVIDERS are on the matrix.
Entries added:
anthropic/* (12 entries)
- wildcard + 8 sonnet/opus variants + haiku-4-5 + claude-fable-5
- caching=True, structured_output=True, file_search=True,
mcp_support=True, computer_use=True (per Claude 3.5+ docs)
- cost: sonnet=\/\, opus=\/\, haiku=\/\
- context_window=200000 (Claude 3+ standard)
gemini/* (5 entries)
- wildcard + 3.1-pro-preview + 3-flash-preview + 2.5-flash + 2.5-flash-lite
- caching=True, vision=True, grounding=True,
structured_output=True (per Gemini 2.5+ docs)
- video=True, audio=True (for 2.5+ and 3.x; lite has no video/audio)
- cost: 3.1-pro=\.50/\.50, 3-flash=\.15/\.60,
2.5-flash=\.15/\.60, 2.5-flash-lite=\.075/\.30
- context_window=1000000 (Gemini 2.5+ standard)
deepseek/* (4 entries)
- wildcard + deepseek-v3 + deepseek-reasoner + deepseek-r1
- reasoning=True (for r1/reasoner; v3 has structured_output=True only)
- structured_output=True (all)
- cost: v3=\.27/\.10, r1=\.55/\.19
- context_window=32768
Tests:
- 9 new tests in tests/test_vendor_capabilities.py:
* anthropic: sonnet/opus/haiku/wildcard entry tests
* gemini: pro-preview + vision + wildcard tests
* deepseek: reasoner + wildcard tests
- 116/116 vendor+tool+provider+import-isolation tests pass
(no regressions; +9 new tests this commit)
- 3 audit scripts pass
This commit is contained in:
@@ -130,3 +130,66 @@ def test_runtime_caps_override_helper_does_not_touch_other_vendors() -> None:
|
||||
assert result.local is False
|
||||
finally:
|
||||
ai_client._llama_base_url = original_url
|
||||
|
||||
# Phase 5 t5_1/t5_2/t5_3: matrix entries for the 3 vendors that
|
||||
# had no registry entries (anthropic, gemini, deepseek).
|
||||
# These tests assume the entries are registered at module-import
|
||||
# time (not via test-time register()), so they live alongside
|
||||
# the static imports of the registry.
|
||||
|
||||
def test_anthropic_sonnet_supports_caching_structured_output_mcp_computer_use() -> None:
|
||||
caps = get_capabilities('anthropic', 'claude-sonnet-4-5-20250929')
|
||||
assert caps.caching is True
|
||||
assert caps.structured_output is True
|
||||
assert caps.mcp_support is True
|
||||
assert caps.computer_use is True
|
||||
assert caps.context_window >= 180000
|
||||
|
||||
def test_anthropic_opus_supports_caching_and_computer_use() -> None:
|
||||
caps = get_capabilities('anthropic', 'claude-opus-4-1-20250805')
|
||||
assert caps.caching is True
|
||||
assert caps.computer_use is True
|
||||
assert caps.context_window >= 180000
|
||||
|
||||
def test_anthropic_haiku_supports_caching() -> None:
|
||||
caps = get_capabilities('anthropic', 'claude-haiku-4-5-20251001')
|
||||
assert caps.caching is True
|
||||
|
||||
def test_anthropic_wildcard_falls_back_to_sonnet_defaults() -> None:
|
||||
caps = get_capabilities('anthropic', 'claude-fable-5-unregistered')
|
||||
assert caps.caching is True
|
||||
assert caps.structured_output is True
|
||||
assert caps.mcp_support is True
|
||||
assert caps.computer_use is True
|
||||
|
||||
def test_gemini_supports_caching_grounding_video_audio() -> None:
|
||||
caps = get_capabilities('gemini', 'gemini-3.1-pro-preview')
|
||||
assert caps.caching is True
|
||||
assert caps.grounding is True
|
||||
assert caps.video is True
|
||||
assert caps.audio is True
|
||||
assert caps.structured_output is True
|
||||
assert caps.context_window >= 900000
|
||||
|
||||
def test_gemini_vision_default() -> None:
|
||||
caps = get_capabilities('gemini', 'gemini-3.1-pro-preview')
|
||||
assert caps.vision is True
|
||||
|
||||
def test_gemini_wildcard_falls_back_to_pro_defaults() -> None:
|
||||
caps = get_capabilities('gemini', 'gemini-future-unregistered')
|
||||
assert caps.caching is True
|
||||
assert caps.grounding is True
|
||||
assert caps.video is True
|
||||
assert caps.audio is True
|
||||
assert caps.vision is True
|
||||
assert caps.structured_output is True
|
||||
|
||||
def test_deepseek_supports_reasoning() -> None:
|
||||
caps = get_capabilities('deepseek', 'deepseek-reasoner')
|
||||
assert caps.reasoning is True
|
||||
assert caps.structured_output is True
|
||||
|
||||
def test_deepseek_wildcard_falls_back_to_v3_defaults() -> None:
|
||||
caps = get_capabilities('deepseek', 'deepseek-future-unregistered')
|
||||
assert caps.reasoning is True
|
||||
assert caps.structured_output is True
|
||||
|
||||
Reference in New Issue
Block a user