How to add a new model provider
NOTE: Adding new provider needs few changes in different places. In the future providers configuration can be centralized or even provided from external API
-
Add a new model
loader.py
andwrapper.py
under thebackend/app/services/models/models
- Create a folder with the provider name e.g
openai
- Implement the loader and the wrapper based on the interfaces
ModelLoader
andLLMInterface
- Add the new model provider enum in
ModelProvider
under thebackend/app/services/models/models/config.py
- Create a folder with the provider name e.g
class ModelProvider(str, Enum):
GOOGLE = "google"
OPENAI = "openai"
ANTHROPIC = "anthropic"
HUGGINGFACE = "huggingface"
...
- Utilize the model in the agent_manager service under the
backend/app/services/agents/agent_manager.py
- Add the provider logo under the
frontend/static/images/logos
- Add the new provider under the supported models API under the
backend/app/api/v1/endpoints/models.py