Added status texts for prompt processing and reasoning to the chat (#1205)

Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
j-erlerandThorsten Sommer authored and GitHub committed 2026-11-21 09:43:31 +01:00
1 parent 6cdb0bc551
commit 28b88580a9
29 files changed
+504 -30

No files matched your search

@@ -1304,6 +1304,27 @@ public abstract class BaseProvider : IProvider, ISecretId
// Yield the response:
yield return new(string.Empty, providerResponse.GetSources());
}
//
// Find the lines which say that the model reasons: the opening of a reasoning item,
// which is all the API tells about reasoning it keeps to itself, and the reasoning
// which does arrive as text. None of it is shown; the chunk only says that it happens.
//
else if (serverSentEvent.Data.StartsWith(
"""
{"type":"response.reasoning
""", StringComparison.InvariantCulture) ||
(serverSentEvent.Data.StartsWith(
"""
{"type":"response.output_item.added"
""", StringComparison.InvariantCulture) &&
serverSentEvent.Data.Contains(
"""
"type":"reasoning"
""", StringComparison.InvariantCulture)))
{
yield return new(string.Empty, []) { IsReasoning = true };
}
}
}