Skip to content

fix(openai): limit stream_options to official API#12939

Open
JSap0914 wants to merge 1 commit into
continuedev:mainfrom
JSap0914:fix/openai-stream-options-official-only-12936
Open

fix(openai): limit stream_options to official API#12939
JSap0914 wants to merge 1 commit into
continuedev:mainfrom
JSap0914:fix/openai-stream-options-official-only-12936

Conversation

@JSap0914

@JSap0914 JSap0914 commented Jul 3, 2026

Copy link
Copy Markdown

Summary

  • only send OpenAI stream_options: { include_usage: true } to the official OpenAI API
  • avoid sending the OpenAI-only field to OpenAI-compatible endpoints such as Databricks
  • add regression tests for official and compatible API bases

Fixes #12936.

Verification

  • npm --prefix packages/openai-adapters test -- --run src/apis/OpenAI.test.ts
  • npm --prefix packages/openai-adapters run build

@JSap0914 JSap0914 requested a review from a team as a code owner July 3, 2026 11:28
@JSap0914 JSap0914 requested review from Copilot and sestinj and removed request for a team July 3, 2026 11:28
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenAI provider injects stream_options causing HTTP 400 on Databricks OpenAI-compatible serving endpoints

2 participants