Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
Custom providers
Custom providers (BYOK: Bring Your Own Key) let you connect to OpenAI-compatible API endpoints using your own API key. Local providers such as Ollama are also supported.ProviderConfig
TheProviderConfig class has the following properties.
| Property | Type | Description |
|---|---|---|
baseUrl | string | Required. URL of the API endpoint |
type | string|null | Provider type: openai (default), azure, or anthropic |
wireApi | string|null | API format (openai/azure only): completions (default) or responses |
apiKey | string|null | API key. Not required for local providers such as Ollama |
bearerToken | string|null | For Bearer token authentication. Takes priority over apiKey |
azure | array|null | Azure-specific options, for example ['apiVersion' => '2024-10-21'] |
Basic usage
When using a custom provider, themodel parameter is required.
Ollama (local provider)
For local providers such as Ollama,apiKey is not required.
Azure OpenAI
When using Azure OpenAI, keep these points in mind:- Always set
typetoazure(notopenai) - Set
baseUrlto host only (do not include path like/openai/v1)
Important notes
- For Azure endpoints (
*.openai.azure.com), always usetype: 'azure'. - Set
baseUrlto host only. The SDK builds request paths automatically.
onListModels handler
In BYOK mode with a custom provider, you can makeclient->listModels() call a custom handler instead of the CLI server.
Configure it with listModelsUsing().
Because the client may be re-initialized, always set listModelsUsing() before calling listModels().
null to remove the handler and return to default CLI server behavior.
listModelsUsing() is set, listModels() does not require a CLI server connection and does not use cache.
For the latest updates, see the GitHub repository.