add Azure OpenAI Responses provider with deployment-aware model mapping

This commit is contained in:
Markus Ylisiurunen 2026-01-21 20:13:00 +02:00 committed by Mario Zechner
parent 951fb953ed
commit 856012296b
23 changed files with 1465 additions and 21 deletions

View file

@ -1100,6 +1100,16 @@ async function generateModels() {
];
allModels.push(...vertexModels);
const azureOpenAiModels: Model<Api>[] = allModels
.filter((model) => model.provider === "openai" && model.api === "openai-responses")
.map((model) => ({
...model,
api: "azure-openai-responses",
provider: "azure-openai-responses",
baseUrl: "",
}));
allModels.push(...azureOpenAiModels);
// Group by provider and deduplicate by model ID
const providers: Record<string, Record<string, Model<any>>> = {};
for (const model of allModels) {
@ -1136,7 +1146,7 @@ export const MODELS = {
output += `\t\t\tname: "${model.name}",\n`;
output += `\t\t\tapi: "${model.api}",\n`;
output += `\t\t\tprovider: "${model.provider}",\n`;
if (model.baseUrl) {
if (model.baseUrl !== undefined) {
output += `\t\t\tbaseUrl: "${model.baseUrl}",\n`;
}
if (model.headers) {