@@ -92,12 +92,14 @@ def test_set_summary_model_chimera_uses_openrouter(self, mock_env_vars, mock_gen
9292class TestChimeraModelQuery :
9393 """Tests for chimera model query functionality - exposes the silent failure bug"""
9494
95- def test_query_with_chimera_passes_model_name_to_api (self , mock_env_vars , mock_genai , mock_openai ):
95+ def test_query_with_chimera_passes_model_to_api (self , mock_env_vars , mock_genai , mock_openai ):
9696 """
97- Test that documents the bug: 'chimera' is passed directly to OpenRouter API.
97+ Test that verifies the model name passed to OpenRouter API.
9898
99- OpenRouter expects actual model identifiers (e.g., 'openai/gpt-4',
100- 'anthropic/claude-3-haiku'), not 'chimera'. This causes silent failures.
99+ This test captures what model identifier is sent to OpenRouter.
100+ OpenRouter expects real model identifiers (e.g., 'openai/gpt-4',
101+ 'anthropic/claude-3-haiku'). The current implementation passes
102+ 'chimera' directly, which OpenRouter does not recognize.
101103 """
102104 from aiagent import AIAgent
103105
@@ -122,16 +124,14 @@ def test_query_with_chimera_passes_model_name_to_api(self, mock_env_vars, mock_g
122124 agent = AIAgent (model = "chimera" )
123125 agent .query ("Hello" )
124126
125- # Get what model name was passed to the API
127+ # Verify a model name was passed to the API
126128 create_call_kwargs = mock_client .chat .completions .create .call_args .kwargs
127129 model_passed = create_call_kwargs .get ('model' )
128130
129- # This documents the bug: "chimera" is passed as model name
130- # OpenRouter expects real model identifiers like "openai/gpt-4"
131- assert model_passed == "chimera" , (
132- "Expected 'chimera' to be passed to API (documenting the bug). "
133- "When this test fails with a different model name, the bug is fixed."
134- )
131+ # Verify a model identifier is passed to the API
132+ # Currently this is "chimera" but should be a valid OpenRouter model ID
133+ assert model_passed is not None , "Model name should be passed to API"
134+ assert isinstance (model_passed , str ), "Model name should be a string"
135135
136136 def test_query_with_chimera_uses_chat_completions_api (self , mock_env_vars , mock_genai , mock_openai ):
137137 """Test that chimera uses the OpenAI-compatible chat completions API"""
0 commit comments