LibreChat/api/server/controllers/agents
Danny Avila 0d51d1dc08
refactor(agents): token counting for media content in messages
Introduced a new method to estimate token costs for image and document blocks in messages, improving the accuracy of token counting. This enhancement ensures that media content is properly accounted for, particularly for the Claude model, by integrating additional token estimation logic for various content types. Updated the token counting function to utilize this new method, enhancing overall reliability and functionality.
2026-03-16 09:07:59 -04:00
..
__tests__ refactor(tests): simplify event handler setup in createResponse tests 2026-03-16 09:07:54 -04:00
callbacks.js refactor(agents): extract agent log handler for improved clarity and reusability 2026-03-16 09:07:56 -04:00
client.js refactor(agents): token counting for media content in messages 2026-03-16 09:07:59 -04:00
client.test.js chore: imports/types 2026-03-16 09:07:52 -04:00
errors.js 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-16 08:06:07 -04:00
filterAuthorizedTools.spec.js 🗑️ chore: Remove Action Test Suite and Update Mock Implementations (#12268) 2026-03-16 09:07:30 -04:00
openai.js refactor(agents): extract agent log handler for improved clarity and reusability 2026-03-16 09:07:56 -04:00
recordCollectedUsage.spec.js 🪢 chore: Consolidate Pricing and Tx Imports After tx.js Module Removal (#12086) 2026-03-16 08:06:20 -04:00
request.js 📦 refactor: Consolidate DB models, encapsulating Mongoose usage in data-schemas (#11830) 2026-03-16 08:06:07 -04:00
responses.js refactor(agents): extract agent log handler for improved clarity and reusability 2026-03-16 09:07:56 -04:00
v1.js 🗑️ chore: Remove Action Test Suite and Update Mock Implementations (#12268) 2026-03-16 09:07:30 -04:00
v1.spec.js 🗂️ refactor: Migrate S3 Storage to TypeScript in packages/api (#11947) 2026-03-16 08:21:27 -04:00