Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions lib/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ export async function getModel(requireVision: boolean = false) {
}
case 'GPT-5.5':
if (azureApiKey && azureEndpoint) {
const azure = createOpenAI({
baseURL: azureEndpoint,
apiKey: azureApiKey,
});
try {
const azure = createOpenAI({
baseURL: azureEndpoint,
apiKey: azureApiKey,
compatibility: 'compatible',
});
return azure(azureDeploymentName);
} catch (error) {
console.error('Selected model "GPT-5.5" (Azure) is configured but failed to initialize.', error);
throw new Error('Failed to initialize selected model.');

}
} else {
console.error('User selected "GPT-5.5" but AZURE_API_KEY or AZURE_ENDPOINT is not set.');
Expand Down