Skip to content

Pattern Proposal: LLM Provider Adapter Boundary

Summary

The llm subpackage exposes LiteLLMClient and MockLLMClient as adapter-style wrappers, separating the core from concrete provider or test implementations.

Candidate Pattern

  • ID: llm-provider-adapter-boundary
  • Classification: architectural
  • Maturity: strategic_direction
  • Type: emerging

Observed Signals

No specific signals listed.

Evidence

Supporting Evidence

Scope Assessment

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

Rationale

  • Intent: Treat LLM access as an infrastructure boundary so the rest of the system does not depend directly on a specific client or transport.
  • Context: A Python project that integrates LiteLLM and also needs deterministic test doubles.
  • Force: External provider libraries are volatile
  • Force: Tests need a non-network or non-live client
  • Force: Upper layers should not care how messages are transported

Traceability

Artifact source: proposed-patterns