async def test_gemini_follow_up_takes_precedence(self, mock_redis):
        """Test that Gemini follow-up questions take precedence over continuation offers"""
        mock_client = Mock()
        mock_redis.return_value = mock_client

        # Mock the model to return a response WITH follow-up question
        with patch.object(self.tool, "create_model") as mock_create_model:
            mock_model = Mock()
            mock_response = Mock()
            mock_response.candidates = [
                Mock(
                    content=Mock(
                        parts=[
                            Mock(
                                text="""Analysis complete. The code looks good.

```json
{
  "follow_up_question": "Would you like me to examine the error handling patterns?",
  "suggested_params": {"files": ["/src/error_handler.py"]},
  "ui_hint": "Examining error handling would help ensure robustness"
}
```"""
                            )
                        ]
                    ),
                    finish_reason="STOP",
                )
            ]
            mock_model.generate_content.return_value = mock_response
            mock_create_model.return_value = mock_model

            # Execute tool
            arguments = {"prompt": "Analyze this code"}
            response = await self.tool.execute(arguments)

            # Parse response
            response_data = json.loads(response[0].text)

            # Should be follow-up, not continuation offer
            assert response_data["status"] == "requires_continuation"
            assert "follow_up_request" in response_data
            assert response_data.get("continuation_offer") is None
Test that Gemini follow-up questions take precedence over continuation offers
tests/test_claude_continuation.py