Skip to content

feat(openai): support automatic server-side compaction#35212

Merged
ccurme (ccurme) merged 8 commits intomasterfrom
cc/oai_compact
Feb 17, 2026
Merged

feat(openai): support automatic server-side compaction#35212
ccurme (ccurme) merged 8 commits intomasterfrom
cc/oai_compact

Conversation

@ccurme
Copy link
Copy Markdown
Collaborator

Relevant OpenAI docs: https://developers.openai.com/api/docs/guides/compaction

Usage:

from langchain_openai import ChatOpenAI

model = ChatOpenAI(
    model="gpt-5.2",
    context_management=[{"type": "compaction", "compact_threshold": 10_000}],
)

@github-actions github-actions bot added integration PR made that is related to a provider partner package integration dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) openai `langchain-openai` package issues & PRs feature For PRs that implement a new feature; NOT A FEATURE REQUEST internal labels Feb 13, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 13, 2026

Merging this PR will not alter performance

✅ 6 untouched benchmarks
⏩ 29 skipped benchmarks1


Comparing cc/oai_compact (172aa8c) with master (8e35924)

Open in CodSpeed

Footnotes

  1. 29 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 the langchain `langchain` package issues & PRs label Feb 13, 2026
@github-actions github-actions bot added the langchain-classic `langchain-classic` package issues & PRs label Feb 15, 2026
@mdrxy
Copy link
Copy Markdown
Member

Supersedes #34926 ?

@ccurme ccurme (ccurme) merged commit 8f1bc0d into master Feb 17, 2026
87 checks passed
@ccurme ccurme (ccurme) deleted the cc/oai_compact branch February 17, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file (e.g. `pyproject.toml` or `uv.lock`) feature For PRs that implement a new feature; NOT A FEATURE REQUEST integration PR made that is related to a provider partner package integration internal langchain `langchain` package issues & PRs langchain-classic `langchain-classic` package issues & PRs openai `langchain-openai` package issues & PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants