Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 feat: Agent Cache Tokens & Anthropic Reasoning Support #6098

Merged
merged 7 commits into from
Feb 27, 2025

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Feb 27, 2025

Summary:

  • Updated @librechat/agents dependency to version 2.1.7 for improved parallel tool calling with Google models and version 2.1.5 for Anthropic Reasoning support.
  • Refactored agent title handling to aggregate text from multiple content blocks reliably and add maxTokens
  • Revised the ContentParts component to display the correct "thinking" status when a message is actively being submitted.
  • Added cache creation and cache read details into token spend calculations for Agents
  • Updated reasoning handling for OpenRouter by configuring reasoning effort parameters according to new format
  • Fixed top_k and top_p parameter handling for Claude-3.7 models to ensure consistent request options.
  • Validated changes through updated unit tests and local testing on both backend services and frontend components.

Change Type:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing:
I conducted local testing on both server and client sides. I verified that dependency upgrades, token spending calculations, and UI status displays work as expected. Updated unit tests for AnthropicClient, OpenRouter configurations, and the thinking status in ContentParts confirmed that the fixes and enhancements are effective.

Checklist:

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules

@danny-avila danny-avila changed the title Feat/anthropic agent reasoning 🚀 feat: Agents Cache Tokens & Anthropic Reasoning Support Feb 27, 2025
@danny-avila danny-avila changed the title 🚀 feat: Agents Cache Tokens & Anthropic Reasoning Support 🚀 feat: Agent Cache Tokens & Anthropic Reasoning Support Feb 27, 2025
@danny-avila danny-avila merged commit 9802629 into main Feb 27, 2025
7 checks passed
@danny-avila danny-avila deleted the feat/anthropic-agent-reasoning branch February 27, 2025 17:59
ryanhulsker added a commit to Davinci-Technology/LibreChat that referenced this pull request Feb 28, 2025
🚀 feat: Agent Cache Tokens & Anthropic Reasoning Support (danny-avila#6098)
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.

[Bug]: only one of 'reasoning' or 'reasoning_effort' may be provided, when using with OpenRouter
1 participant