Bug: Azure model mapping in getChatCompletionStream is missing gpt-3.5-turbo-1106 and gpt-3.5-turbo-0125

Author: kuishou68Created Apr 18, 2026Updated Apr 18, 2026

Bug Description

In src/api/api.ts, the Azure model name mapping between OpenAI's gpt-3.5-turbo-* (with dots) and Azure's gpt-35-turbo-* (with hyphens) is incomplete in the streaming function compared to the non-streaming function.

Root Cause

getChatCompletion (non-streaming) — 4 model mappings ✅

typescript
const modelmapping: Partial<Record<ModelOptions, string>> = {
  'gpt-3.5-turbo': 'gpt-35-turbo',
  'gpt-3.5-turbo-16k': 'gpt-35-turbo-16k',
  'gpt-3.5-turbo-1106': 'gpt-35-turbo-1106',   // ✅ present
  'gpt-3.5-turbo-0125': 'gpt-35-turbo-0125',   // ✅ present
};

getChatCompletionStream (streaming) — only 2 model mappings ❌

typescript
const modelmapping: Partial<Record<ModelOptions, string>> = {
  'gpt-3.5-turbo': 'gpt-35-turbo',
  'gpt-3.5-turbo-16k': 'gpt-35-turbo-16k',
  // ❌ gpt-3.5-turbo-1106 missing
  // ❌ gpt-3.5-turbo-0125 missing
};

Impact

When a user selects gpt-3.5-turbo-1106 or gpt-3.5-turbo-0125 with an Azure endpoint and streaming enabled (the default), the model name is passed unchanged to the Azure deployment path:

Azure expects the deployment name without dots in the version segment (gpt-35-turbo-1106), so the request fails with a 404 or deployment-not-found error.

Fix

Add the missing mappings to getChatCompletionStream:

typescript
const modelmapping: Partial<Record<ModelOptions, string>> = {
  'gpt-3.5-turbo': 'gpt-35-turbo',
  'gpt-3.5-turbo-16k': 'gpt-35-turbo-16k',
  'gpt-3.5-turbo-1106': 'gpt-35-turbo-1106',
  'gpt-3.5-turbo-0125': 'gpt-35-turbo-0125',
};