- Add openAiUseAzure flag to force Azure OpenAI client initialization
- Add "Use Azure" checkbox in API settings UI
This change improves Azure OpenAI configuration flexibility by allowing users to explicitly opt-in to Azure client, regardless of the base URL pattern.
- Rename openAiCusModelInfo to openAiCustomModelInfo across all files for better readability
- Update related variable names and references to maintain consistency
- Affects OpenAI provider, ClineProvider, WebviewMessage, API interfaces, and UI components
Adds support for configuring custom OpenAI-compatible model capabilities and pricing, including:
Max output tokens
Context window size
Image/computer use support
Input/output token pricing
Cache read/write pricing
Change:
const urlHost = new URL(this.options.openAiBaseUrl).host;
To:
const urlHost = new URL(this.options.openAiBaseUrl ?? "").host;
because the nullish coalescing operator (??) to default to an empty string if this.options.openAiBaseUrl is undefined.
It ensures that the URL constructor always receives a valid string.