You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenAI.Chat.ChatClient.AsIChatClient() returns an empty ChatResponseUpdate.ModelId throughout an Azure OpenAI Chat Completions stream when the first event is a prompt-filter annotation with "model":"".
Confirmed with live calls using Microsoft.Extensions.AI.OpenAI 10.10.1 + OpenAI 2.14.0, and also 10.4.1 + 2.9.1. Single responses contain the model ID. This report concerns the Chat Completions adapter, not the Responses API adapter.
Reproduction shape
Azure sends an initial annotation with model: "", id: "", and choices: [], followed by normal completion chunks with a populated model. In the live test:
The initial empty string is non-null, so later real model IDs cannot replace it. Please ignore empty model values while acquiring the cached ID, then preserve the populated ID on subsequent updates. The initial annotation may legitimately remain unidentified; no fallback model ID is needed.
A credential-free regression can feed the annotation above followed by a normal completion chunk and assert that the latter's ChatResponseUpdate.ModelId is populated.
Related: #7790 / #7792 concern a separate null-delta annotation crash, not this model-ID caching issue.
Activity
Ignore empty model IDs in streaming responses (dotnet#7816)