LibreChat/api/server
kojinseok-del edd4c6d60c
💎 fix: Handle usage_metadata in Title Transaction for Gemini Models (#12386)
* fix: handle `usage_metadata` in title transaction for Gemini models

Gemini models return token usage via `usage_metadata` instead of `usage`
or `tokenUsage`. The `collectedUsage` mapping in `titleConvo` only
handled the latter two, causing title generation transactions to be
silently skipped for Gemini. Adds an `else if (item.usage_metadata)`
branch to extract `input_tokens`/`output_tokens`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove trailing whitespace in usage_metadata handler

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 10:09:37 -04:00
..
controllers 💎 fix: Handle usage_metadata in Title Transaction for Gemini Models (#12386) 2026-04-15 10:09:37 -04:00
middleware refactor: Short-Circuit Config Override Resolution (#12553) 2026-04-07 22:38:08 -04:00
routes 🔐 fix: Add Tenant Context to Admin OAuth Callback Routes (#12579) 2026-04-08 20:04:15 -04:00
services 🔉 fix: Normalize audio MIME types in STT format validation (#12674) 2026-04-15 09:58:07 -04:00
utils 🏗️ refactor: Remove Redundant Caching, Migrate Config Services to TypeScript (#12466) 2026-03-30 16:49:48 -04:00
cleanup.js 🧹 refactor: Tighten Config Schema Typing and Remove Deprecated Fields (#12452) 2026-03-29 01:10:57 -04:00
experimental.js ⚖️ refactor: Split Config Route into Unauthenticated and Authenticated Paths (#12490) 2026-03-31 19:22:51 -04:00
index.js ⚖️ refactor: Split Config Route into Unauthenticated and Authenticated Paths (#12490) 2026-03-31 19:22:51 -04:00
index.spec.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
socialLogins.js 🔐 feat: Admin Auth Support for SAML and Social OAuth Providers (#12472) 2026-03-30 22:49:44 -04:00