LibreChat/api/server/services/Endpoints
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
..
agents fix: persist modelLabel to DB and derive from spec as fallback 2026-03-17 10:55:47 +01:00
assistants 👻 fix: Prevent Async Title Generation From Recreating Deleted Conversations (#11797) 2026-02-14 13:57:00 -05:00
azureAssistants ⚠️ chore: Remove Deprecated forcePrompt setting (#11622) 2026-02-04 11:02:27 +01:00
index.js 🌙 feat: Moonshot Provider Support (#11621) 2026-02-04 10:53:57 +01:00