Implementation Notes
This path gives maximum control. You implement the provider contract once, then keep better-cmdk as the stable UI layer while backend providers evolve.
Best For
- - Teams with internal model gateways and compliance requirements
- - Products that need custom routing between multiple models
- - Engineering orgs standardizing one chat API across many apps
Quick Setup Checklist
- 1. Implement the ExternalChat-compatible adapter in your shared frontend layer.
- 2. Map request and response events to better-cmdk chat expectations.
- 3. Attach adapter telemetry for prompt, latency, and failure analysis.
- 4. Test fallback behavior when provider timeouts or quota errors occur.