Skip to content

fix(openai): disable stream usage for custom endpoints - #11640

Open
Zexu Jin (jackjin1997) wants to merge 1 commit into
langchain-ai:mainfrom
jackjin1997:fix/openai-custom-base-stream-usage-11637
Open

Zexu Jin (jackjin1997) wants to merge 1 commit into
langchain-ai:mainfrom
jackjin1997:fix/openai-custom-base-stream-usage-11637

Conversation

@jackjin1997

Copy link
Copy Markdown
Contributor

Summary

  • default streamUsage to false when callers configure a custom OpenAI base URL
  • preserve explicit streamUsage overrides and the default OpenAI endpoint behavior
  • cover constructor, environment-variable, and override paths

Fixes #11637

AI Disclosure

This contribution was developed with AI assistance. I reviewed the implementation and validated it with targeted tests, the package build, lint, and formatting checks.

@changeset-bot

changeset-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 1b8fb57

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@langchain/openai Patch
@langchain/classic Patch
@langchain/deepseek Patch
@langchain/fireworks Patch
@langchain/openrouter Patch
@langchain/together-ai Patch
@langchain/xai Patch
@langchain/neo4j Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

streamUsage default diverges from Python: setting a custom baseURL disables it in langchain-openai but not in @langchain/openai

1 participant