chore(sync): upstream LibreChat v0.8.4 → v0.8.5#61
Merged
Conversation
Contributor
Android debug APKArtifact:
|
c1686ca to
3846b7c
Compare
3846b7c to
8a0d612
Compare
Targets upstream tag v0.8.5 (commit 9ccc8d9be). Bumps the supported
backend version constant, advances the upstream submodule pin, and
adds wire-protocol parity for new server features.
Wire protocol
- Add ContentType.SUMMARY enum value and flat sibling fields on
MessageContentPart (content as JsonElement to absorb array/string/
legacy-text variants per BaseClient.getSummaryText).
- Add Anthropic effort.xhigh dropdown value, ThinkingDisplay (Opus 4.7
reasoning visibility), and Message.contextMeta pass-through.
- Add allowAccountDeletion to StartupConfig (defaults to true to
preserve older-server behavior).
- Drop unused instanceProjectId from StartupConfig and from
ConfigRepositoryImpl.isValidLibreChatConfig.
New endpoints / features
- Favorites: UserFavorite DTO + FavoritesApi + FavoritesRepository,
Settings -> Favorites sub-screen (list/unpin), pin icons in chat
model selector. Repository owns the canonical list as a StateFlow
guarded by Mutex.withLock so chat-side toggles and settings-side
bulk-unpin can't drift apart and concurrent writes can't lose each
other.
- Prompt-group usage telemetry (POST /api/prompts/groups/:id/use,
fire-and-forget on prompt insertion).
- Summarize SSE events (on_summarize_complete -> StreamEvent.ContextSummary)
and a collapsible "Summarized earlier messages" card rendered from
the persisted SUMMARY content part. Forward-compat else-arm preserved
on both LangGraph and legacy SSE mappers.
Backward compatibility
- BackendVersion.isCompatibleOrNewer helper added; documented fail-open
contract for callers that have already null-checked
detectedBackendVersion.
- New VERSION_GATES.md catalog at repo root tracks every code path that
branches on server version. Initial entries:
- isCollaborative agent toggle (hidden on v0.8.5+; full-ACL UX deferred)
- xhigh effort dropdown value (filtered out on <v0.8.5 to avoid
server-side enum rejection)
Defensive hardening
- ChatApi.startChat asserts Content-Type: application/json before
decoding ChatStartResponse and catches NoTransformationFoundException
as a backstop, translating both to a friendly ApiException. Observed
during testing on v0.8.5-rc1 with summarization enabled, where the
agents chat-start endpoint returned 200 OK with no Content-Type and
Ktor leaked a NoTransformationFoundException stack trace into the
chat surface. Belt-and-suspenders against future backend regressions
or unsupported-server pointing.
Documentation
- DISCOVERY.md updated for the v0.8.5 surface: /api/endpoints now
requires JWT, /api/config pre-auth/post-auth split, allowAccountDeletion,
instanceProjectId removal, favorites endpoints (with all three XOR
variants: agentId | model+endpoint | spec), prompt-usage endpoint,
/api/admin/** marked out-of-scope. Plus a new MessageContentPart +
SUMMARY wire-shape section.
iOS
- Swift SharedFrameworkTest.swift updated for the new
StreamEvent.ContextSummary variant and Message.contextMeta
constructor argument.
Out of scope (by design)
- /api/admin/** route family - web-only feature.
- Full ACL migration for agent sharing - replaced by version-gating
the legacy isCollaborative toggle.
- Spec-pinning UI on mobile - UserFavorite.spec round-trips for
fidelity with web-authored pins, but mobile does not yet surface
a spec picker.
8a0d612 to
abde86c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xhighreasoning effort value, user favorites (agents + models withspecround-trip), permission gates, theallowAccountDeletionconfig flag, andisCollaborativedeprecation handling.POST /api/agents/chat/{endpoint}against backends that return 200 without aContent-Typeheader (observed on v0.8.5-rc1 with summarization enabled).What changed
Wire protocol
MessageContentPartflat-sibling shape;extractSummaryText()handles all three runtime variants (Array<{type:"text", text}>,string, legacytextfield) per upstreamBaseClient.js:831-839. SSE mapper handles theon_summarize_*lifecycle events withelse -> nullforward-compat preserved.xhighreasoning effort —EndpointParameterRegistryfiltersxhighfrom thereasoning_effort/effortdropdowns whenxhighEffortSupported = false; defaults to false (older-server-safe) untilBackendVersion.isCompatibleOrNewer(version, "0.8.5")returns true.isCollaborativedeprecation — Agent Editor's collaborative toggle is hidden on ≥0.8.5 servers (server-managed) and shown on older versions (legacy field still respected).Favorites
core/data/.../FavoritesRepository{,Impl}.kt— single source of truth viaMutableStateFlow+Mutex; optimistic publish + server-rollback pattern.feature/chat/.../delegate/FavoritesDelegate.kt— chat-side toggle and observe.feature/settings/.../FavoritesScreen.kt+FavoritesViewModel.kt— settings-side list/manage UI.core/network/.../FavoritesApi.ktandcore/model/.../UserFavorite.kt(withspec: String? = nullfor round-trip fidelity).Permission gates
ChatViewModel.kt:1443-1453reads role permissions viaRoleRepository.userPermissionsand propagates 11 boolean gates intoChatUiState. Default-permissive on cold start;hasAccessOrPermissive(extension onUserRolePermissions?) fails open for unknown permission types (forward-compat).Config / version detection
StartupConfig.allowAccountDeletion: Boolean = true(NEW v0.8.5 key, default-true preserves older-server behavior).instanceProjectIdremoved fromStartupConfig(REMOVED in v0.8.5).BackendVersion.SUPPORTED_BACKEND_VERSION = "0.8.5";extractVersionFromFooter()parses the customFooter,isCompatibleOrNewer()powers feature gates.VERSION_GATES.mdcatalog added at repo root for auditable backward-compat branches.Defensive hardening
core/network/.../api/ChatApi.kt— catches a chat-start response shape we hit during testing of v0.8.5-rc1 withsummarization: enabled: true: backend returned200 OKwith noContent-Typeheader, leaking a KtorNoTransformationFoundExceptionstack trace into the chat surface.The fix:
application/jsonContent-Type before.body()decode.NoTransformationFoundExceptioncatch — backstop for the case where Content-Type lies.Both paths surface a clean
ApiException: "Server returned an unexpected response when starting the chat. This usually indicates a backend version incompatibility — please check that the server is running a supported LibreChat release."Belt-and-suspenders, not bug-fix code. The underlying backend defect is fixed in v0.8.5 final (we tested the upgraded image — bug is gone). This guard is only exercised against future backend regressions or users on unsupported servers; the cost is modest (+37 lines, one file) and the failure mode is now actionable instead of a Ktor-internal stack trace.
Submodule + tracking files
upstream/advanced to v0.8.5 (9ccc8d9b)UPSTREAM_VERSIONupdatedDISCOVERY.md— appended new endpoints and revised response shapesVERSION_GATES.md— new catalog fileBackend version range supported
xhigh, favorites, etc.Known gaps (not blocking)
Test plan for reviewers
xhigh, and the agent editor's Sharing section shows the server-managed textxhighis filtered out and the Collaborative toggle is shownUnknown event/NoTransformationFoundExceptionin logcat