Skip to content

Pattern Proposal: Dual-Backend LLM Client with Mock Parity

Summary

Decouples agent logic from specific model providers using a LiteLLM adapter accompanied by a deterministic mock client.

Candidate Pattern

  • ID: dual-backend-llm-abstraction
  • Classification: intelligence
  • Maturity: established
  • Type: implemented

Observed Signals

No specific signals listed.

Evidence

Supporting Evidence

Scope Assessment

  • Evidence Strength: high
  • Confidence: high
  • Applies to: ideas-to-life-cas

Rationale

  • Intent: Enable cost-effective testing and local CI execution of agent workflows without relying on external LLM availability.
  • Context: All agent steps in cas_runner requiring LLM completions or evaluations (e.g. AgenticMerger, FlowRunner).
  • Force: Direct vendor SDK dependencies create tight coupling and test flakiness
  • Force: CI pipelines fail or incur steep costs if real LLM API calls are required on every commit

Traceability

Artifact source: proposed-patterns