Skip to content

[P2.27] Route remaining direct provider constructions through the shared llm_resolution chain #861

Description

@frankbria

Severity: medium | Category: correctness | Follow-up to: #768 (PR #860)

Problem

#768 introduced codeframe/core/llm_resolution.py (flag → CODEFRAME_LLM_PROVIDER.codeframe/config.yaml → anthropic) and routed the CLI pre-flight, runtime.execute_agent, prd_v2, and discovery_v2 through it. Four paths still construct providers directly and ignore the chain:

  • codeframe/core/conductor.py:125SupervisorResolver.llm uses bare get_provider() (anthropic). Concrete failure: cf work batch run --strategy auto --llm-provider ollama passes pre-flight, but blocker auto-resolution downstream still demands Anthropic.
  • codeframe/core/dependency_analyzer.py:229AnthropicProvider(api_key=...) hardcoded
  • codeframe/core/prd_discovery.py:250AnthropicProvider(api_key=key) hardcoded
  • codeframe/core/adapters/streaming_chat.py:189AnthropicProvider(api_key=key) hardcoded

Acceptance criteria

Each site resolves its provider via resolve_llm_settings/create_provider (or explicitly documents why it is Anthropic-only), with a regression test per site mirroring tests/ui/test_discovery_generate_tasks.py.

Dependencies

None (builds on #768, merged)


Spun off from the #768 internal review (suggestion tier). Atomic: one developer, one session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions