Skip to content

Conversation

@ccurme
Copy link
Collaborator

@ccurme ccurme commented Dec 17, 2025

Better to rely on core for this (core emits a final chunk with chunk_position="last" if it's missing)

  • When stream_usage is enabled, we are currently setting chunk_position="last" on the wrong chunk
  • Behavior around this may vary with child classes of BaseChatOpenAI

@ccurme ccurme requested a review from mdrxy as a code owner December 17, 2025 15:29
@github-actions github-actions bot added integration PR made that is related to a provider partner package integration openai `langchain-openai` package issues & PRs fix For PRs that implement a fix labels Dec 17, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 17, 2025

CodSpeed Performance Report

Merging #34404 will not alter performance

Comparing cc/fix_openai_chunk_position (5ed30b7) with master (71778cb)

Summary

✅ 8 untouched
⏩ 26 skipped1

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions github-actions bot added deepseek `langchain-deepseek` package issues & PRs xai `langchain-xai` package issues & PRs labels Dec 17, 2025
@ccurme ccurme merged commit e0950f2 into master Dec 17, 2025
85 checks passed
@ccurme ccurme deleted the cc/fix_openai_chunk_position branch December 17, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek `langchain-deepseek` package issues & PRs fix For PRs that implement a fix integration PR made that is related to a provider partner package integration openai `langchain-openai` package issues & PRs xai `langchain-xai` package issues & PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants