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
- Thread endUserId through GetChatCompletionCore, ProcessStreamingUpdatesAsync, and ExecuteFunctionCallAsync; include in tool-call and tool-rejected log messages for security telemetry
- Emit responseId early from StreamingResponseCreatedUpdate so ChatController can record ownership before stream completes (handles mid-stream client disconnects)
- Record responseId in streaming loop on first observation instead of post-loop, eliminating the disconnect race
- Add SizeLimit=10_000 to AddMemoryCache to bound memory growth; add SetSize(1) per entry in ResponseIdValidationService
- Fix MemoryCache disposal in ResponseIdValidationServiceTests: each test owns its cache via 'using var cache'
- Fix IServiceScope disposal in McpApiTokenServiceTests: collect scopes in _scopes list, dispose all via [After(Test)] teardown
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
194
195
if(updateisStreamingResponseCreatedUpdatecreated)
195
196
{
196
-
// Remember the response ID for later function calls
197
+
// Emit the response ID early so the controller can record ownership
198
+
// before the stream completes — handles client disconnects mid-stream.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
// Feed a benign error back to the model so it can recover gracefully,
247
251
// mirroring what GetChatCompletionCore does on the non-streaming path.
248
252
#pragma warning disable OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
#pragma warning restore OPENAI001// Type is for evaluation purposes only and is subject to change or removal in future updates. Suppress this diagnostic to proceed.
403
407
string?systemPrompt=null,
404
408
McpClient?mcpClient=null,
409
+
string?endUserId=null,
405
410
CancellationTokencancellationToken=default)
406
411
{
407
412
// Construct the user input with system context if provided
0 commit comments