Skip to content

Unify language model event stream handling - #63520

Merged
MrSubidubi merged 5 commits into
mainfrom
fix-and-cleanup
Sep 2, 2026
Merged

MrSubidubi merged 5 commits into
mainfrom
fix-and-cleanup

Conversation

@MrSubidubi

Copy link
Copy Markdown
Member

Closes #63314
Closes #42584

Follow-up to #62652

Removes a lot of duplicated code in favor of throwing it intolanguage_core as well as removing duplicate struct definitions that were only different because of entirely unused fields.

Furthermore, improves error-messages so that these untagged enum errors are no longer a thing in an effort to make this more maintainable in the future.

Lastly, includes a small but nice improvement changing a Value to a RawValue so that we don't have to clone for deserialization in that specific case.

Release Notes:

  • Improved streaming for OpenAI-compatible providers.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 31, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Aug 31, 2026
Comment thread crates/language_model_core/src/chat_completion.rs Outdated
@MrSubidubi
MrSubidubi enabled auto-merge September 2, 2026 15:31
@MrSubidubi
MrSubidubi added this pull request to the merge queue Sep 2, 2026
Merged via the queue into main with commit 8514ce3 Sep 2, 2026
34 checks passed
@MrSubidubi
MrSubidubi deleted the fix-and-cleanup branch September 2, 2026 15:51
whitecat1331 pushed a commit to whitecat1331/zed that referenced this pull request Sep 3, 2026
Closes zed-industries#63314
Closes zed-industries#42584

Follow-up to zed-industries#62652

Removes a lot of duplicated code in favor of throwing it
into`language_core` as well as removing duplicate struct definitions
that were only different because of entirely unused fields.

Furthermore, improves error-messages so that these untagged enum errors
are no longer a thing in an effort to make this more maintainable in the
future.

Lastly, includes a small but nice improvement changing a `Value` to a
`RawValue` so that we don't have to clone for deserialization in that
specific case.

Release Notes:

- Improved streaming for OpenAI-compatible providers.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
JannikRosendahl pushed a commit to JannikRosendahl/zed that referenced this pull request Sep 6, 2026
Closes zed-industries#63314
Closes zed-industries#42584

Follow-up to zed-industries#62652

Removes a lot of duplicated code in favor of throwing it
into`language_core` as well as removing duplicate struct definitions
that were only different because of entirely unused fields.

Furthermore, improves error-messages so that these untagged enum errors
are no longer a thing in an effort to make this more maintainable in the
future.

Lastly, includes a small but nice improvement changing a `Value` to a
`RawValue` so that we don't have to clone for deserialization in that
specific case.

Release Notes:

- Improved streaming for OpenAI-compatible providers.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
HalavicH pushed a commit to HalavicH/zed that referenced this pull request Sep 8, 2026
Closes zed-industries#63314
Closes zed-industries#42584

Follow-up to zed-industries#62652

Removes a lot of duplicated code in favor of throwing it
into`language_core` as well as removing duplicate struct definitions
that were only different because of entirely unused fields.

Furthermore, improves error-messages so that these untagged enum errors
are no longer a thing in an effort to make this more maintainable in the
future.

Lastly, includes a small but nice improvement changing a `Value` to a
`RawValue` so that we don't have to clone for deserialization in that
specific case.

Release Notes:

- Improved streaming for OpenAI-compatible providers.

---------

Co-authored-by: Anant Goel <anant@zed.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data did not match any variant of untagged enum ResponseStreamResult AI: data did not match any variant of untagged enum ResponseStreamResult

2 participants