Summary
Abstract the model client behind a provider interface and let each tenant configure a primary model + ordered fallback list across Claude, OpenAI, and self-hosted (Ollama / vLLM) endpoints.
Motivation
Vendor lock-in concerns are the #1 blocker for some enterprise deals. A pluggable model layer also lets us route cheap intent classification to a small model and reserve Claude for the heavy lifting.
Acceptance Criteria
Breaking Change Notes
The internal model call site moves; downstream forks calling anthropic.messages.create directly will need to migrate to the provider interface.
Summary
Abstract the model client behind a provider interface and let each tenant configure a primary model + ordered fallback list across Claude, OpenAI, and self-hosted (Ollama / vLLM) endpoints.
Motivation
Vendor lock-in concerns are the #1 blocker for some enterprise deals. A pluggable model layer also lets us route cheap intent classification to a small model and reserve Claude for the heavy lifting.
Acceptance Criteria
ModelProviderinterface:chat(messages, opts): AsyncIterable<Chunk>plus capability flags (streaming, tools, vision)Breaking Change Notes
The internal model call site moves; downstream forks calling
anthropic.messages.createdirectly will need to migrate to the provider interface.