Skip to content

fix(agent): classify mid-stream cancel as ErrContextCancelled#124

Merged
hung12ct merged 1 commit into
mainfrom
fix/ctx-cancel-midstream-classification
Jun 6, 2026
Merged

fix(agent): classify mid-stream cancel as ErrContextCancelled#124
hung12ct merged 1 commit into
mainfrom
fix/ctx-cancel-midstream-classification

Conversation

@hung12ct
Copy link
Copy Markdown
Owner

@hung12ct hung12ct commented Jun 6, 2026

A cancel landing while the provider stream is in flight returned a provider error wrapped as LLMFailureError, so errors.Is(err, ErrContextCancelled) missed it and a user Stop rendered as a model error. Reclassify it before the wrap, mirroring the pre-call cancel path.

A cancel landing while the provider stream is in flight returned a
provider error wrapped as LLMFailureError, so errors.Is(err,
ErrContextCancelled) missed it and a user Stop rendered as a model error.
Reclassify it before the wrap, mirroring the pre-call cancel path.
@hung12ct hung12ct merged commit 41d2b73 into main Jun 6, 2026
1 check passed
@hung12ct hung12ct deleted the fix/ctx-cancel-midstream-classification branch June 6, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant