# Implementation Plan: DeepSeek API Provider Support ## Phase 1: Infrastructure & Common Logic - [ ] Task: Initialize MMA Environment `activate_skill mma-orchestrator` - [ ] Task: Update `credentials.toml` schema and configuration logic in `project_manager.py` to support `deepseek` - [ ] Task: Define the `DeepSeekProvider` interface in `ai_client.py` and align with existing provider patterns - [ ] Task: Conductor - User Manual Verification 'Infrastructure & Common Logic' (Protocol in workflow.md) ## Phase 2: DeepSeek API Client Implementation - [ ] Task: Write failing tests for `DeepSeekProvider` model selection and basic completion - [ ] Task: Implement `DeepSeekProvider` using the dedicated SDK - [ ] Task: Write failing tests for streaming and tool calling parity in `DeepSeekProvider` - [ ] Task: Implement streaming and tool calling logic for DeepSeek models - [ ] Task: Conductor - User Manual Verification 'DeepSeek API Client Implementation' (Protocol in workflow.md) ## Phase 3: Reasoning Traces & Advanced Capabilities - [ ] Task: Write failing tests for reasoning trace capture in `DeepSeekProvider` (DeepSeek-R1) - [ ] Task: Implement reasoning trace processing and integration with discussion history - [ ] Task: Write failing tests for token estimation and cost tracking for DeepSeek models - [ ] Task: Implement token usage tracking according to DeepSeek pricing - [ ] Task: Conductor - User Manual Verification 'Reasoning Traces & Advanced Capabilities' (Protocol in workflow.md) ## Phase 4: GUI Integration & Final Verification - [ ] Task: Update `gui_2.py` and `theme_2.py` (if necessary) to include DeepSeek in the provider selection UI - [ ] Task: Implement automated regression tests for the full DeepSeek lifecycle (prompt, streaming, tool call, reasoning) - [ ] Task: Verify overall performance and UI responsiveness with the new provider - [ ] Task: Conductor - User Manual Verification 'GUI Integration & Final Verification' (Protocol in workflow.md)