LibreChat/api/server
christian 4d93a55975 fix: persist modelLabel to DB and derive from spec as fallback
All chat (including bedrock specs) goes through /api/agents/chat/:endpoint.
The buildOptions middleware nests conversation settings inside model_parameters,
then the AgentClient constructor was never given modelLabel — so getSaveOptions()
always returned modelLabel: undefined, which was stripped by removeNullishValues.
The field was never saved to the database, so every page refresh lost it.

Two fixes:

1. api/server/services/Endpoints/agents/initialize.js (backend — the real bug)
   Pass modelLabel from model_parameters to the AgentClient constructor, so it
   gets persisted to the conversation in MongoDB.

2. client/src/hooks/Conversations/useGetSender.ts (frontend — defensive fallback)
   When a loaded conversation has a spec but no modelLabel (older conversations
   that were saved before this fix), derive the display label from the spec
   configuration instead of falling back to "AWS Bedrock".

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 10:55:47 +01:00
..
controllers 🔏 fix: Remove Federated Tokens from OpenID Refresh Response (#12264) 2026-03-16 09:23:46 -04:00
middleware 🛂 fix: Validate types Query Param in People Picker Access Middleware (#12276) 2026-03-17 02:46:11 -04:00
routes 🪢 fix: Action Domain Encoding Collision for HTTPS URLs (#12271) 2026-03-17 01:38:51 -04:00
services fix: persist modelLabel to DB and derive from spec as fallback 2026-03-17 10:55:47 +01:00
utils 📏 refactor: Add File Size Limits to Conversation Imports (#12221) 2026-03-14 03:06:29 -04:00
cleanup.js 🪣 fix: Prevent Memory Retention from AsyncLocalStorage Context Propagation (#11942) 2026-02-25 17:41:23 -05:00
experimental.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
index.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
index.spec.js 🚦 fix: 404 JSON Responses for Unmatched API Routes (#11976) 2026-02-27 22:49:54 -05:00
socialLogins.js 🔒 fix: Secure Cookie Localhost Bypass and OpenID Token Selection in AuthService (#11782) 2026-02-13 10:35:51 -05:00