Skip to content

fix(openai): source LLM context size from model profiles - #37489

Merged
Mason Daugherty (mdrxy) merged 1 commit into
masterfrom
mdrxy/openai-baseopenai-ctx
May 18, 2026
Merged

fix(openai): source LLM context size from model profiles#37489
Mason Daugherty (mdrxy) merged 1 commit into
masterfrom
mdrxy/openai-baseopenai-ctx

Conversation

@mdrxy

Copy link
Copy Markdown
Member

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.

@github-actions github-actions Bot added fix For PRs that implement a fix integration PR made that is related to a provider partner package integration internal openai `langchain-openai` package issues & PRs size: S 50-199 LOC labels May 18, 2026
@mdrxy
Mason Daugherty (mdrxy) merged commit 992c613 into master May 18, 2026
86 checks passed
@mdrxy
Mason Daugherty (mdrxy) deleted the mdrxy/openai-baseopenai-ctx branch May 18, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix For PRs that implement a fix integration PR made that is related to a provider partner package integration internal openai `langchain-openai` package issues & PRs size: S 50-199 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant