Files
langchain/libs/partners/openai
Mason Daugherty 992c613b51 fix(openai): source LLM context size from model profiles (#37489)
`BaseOpenAI.modelname_to_contextsize` now reads `max_input_tokens` from
the partner's model profile registry instead of a hand-maintained dict,
with a `@deprecated(since="1.2", removal="2.0")` marker steering callers
at the profile directly. The legacy mapping is trimmed to models that
have no profile (completion-only and dated chat variants) so existing
lookups keep working.
2026-05-18 01:49:06 -05:00
..

langchain-openai

PyPI - Version PyPI - License PyPI - Downloads Twitter

Looking for the JS/TS version? Check out LangChain.js.

Quick Install

pip install langchain-openai

🤔 What is this?

This package contains the LangChain integrations for OpenAI through their openai SDK.

📖 Documentation

For full documentation, see the API reference. For conceptual guides, tutorials, and examples on using these classes, see the LangChain Docs.

📕 Releases & Versioning

See our Releases and Versioning policies.

💁 Contributing

As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.

For detailed information on how to contribute, see the Contributing Guide.