-
Notifications
You must be signed in to change notification settings - Fork 5
[4.D.5] Refactor backend_worker_agent, frontend_worker_agent, test_worker_agent to use LLMProvider #547
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestphase-4Phase 4: Multi-Agent CoordinationPhase 4: Multi-Agent CoordinationrefactorIssues specifically associated with the refactorIssues specifically associated with the refactor
Description
Parent
Part of #542 — Multi-provider LLM support
Depends on
#546 — worker_agent.py pattern established first
What
Three additional worker agents hardcode AsyncAnthropic directly. Apply the same refactor pattern from #546.
Files to modify
codeframe/agents/backend_worker_agent.pycodeframe/agents/frontend_worker_agent.pycodeframe/agents/test_worker_agent.py- Corresponding test files
Pattern to follow
Same as #546: replace AsyncAnthropic(api_key=...) instantiation with self.llm_provider.async_complete(). Accept llm_provider: LLMProvider | None = None in constructor with get_provider() as default.
Notes
backend_worker_agent.pyhas a fallback import (from anthropic import AsyncAnthropic) — remove entirely once abstraction is in place- Each agent may have agent-specific system prompts; keep those, only replace the LLM call layer
- If any agent uses Anthropic-specific features (extended thinking, computer use) — note them explicitly and leave a
# TODO: provider-specificcomment rather than breaking functionality
Acceptance criteria
- All three agents have no
import anthropicanywhere - Each accepts
llm_providerconstructor param - Existing tests pass
- No agent-specific functionality regressed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestphase-4Phase 4: Multi-Agent CoordinationPhase 4: Multi-Agent CoordinationrefactorIssues specifically associated with the refactorIssues specifically associated with the refactor