mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
feat: add explicit Azure OpenAI flag and setup memory bank docs
- 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.
This commit is contained in:
@@ -18,7 +18,7 @@ export class OpenAiHandler implements ApiHandler, SingleCompletionHandler {
|
||||
this.options = options
|
||||
// Azure API shape slightly differs from the core API shape: https://github.com/openai/openai-node?tab=readme-ov-file#microsoft-azure-openai
|
||||
const urlHost = new URL(this.options.openAiBaseUrl ?? "").host
|
||||
if (urlHost === "azure.com" || urlHost.endsWith(".azure.com")) {
|
||||
if (urlHost === "azure.com" || urlHost.endsWith(".azure.com") || options.openAiUseAzure) {
|
||||
this.client = new AzureOpenAI({
|
||||
baseURL: this.options.openAiBaseUrl,
|
||||
apiKey: this.options.openAiApiKey,
|
||||
|
||||
Reference in New Issue
Block a user