Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Unable to obtain the UsageContent and FinishReason of response.incomplete

Open Beginner friendly
#7,893 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
67/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp

Research direction

Start by reading FromOpenAIStreamingResponseUpdatesAsync in OpenAIResponsesChatClient and inspect how it handles StreamingResponseIncompleteUpdate compared with other response updates. Trace where UsageContent and FinishReason are collected, then check the related streaming tests. Done means incomplete responses expose both token usage and the termination reason, with tests covering that case.

Written by the indexing model from the issue text.

Description

area-ai bug untriaged
Description

The FromOpenAIStreamingResponseUpdatesAsync method of the OpenAIResponsesChatClient class, when handling StreamingResponseIncompleteUpdate, does not process the UsageContent and FinishReason fields. This results in the program being unable to obtain the token consumption information for this round and also not knowing why it has ended.

Reproduction Steps

Set MaxOutputTokens to less than 8k, and set ReasoningEffort to High or above. Let the LLM execute a complex task. At this point, due to insufficient output budget, it will return a message of type response.incomplete, which is of the StreamingResponseIncompleteUpdate type.

Expected behavior

Collect the token usage and the reasons for termination in cases where the task is not completed as expected.

Actual behavior
Image
Regression?

No response

Known Workarounds

No response

Configuration
  • Microsoft.Extensions.AI 10.11.0
Other information

No response

Dominant language
C#
Stars
3.3k
Forks
916
Avg merge
1d 12h
Merged PRs (30d)
41

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/extensions

All issues in dotnet/extensions

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.