-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Azure openai #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure openai #1084
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ import { createGoogleGenerativeAI } from "@ai-sdk/google"; | |
| import { createGroq } from "@ai-sdk/groq"; | ||
| import { createOpenRouter } from "@openrouter/ai-sdk-provider"; | ||
| import { createGateway } from "@ai-sdk/gateway"; | ||
| import { createAzure } from "@ai-sdk/azure"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Azure provider integration follows established patterns. The However, unlike other providers, the Azure configuration relies on two environment variables ( 🤖 Prompt for AI Agents |
||
| // import { createOllama } from "ollama-ai-provider"; | ||
| import { env } from "@/env"; | ||
| import { Provider } from "@/utils/llms/config"; | ||
|
|
@@ -138,6 +139,18 @@ function selectModel( | |
| backupModel: getBackupModel(aiApiKey), | ||
| }; | ||
| } | ||
| case Provider.AZURE: { | ||
| const modelName = aiModel || "gpt-5.1"; | ||
| return { | ||
| provider: Provider.AZURE, | ||
| modelName, | ||
| model: createAzure({ | ||
| baseURL: env.AZURE_BASE_URL, | ||
| apiKey: aiApiKey || env.AZURE_API_KEY, | ||
| })(modelName), | ||
| backupModel: getBackupModel(aiApiKey), | ||
| }; | ||
| } | ||
| case Provider.OLLAMA: { | ||
| throw new Error( | ||
| "Ollama is not supported. Revert to version v1.7.28 or older to use it.", | ||
|
|
@@ -343,6 +356,7 @@ function getProviderApiKey(provider: string) { | |
| [Provider.GROQ]: env.GROQ_API_KEY, | ||
| [Provider.OPENROUTER]: env.OPENROUTER_API_KEY, | ||
| [Provider.AI_GATEWAY]: env.AI_GATEWAY_API_KEY, | ||
| [Provider.AZURE]: env.AZURE_API_KEY, | ||
| }; | ||
|
|
||
| return providerApiKeys[provider]; | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Issue on line in
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v2.21.59 | ||
| v2.21.60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: elie222/inbox-zero
Length of output: 1308
🏁 Script executed:
Repository: elie222/inbox-zero
Length of output: 29822
Add Azure to the providerOptions array.
Azure is missing from the
providerOptionsUI dropdown (lines 19-30) despite having full backend support inmodel.ts(lines 142-151) and being selectable in the CLI. Users cannot currently select Azure as a provider in the web settings UI. Add Azure toproviderOptionsto match the pattern of other implemented providers like OpenAI, Anthropic, and Google.🤖 Prompt for AI Agents