Files
DeepTutor/deeptutor/services
Hyeonsang Cho f3bbe85f98 fix(llm): raise a streamed provider error instead of answering with it (#1298)
`stream()`'s runner assigned `saw_output` without declaring it nonlocal,
so the name was local to the runner. A provider that returned
`finish_reason="error"` after streaming deltas crashed the runner with
UnboundLocalError, and one that returned it before any delta had its
operator message ("Error calling LLM: ...") enqueued as the model's
answer with the error swallowed.

Declare the nonlocal, and skip the post-stream content synthesis for
error-shaped responses so the existing guard raises them as LLMAPIError.
Text already delivered is still kept, as before.
2026-09-10 23:43:57 +08:00
..
2026-09-06 13:46:29 +08:00
2026-09-08 15:46:59 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-08 15:46:59 +08:00
2026-08-25 02:24:35 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-08 15:46:59 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-06 13:46:29 +08:00
2026-09-03 01:38:54 +08:00
2026-09-06 13:46:29 +08:00