Skip to content

Pattern Proposal: Pluggable LLM Provider Client

Summary

LLM access is isolated into concrete client classes so CAS code can call models through a stable interface.

Candidate Pattern

  • ID: llm-provider-client-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: Hide provider-specific model invocation and allow deterministic substitutes for local or tested flows.
  • Context: src/cas_runner/llm provides LiteLLMClient and MockLLMClient, while pyproject.toml depends on litellm.
  • Force: model provider APIs differ across vendors
  • Force: agent flows need reproducible execution without network instability
  • Force: governance logic should not embed provider details

Traceability

Artifact source: proposed-patterns