LiteLLM Provider
LitellmProvider
Bases: ModelProvider
A ModelProvider that uses LiteLLM to route to any model provider. You can use it via:
See supported models here: litellm models.NOTE: API keys must be set via environment variables. If you're using models that require additional configuration (e.g. Azure API base or version), those must also be set via the environment variables that LiteLLM expects. If you have more advanced needs, we recommend copy-pasting this class and making any modifications you need.
Source code in .tmp/v0/src/agents/extensions/models/litellm_provider.py
aclose
async
Release any resources held by the provider.
Providers that cache persistent models or network connections can override this. The default implementation is a no-op.