role = "tier3-worker" prompt = """FIX DeepSeek implementation in ai_client.py. CONTEXT: Several tests in @tests/test_deepseek_provider.py are failing (returning '(No text returned by the model)') because the current implementation of '_send_deepseek' in @ai_client.py forces 'stream=True' and expects SSE format, but the test mocks provide standard JSON responses. TASK: 1. Modify '_send_deepseek' in @ai_client.py to handle the response correctly whether it is a stream or a standard JSON response. - You should probably determine this based on the 'stream' value in the payload (which is currently hardcoded to True, but the implementation should be flexible). - If 'stream' is True, use the iter_lines() logic to aggregate chunks. - If 'stream' is False, use resp.json() to get the content. 2. Fix the 'NameError: name 'data' is not defined' and ensure 'usage' is correctly extracted. 3. Ensure 'full_content', 'full_reasoning' (thinking tags), and 'tool_calls' are correctly captured and added to the conversation history in both modes. 4. Ensure all tests in @tests/test_deepseek_provider.py pass. OUTPUT: Provide the raw Python code for the modified '_send_deepseek' function.""" docs = ["ai_client.py", "tests/test_deepseek_provider.py"]