id selects the provider’s model or deployment.
Install the provider integration and set its credentials before running the example:
Configure a Model
The string form constructs the registered provider class with the supplied model ID. See Model as String for provider keys and API variants.
Retry Model Requests
Configure retries on the model class for transient provider errors such as rate limits and server errors:
Model retries skip non-retryable errors such as authentication failures, invalid requests, and context-window errors. A retry after a streaming error restarts the entire model stream. Chunks emitted before the failure remain visible to the caller.
Set
retries, delay_between_retries, and exponential_backoff on an Agent or Team to retry the full run instead of an individual model request.Learn More
Supported Model Providers
Choose a provider and configure its credentials.
Model as String
Select a registered provider class with
provider:model_id syntax.Compatibility
Compare features across model implementations.
Cache Response
Cache provider responses to avoid duplicate requests.
Fallback Models
Switch models after rate limits, outages, or context-window errors.