fix(agent-runner): stabilize event context and streams

This commit is contained in:
huanghuoguoguo
2026-05-29 21:05:20 +08:00
committed by huanghuoguoguo
parent 9bdebcdc5a
commit a2b38f5bf2
13 changed files with 232 additions and 56 deletions
@@ -359,7 +359,8 @@ class OpenAIChatCompletions(requester.ProviderAPIRequester):
if hasattr(chunk, 'choices') and chunk.choices:
choice = chunk.choices[0]
delta = choice.delta.model_dump() if hasattr(choice, 'delta') else {}
delta_obj = getattr(choice, 'delta', None)
delta = delta_obj.model_dump() if delta_obj is not None else {}
finish_reason = getattr(choice, 'finish_reason', None)
else: