LibreChat/packages/api/src
Danny Avila b922187abb
🛟 fix: Summarization Provider misses vertexai + case-mismatched custom endpoints (#13025)
`resolveSummarizationProvider` calls `getProviderConfig` to translate the
agent's resolved provider into an initializer + client overrides. Three
real-world inputs were unsupported and fell through to "raw provider"
fallback (silently dropping client overrides):

1. **`vertexai`** — not in `providerConfigMap` at all. Vertex shares
   initialization with Google (auth-only runtime distinction). Map
   `Providers.VERTEXAI` to `initializeGoogle`.

2. **`openrouter` (and other known custom providers) with CamelCase
   custom endpoint names** — agent main flow looks up endpoints
   case-sensitively (case-preserving keys are how
   `loadCustomEndpointsConfig` lets users have distinct entries
   differing only in case). Once it succeeds, `agent.provider` is
   normalized to lowercase. Downstream resolvers re-enter
   `getProviderConfig` with the lowercased value and miss configs
   whose `name` is camel-cased. Add a case-insensitive fallback,
   narrowly scoped to known custom providers and only after the
   case-sensitive direct lookup fails.

3. **Ambiguous case-insensitive matches (codex review feedback)** —
   if the user has e.g. `OpenRouter` and `OPENROUTER` (neither
   lowercase) and the agent runtime passes `openrouter`, the
   case-insensitive fallback could silently route to whichever entry
   appears first in the array (potentially different baseURL/apiKey).
   Detect multiple case-insensitive matches and throw a clear error
   with both names rather than picking arbitrarily.

## Tests

`providers.spec.ts` — new file, 7 tests:
- vertexai → Google initializer
- google (API key) → Google initializer (regression guard)
- case-insensitive fallback when only CamelCase entry exists
- exact-case match preserved when both casings exist (case identity)
- exact-case lowercase entry still resolves
- throws on ambiguous case-insensitive matches when no exact-case exists
- still throws when no match at all
2026-05-08 18:52:01 -04:00
..
acl 🪐 fix: Replace $bitsAllSet ACL Queries for Azure Cosmos DB Compatibility (#12736) 2026-04-19 22:28:48 -04:00
admin 🧹 chore: Clean Up Config Fields (#12537) 2026-04-03 12:22:58 -04:00
agents 🧵 fix: Include Code Outputs in Thread File Lookup (#13023) 2026-05-08 12:29:46 -04:00
apiKeys 📦 chore: npm audit fixes and Mongoose 8.23 TypeScript follow-ups (#12996) 2026-05-07 09:47:40 -04:00
app 🌩️ feat: CloudFront CDN File Strategy (#12193) 2026-05-05 13:21:05 -04:00
auth 🔄 feat: Cross-Origin Admin OAuth Refresh (#13007) 2026-05-08 17:23:02 -04:00
cache 🧊 fix: In-Memory Endpoint Token Config Cache Isolation (#12673) 2026-04-15 09:41:42 -04:00
cdn 🌥️ feat: Add Optional Region-aware S3/CloudFront Storage Keys (#12987) 2026-05-06 23:16:56 -04:00
cluster 🪪 fix: MCP API Responses and OAuth Validation (#12217) 2026-03-13 23:18:56 -04:00
crypto
db
endpoints 🛟 fix: Summarization Provider misses vertexai + case-mismatched custom endpoints (#13025) 2026-05-08 18:52:01 -04:00
files 🧱 refactor: typed CodeEnvRef + kind discriminator + principal-aware sandbox cache (#12960) 2026-05-08 12:29:43 -04:00
flow 🏗️ feat: bulkWrite isolation, pre-auth context, strict-mode fixes (#12445) 2026-03-28 16:43:50 -04:00
mcp 🛡️ refactor: Scope allowedAddresses By Port (#13022) 2026-05-08 12:28:34 -04:00
memory 💭 feat: Require Explicit Auto-agent Enablement for Memories (#12886) 2026-05-01 23:56:08 +09:00
middleware 📦 chore: npm audit fixes and Mongoose 8.23 TypeScript follow-ups (#12996) 2026-05-07 09:47:40 -04:00
oauth
prompts 📁 refactor: Prompts UI (#11570) 2026-03-22 16:56:22 -04:00
skills 🌥️ feat: Add Optional Region-aware S3/CloudFront Storage Keys (#12987) 2026-05-06 23:16:56 -04:00
storage 🌥️ feat: Add Optional Region-aware S3/CloudFront Storage Keys (#12987) 2026-05-06 23:16:56 -04:00
stream 🧠 fix: charge Gemini reasoning tokens in agent usage accounting (#13014) 2026-05-08 12:29:43 -04:00
tools 📌 fix: Stabilize Agent Prompt Cache Prefix (#12907) 2026-05-02 09:55:31 +09:00
types 🌥️ feat: Add Optional Region-aware S3/CloudFront Storage Keys (#12987) 2026-05-06 23:16:56 -04:00
utils 🧵 fix: Include Code Outputs in Thread File Lookup (#13023) 2026-05-08 12:29:46 -04:00
web 🛡️ refactor: Restrict User Tavily Endpoint URLs (#12946) 2026-05-05 05:09:11 +09:00
index.ts 🧬 feat: Scaffold Skills CRUD with ACL Sharing and File Schema (#12613) 2026-04-25 04:01:59 -04:00