Tokenize budgeting inputs in bounded chunks instead of charging a token per UTF-8 byte above 4 KiB. Subdivide long whitespace/non-whitespace runs to bound BPE merge work and preserve surrogate pairs. Keep strict provider-accounting counts and unavailable-tokenizer fallbacks separate.
Cover both encodings, SDK slice composition, programmatic tool prompts, summarization, real overflow, cache reuse, and failure recovery. Related to #16278.
Co-authored-by: Lia <lia@librechat.ai>
* 🦉 fix: Quiet Idle Subagent Discovery While Preserving Child Wakeups
* 🐣 fix: Wake Saved Parent Index During First-Run Events
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🔕 perf: Back Off Idle Durable Agent Recovery Polls
* 🎛️ style: Format Queued-Turn Recovery Test
* fix: Preserve Durable Recovery Wakeups and Discovery Invariants
---------
Co-authored-by: Lia <lia@librechat.ai>
* fix: Surface Persistent Memory Before First Save
* fix: Distinguish Unreadable Memory From Empty Memory
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🐤 docs: Clarify Maintainer-Directed Canary Pull Requests
* 🐤 docs: Link Issues on Dev and Canary PRs
---------
Co-authored-by: Lia <lia@librechat.ai>
Update package repository and bugs URLs, GitHub links in docs, templates and comments, and image references (compose files, deployed-update, Helm values and renovate hints) from danny-avila to LibreChat-AI / librechat-ai. Covers the rag-api repository and its images, which moved to the organization. Sponsor links and the sealed star-history chart are unchanged.
* fix: constrain agent selector to 480px and 10 unsearched agents
The Agents panel selector dropdown now caps at 480px tall with the option
list scrolling inside, and lists at most 10 agents while the search field
is empty; typing lifts the cap so search still reaches every agent.
ControlCombobox gains optional popoverMaxHeight and unsearchedLimit props,
so every other selector keeps its current fixed 300px list.
* fix: make the agent selector cap configurable, viewport-safe, and selection-preserving
The unsearched list cap now reads interface.agentSelectorLimit from
librechat.yaml (default 10), the popover cap yields to Ariakit's
available height so a short viewport never pushes options offscreen,
and a selected agent ranking past the cut keeps the last slot instead
of disappearing until searched for.
* fix: forward agentSelectorLimit through the interface loader and guard it at the client
loadDefaultInterface whitelists interface fields, so the new knob never
reached /api/config without explicit forwarding; and values that bypass
interfaceSchema (raw yaml reads, principal-scoped admin overrides) are
normalized back into 1..100 at the client so a bad override cannot empty
the selector.
* 🛝 refactor: Route Packaged Chat Completion Frames Through a Writer
* style: Match Chat Completion Contract Test Import Order
* fix: Avoid ES2022 Array Methods in Protocol Contract Test
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🚉 fix: Keep Queue Controls with the Starting Turn
* 🚉 fix: Stabilize the Pending-Turn Portal Callback
---------
Co-authored-by: Lia <lia@librechat.ai>
Move the mirror out of the merge job and into a job that declares the legacy-mirror environment, so the token that can write to the legacy namespace is reachable only from workflows running on the branches that environment allows. A failed mirror can no longer fail a publish either: the job carries continue-on-error.
* Add client side tools
* 🚦 fix: Ask the Model to Call Caller-Executed Tools Alone
* Add client tool continuation replay tests
* Fix clientTools docstring
* fix: return only tools that have been actually applied
* 🔁 fix: Continue a Caller-Executed Tool Exchange Across Requests
* fix: handle null values for tool descriptions and parameters in client tools
* 🧩 fix: Keep the Arguments of Every Tool Call in a Streamed Message
* Fix PR comments
* fix: Preserve client tool handoff across SDK event ordering
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🛍️ feat: Add Programming App to OpenRouter Categories
* style: Format OpenRouter category override test
---------
Co-authored-by: Lia <lia@librechat.ai>
* feat: add GPT-6 Sol and Luna support
* fix: normalize Sol and Luna reasoning requests
* fix: align Sol and Luna effective Responses routing
* fix: honor server routing policy for model uploads
* test: await system grant indexes before writes
* fix: verify model upload policies against runtime initialization
---------
Co-authored-by: Lia <lia@librechat.ai>
* Count the tool only while the line is its generic label
A streamed intent already names the work this call is doing, so a repeat count beside it reads as a claim that the sentence happened N times. The count now rides the generic Running/Ran label alone, and is dropped for an intent, a failure or cancellation verdict, and a background handle line.
* fix: Omit Repeat Counts From Sandbox Startup Labels
* test: Bound Client Recovery Worker Activation Waits
---------
Co-authored-by: Lia <lia@librechat.ai>
The collapsed live activity row printed its repeated-tool multiplier at the row's far right, beside the chevron, a full row width away from the line it counts. It now sits directly after that line, the way the unfolded group already reads Create File x2, while the span's failure and cancellation verdict keeps the row's right edge because it belongs to the whole span.
Co-authored-by: Lia <lia@librechat.ai>
* feat: add Claude Opus 5.5 support
* fix: preserve Opus 5.5 settings through provider adapters
* fix: preserve model-hidden settings when pruning parameters
---------
Co-authored-by: Lia <lia@librechat.ai>
After a repository moves to another owner, images publish under the new owner while existing deployments still pull the old namespace. The merge job now copies each published tag to LEGACY_GHCR_OWNER when that variable and the LEGACY_GHCR_TOKEN secret are set, using GHCR cross-repo blob mounts. It stays off while the legacy owner matches the publishing owner, and never fails the build.
* docs: set expectations for AI-assisted contributions
* docs: note that we may finish a contributor's branch
---------
Co-authored-by: Lia <lia@librechat.ai>
* 🌊 fix: Prevent Agent Model Stream Idle Timeouts
* fix: Preserve Default Proxy Dispatcher Construction
* test: Assert Agent Transport Timeout Policy
* test: Cover Direct Model Dispatcher Reuse
* fix: Scope Agent Model Transport Timeouts
* fix: Enforce Agent Timeouts Across Direct and Summary Clients
* fix: Align Model Transport Adapter Types
---------
Co-authored-by: Lia <lia@librechat.ai>
* feat: report dispatch, settlement and elapsed timings from check_background_task
The poll tool described a background task only as running or settled, with no
notion of when: a caller could not tell a task dispatched seconds ago from one
stuck for an hour, and a collected result carried no settlement time.
Ordinary and subagent tasks both already stamp dispatch and last update in the
registry, so the poll payload now serializes them the way the rest of the app
serializes time (ISO-8601), plus the elapsed span because a polling model has no
clock of its own. The durable receipt a poll falls back to after a restart
already stored its settlement time; it is carried through the claim projection so
a recovered poll reports settlement too.
* test: drive the timing assertions from the assigned dispatch stamp
The registry dispatch stamp is strictly increasing and process-global, so it is
not the mocked clock: the poll test now reads the stamp the registry assigned and
drives the clock from it. Four durable-claim assertions admit the settlement
stamp the projection now carries, and the new block is Prettier-formatted.
---------
Co-authored-by: Lia <lia@librechat.ai>
The quote specs resolved a needle inside a single text node, which the
smooth-streaming fade makes untrue for the whole window between a reply
being fully readable and its turn settling: `animate.tsx` wraps every
word of the animated message in its own span, so `E2E opening paragraph`
lives in three sibling text nodes and the lookup threw
`No text node contains: E2E opening paragraph`.
The lookup now matches each message's flattened text and maps the match
back onto the nodes it came from, and the cross-message test checks the
selection is still crossing two messages when it asserts the popup stays
away, so a collapsed selection can no longer pass it by default.
Co-authored-by: Lia <lia@librechat.ai>
* fix: preserve Insights with guarded ACL role updates
* fix: reject combined $bit operators in ACL permission writes
* test: type the permission-bit spies without never casts
* test: settle ACL index builds before opening the transaction
* fix: replace ACL mask partitions with single-operator bit writes
* style: drop the now-unused RoleBits import
* fix: split two-sided permission bit writes into single operators
* fix: make ACL role replacement one atomic guarded write
* fix: export the permission write retry ceiling
* fix: retry ACL mutations per document and preserve atomic permissions
---------
Co-authored-by: Lia <lia@librechat.ai>
* fix: preserve Insights with guarded ACL role updates
* test: settle ACL index builds before opening the transaction
* fix: replace ACL mask partitions with single-operator bit writes
* style: drop the now-unused RoleBits import
* fix: make ACL role replacement one atomic guarded write
* fix: export the permission write retry ceiling
* fix: retry ACL mutations per document and preserve atomic permissions
---------
Co-authored-by: Lia <lia@librechat.ai>