Skip to content

Fix token limit check to use compression model#230

Open
Youngbin (youngandbin) wants to merge 1 commit into
langchain-ai:mainfrom
youngandbin:PR
Open

Fix token limit check to use compression model#230
Youngbin (youngandbin) wants to merge 1 commit into
langchain-ai:mainfrom
youngandbin:PR

Conversation

@youngandbin

Copy link
Copy Markdown

Fix token limit check to use compression model instead of research model in compress_research function

at384 (zamal-db) added a commit to zamal-db/open_deep_research that referenced this pull request Mar 12, 2026
…ests)

Bug Fixes:
- Fix langchain-ai#252: remove_up_to_last_ai_message now removes the oldest AI/Tool
  exchange instead of the newest, preserving the most recent research context
- Fix langchain-ai#230: compress_research token limit check now uses compression_model
  instead of research_model (matching the model actually used for compression)
- Fix langchain-ai#225: Replace deprecated LangGraph StateGraph params output= and input=
  with output_schema= and input_schema= (deprecated since V05)

Enhancements:
- Extend get_api_key_for_model with 6 new providers (groq, deepseek, mistral,
  cohere, fireworks, bedrock) via a data-driven _PROVIDER_API_KEY_MAP

Tests:
- Add first-ever unit test suite: 77 tests covering utils, configuration, and
  state modules with zero external dependencies required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant