Skip to main content

Custom Provider

Implement the ModelProvider interface to add support for any LLM API. Once implemented, your custom provider works with agents, teams, workflows, and RAG—just like the built-in providers.

ModelProvider Interface

Your provider must implement:

Example Skeleton


Register with ModelRegistry

Register your provider so it can be resolved by ID:

StreamChunk Types

When implementing stream(), yield these chunk types:

Full Example