OpenAILike model to access them by replacing the base_url.
Example
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "not-provided" | The id of the model to use |
name | str | "OpenAILike" | The name of the model |
provider | str | "OpenAILike" | The provider of the model |
api_key | Optional[str] | "not-provided" | The API key for authentication |
base_url | Optional[str] | None | The base URL for the API service |
collect_metrics_on_completion | bool | False | Collect token metrics only from the final streaming chunk (for providers with cumulative token counts) |
OpenAILike extends the OpenAI-compatible interface and supports all parameters from OpenAIChat. Simply change the base_url and api_key to point to your preferred OpenAI-compatible service.
Responses API
For providers that implement the Open Responses API specification, useOpenResponses:
previous_response_id chaining.
For specific providers, use the dedicated classes:
- OllamaResponses for Ollama (v0.13.3+)
- OpenRouterResponses for OpenRouter