Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
TypeScript aianthropicartifactsawsazurechatgptchatgpt-cloneclaudeclonedeepseekgeminigooglegpt-5librechatmcpo1openairesponses-apivisionwebui
⛴️ fix: Preserve Canary Sync Resolutions (#16457)
Liabbb58a867e17
diff --git a/AGENTS.md b/AGENTS.mdindex 6a4e2cea8b..6a486ba134 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -109,7 +109,7 @@ unsuccessful outcome as an exception:successful lookup with no record), never to hide a query failure.- For an expected failure the caller can handle without aborting the operation, prefer a typeddiscriminated result such as `{ ok: true; value: T } | { ok: false; error: { code: string;- message?: string } }`. Keep an existing domain-specific result shape when changing it would+message?: string } }`. Keep an existing domain-specific result shape when changing it wouldbreak callers; do not introduce interchangeable `ok`, `valid`, and bare `{ message }` contractsin the same service. Codes should be stable, machine-readable identifiers when the callerneeds to distinguish failures. Internal validation helpers may use the existing local pattern.@@ -145,16 +145,10 @@ For frontend work, compose existing `@librechat/client` primitives and variantsfeature-local styles. Use semantic theme/Tailwind roles for color and shared appearance; do notintroduce raw palette utilities, hard-coded colors, or arbitrary theme CSS. If the system cannotexpress a reusable design need, deepen the shared primitive or versioned theme-token registry-instead of copying classes into a feature. Keep genuine layout and behavior local, and document-why any new custom CSS cannot be expressed by the shared system.--`npm run lint` enforces this: `@shadcn/lint` reads each primitive's `cva` variants and reports a-`className` that overrides what the primitive owns, naming the variant, size or file to use-instead. Do not reach for `eslint-disable`, and do not widen a file's recorded count in-`eslint-suppressions.json` to land a restyle — that file holds the backlog the rules inherited, so-raising an entry is a reviewable claim that the override is right. After fixing violations, run-`npm run lint:design:prune`; after moving a file that carries suppressions, run-`npm run lint:design:suppress`. See the detailed policy in `CLAUDE.md` under “Theming and styling.”+instead of copying classes into a feature. Theme definitions select semantic colors and appearance,+not selectors, app behavior, or alternate layouts. Keep genuine layout and behavior local, and+explain why any new custom CSS cannot use shared primitives. Support light/dark and reduced motion;+preserve defaults and test a deliberately different reference theme for reusable new variants.## Backend auth cache@@ -196,6 +190,12 @@ before those checks succeed.## Frontend rules+Use the chat Share/Export action-menu pattern: `DropdownPopup` from `@librechat/client` with+`Ariakit.MenuButton` (see `HeaderMenu.tsx` and `useExportShare.tsx`). Never introduce or reintroduce+the Radix `DropdownMenu` family for app action or sort menus. Preserve the Share/Export+dialog-item contract (`hideOnClick: false`, item ref, button render, and dialog `triggerRef`)+when a menu action opens a dialog.+Use `useLocalize()` for all visible copy and update only English keys in`client/src/locales/en/translation.json`. Use semantic HTML, keyboard behavior, and ARIA labels.Use React Query for API interactions and invalidate related queries after mutations; define querydiff --git a/api/server/controllers/agents/__tests__/callbacks.spec.js b/api/server/controllers/agents/__tests__/callbacks.spec.jsindex 066b269ae1..19f4be4c42 100644--- a/api/server/controllers/agents/__tests__/callbacks.spec.js+++ b/api/server/controllers/agents/__tests__/callbacks.spec.js@@ -33,6 +33,8 @@ jest.mock('@librechat/api', () => ({isCodeArtifactToolOutput: jest.requireActual('@librechat/api').isCodeArtifactToolOutput,isCodeSessionToolName: jest.requireActual('@librechat/api').isCodeSessionToolName,collectToolCallIds: jest.requireActual('@librechat/api').collectToolCallIds,+ captureSubagentIdentity: jest.requireActual('@librechat/api').captureSubagentIdentity,+ createToolTimingAdapter: jest.requireActual('@librechat/api').createToolTimingAdapter,stampCommandExecutor: jest.requireActual('@librechat/api').stampCommandExecutor,}));diff --git a/api/server/controllers/agents/callbacks.js b/api/server/controllers/agents/callbacks.jsindex b28907bb9f..767c5ebc0a 100644--- a/api/server/controllers/agents/callbacks.js+++ b/api/server/controllers/agents/callbacks.js@@ -35,6 +35,7 @@ const {captureSubagentIdentity,getAttachmentOwnership,collectToolCallIds,+ createToolTimingAdapter,stampCommandExecutor,} = require('@librechat/api');const { processFileCitations } = require('~/server/services/Files/Citations');diff --git a/api/server/controllers/agents/resume.js b/api/server/controllers/agents/resume.jsindex c162b05216..6608e8beb7 100644--- a/api/server/controllers/agents/resume.js+++ b/api/server/controllers/agents/resume.js@@ -1961,6 +1961,7 @@ const ResumeAgentController = async (req, res, next, initializeClient, addTitle)checkpointNamespace,foregroundRunId: mcpRequestBody.messageId,requestBody: mcpRequestBody,+ toolTimingReplayEvents: resumeState?.replayEvents,});client = result.client;diff --git a/client/src/components/Chat/Input/ChatForm.tsx b/client/src/components/Chat/Input/ChatForm.tsxindex 1925004809..eb7d21bc63 100644--- a/client/src/components/Chat/Input/ChatForm.tsx+++ b/client/src/components/Chat/Input/ChatForm.tsx@@ -43,15 +43,6 @@ import {useComposerRestoreHost,BadgeRowProvider,} from '~/Providers';-import {- cn,- getModelSpec,- hasIncompleteFiles,- removeFocusRings,- getComposerDraftId,- getFilesDraftCached,- isPastedTextFileMarked,-} from '~/utils';import {PendingToolApprovalButton,PendingToolApprovalPanel,@@ -607,6 +598,7 @@ const ChatForm = memo(function ChatForm({{steering.canControlGeneration && (<InterruptSteerButtonsteering={steering}+ isNewConversation={isNewConversation}getText={() => methods.getValues('text')}onConsumed={consumeComposer}disabled={filesLoading}@@ -616,6 +608,7 @@ const ChatForm = memo(function ChatForm({ref={submitButtonRef}control={methods.control}steering={steering}+ isNewConversation={isNewConversation}getText={() => methods.getValues('text')}onConsumed={consumeComposer}disabled={filesLoading}@@ -628,6 +621,7 @@ const ChatForm = memo(function ChatForm({return stopButton;}, [consumeComposer,+ isNewConversation,steering,textValue,methods,diff --git a/client/src/components/Chat/Input/DuringRunSendButton.tsx b/client/src/components/Chat/Input/DuringRunSendButton.tsxindex ef4dc144d2..15d39332cf 100644--- a/client/src/components/Chat/Input/DuringRunSendButton.tsx+++ b/client/src/components/Chat/Input/DuringRunSendButton.tsx@@ -32,8 +32,9 @@ type DuringRunSendButtonProps = {* composer holds text: submitting steers or queues per the effective action.* Hovering it reveals the full action list with its shortcuts: steer, queue* (⌘/Ctrl+Enter routes to the non-default action), interrupt & steer- * (⌘/Ctrl+Shift+Enter: stops writing now but keeps what is written), and- * interrupt & send (⌥/Alt+Enter: discards the answer and starts over).+ * (⌘/Ctrl+Shift+Enter — requests an earlier safe point when a conversation+ * exists, otherwise stops and sends a new turn), and+ * interrupt & send (⌥/Alt+Enter — discards the answer and starts over).* Clearing the composer restores the Stop button.*/const DuringRunSendButton = React.memo(diff --git a/client/src/components/Chat/Input/InterruptSteerButton.tsx b/client/src/components/Chat/Input/InterruptSteerButton.tsxindex a206557296..e6d55f8bb4 100644--- a/client/src/components/Chat/Input/InterruptSteerButton.tsx+++ b/client/src/components/Chat/Input/InterruptSteerButton.tsx@@ -65,7 +65,11 @@ const InterruptSteerButton = React.memo((props: InterruptSteerButtonProps) => {}/><Ariakit.Tooltip className="bg-surface-tertiary text-text-primary z-50 rounded-lg px-2 py-1 text-xs shadow-lg">- {localize('com_ui_interrupt_steer_desc')}+ {localize(+ props.isNewConversation+ ? 'com_ui_steer_first_turn_stop_info'+ : 'com_ui_interrupt_steer_desc',+ )}</Ariakit.Tooltip></Ariakit.TooltipProvider>);diff --git a/client/src/components/Chat/Input/__tests__/ChatForm.attachments.spec.tsx b/client/src/components/Chat/Input/__tests__/ChatForm.attachments.spec.tsxindex e4d60c236e..e3156a208a 100644--- a/client/src/components/Chat/Input/__tests__/ChatForm.attachments.spec.tsx+++ b/client/src/components/Chat/Input/__tests__/ChatForm.attachments.spec.tsx@@ -70,7 +70,7 @@ let commits = 0;function Harness() {const [files, setFiles] = useRecoilState(store.filesByIndex(0));- const [isSubmitting] = useRecoilState(store.isSubmittingFamily(0));+ const [isSubmitting, setIsSubmitting] = useRecoilState(store.isSubmittingFamily(0));/* ChatView owns this read and passes it in; the harness stands in for it. */const [speechSettingsInitialized] = useRecoilState(store.speechSettingsInitialized);const [, setFilesLoading] = useState(false);diff --git a/client/src/components/Chat/Input/__tests__/DuringRunSendButton.test.tsx b/client/src/components/Chat/Input/__tests__/DuringRunSendButton.test.tsxindex b9f3b194ec..90d751f6b8 100644--- a/client/src/components/Chat/Input/__tests__/DuringRunSendButton.test.tsx+++ b/client/src/components/Chat/Input/__tests__/DuringRunSendButton.test.tsx@@ -54,7 +54,15 @@ const steeringStub = ({interruptAndSend: mockInterruptAndSend,}) as unknown as SteeringControls;-function Harness({ steering, enterToSend }: { steering: SteeringControls; enterToSend: boolean }) {+function Harness({+ steering,+ isNewConversation,+ enterToSend,+}: {+ steering: SteeringControls;+ isNewConversation: boolean;+ enterToSend: boolean;+}) {const methods = useForm<{ text: string }>({ defaultValues: { text: TEXT } });return (<DuringRunSendButton@@ -95,6 +103,7 @@ function openMenu(options: MenuOptions = {}) {<Harnesssteering={steeringStub({ ...stub, steerInterruptsByDefault: enterInterrupts })}enterToSend={enterToSend}+ isNewConversation={isNewConversation}/></RecoilRoot>,);diff --git a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsxindex 5ce6285563..46c8101993 100644--- a/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx+++ b/client/src/components/Chat/Messages/Content/ActivityPhaseGroup.tsx@@ -1,6 +1,5 @@import { memo, useId, useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useAtomValue } from 'jotai';-import { Button } from '@librechat/client';import { useTranslation } from 'react-i18next';import { ContentTypes } from 'librechat-data-provider';import { Check, Lightbulb, ChevronDown, TriangleAlert } from 'lucide-react';@@ -28,7 +27,6 @@ import { AttachmentGroup, StreamingThoughtPeek } from './Parts';import { useMCPIconMap, useMCPServerNames } from '~/hooks/MCP';import { getActivityLabelText } from '~/utils/activityLabels';import { getOutcomeStatus, summarizeSpan } from './outcome';-import { ROW_GLYPH_SLOT, TOOL_ROW_CLASSES } from './rows';import { MCPAppViews } from '~/components/MCPUIResource';import { sandboxStartingByToolCallId } from '~/store';import useClockFormat from '~/hooks/useClockFormat';@@ -420,8 +418,13 @@ function LivePhaseHeader({* the failed rows. Only a stop count has no pill and stays visible.* The verdict is the span's, not the newest line's, so it keeps its* own separator from whatever the row happens to be saying. */}- <span className="text-text-secondary mr-1">·</span>- <span>{detail}</span>+ {failedNote !== '' && <span className="sr-only">· {failedNote}</span>}+ {cancelledNote !== '' && (+ <>+ <span className="text-text-secondary mr-1">·</span>+ <span>{cancelledNote}</span>+ </>+ )}</span>)}</>@@ -450,7 +453,7 @@ function FailedPeekTime({ failedAt }: { failedAt: number | Date }) {<timedateTime={timestamp.iso}title={timestamp.absolute}- className="min-w-0 shrink truncate text-xs text-text-secondary"+ className="text-text-secondary min-w-0 shrink truncate text-xs"data-testid="activity-phase-failed-time">{timestamp.relative}@@ -796,11 +799,10 @@ export default function ActivityPhaseGroup({/** Pinned while open, so a run long enough to scroll keeps its name* at the top of the viewport. The containing block is this card, so* the header stops pinning where its own rows end. */- className={cn(isExpanded && 'sticky top-0 z-[1] bg-presentation')}+ className={cn(isExpanded && 'bg-presentation sticky top-0 z-[1]')}><div className="flex items-center gap-2 overflow-hidden">- <Button- variant="ghost"+ <buttontype="button"/** `ring-inset` is not decoration: the clip above is permanent (the* grid rows need it), so an outset ring would be drawn entirely@@ -855,7 +857,7 @@ export default function ActivityPhaseGroup({)}aria-hidden="true"/>- </Button>+ </button><FailedRevealPill count={failedCount} total={toolCount} onReveal={handleRevealFailed} /></div></div>diff --git a/client/src/components/Chat/Messages/Content/ContentParts.tsx b/client/src/components/Chat/Messages/Content/ContentParts.tsxindex b6d6df6a36..d54293fbeb 100644--- a/client/src/components/Chat/Messages/Content/ContentParts.tsx+++ b/client/src/components/Chat/Messages/Content/ContentParts.tsx@@ -1318,6 +1318,16 @@ const ContentParts = memo(function ContentParts(props: ContentPartsProps) {() => new Set(messageAppAttachments),[messageAppAttachments],);+ const messageContext = useMemo(+ () => ({+ messageId,+ conversationId,+ isExpanded: false as const,+ isSubmitting: isLatestMessage === true && isSubmitting,+ isLatestMessage,+ }),+ [messageId, conversationId, isSubmitting, isLatestMessage],+ );const toolState = useRef<{messageId: string;conversationId: string | null | undefined;@@ -1364,16 +1374,21 @@ const ContentParts = memo(function ContentParts(props: ContentPartsProps) {const attachmentsByName = useMemo(() => buildAttachmentsByName(attachments), [attachments]);const media = useMemo(() => ({ attachmentsByName }), [attachmentsByName]);return (- <MediaContext.Provider value={media}>- <ReasoningDisclosureContext.Provider value={reasoningDisclosures}>- <ToolDisclosureContext.Provider value={toolDisclosures}>- <MCPAppSuppressionContext.Provider value={suppressedAppAttachments}>- <ContentPartsBody {...props} />- </MCPAppSuppressionContext.Provider>- <MCPAppViews key={`message-apps-${appRenderScope}`} attachments={messageAppAttachments} />- </ToolDisclosureContext.Provider>- </ReasoningDisclosureContext.Provider>- </MediaContext.Provider>+ <MessageContext.Provider value={messageContext}>+ <MediaContext.Provider value={media}>+ <ReasoningDisclosureContext.Provider value={reasoningDisclosures}>+ <ToolDisclosureContext.Provider value={toolDisclosures}>+ <MCPAppSuppressionContext.Provider value={suppressedAppAttachments}>+ <ContentPartsBody {...props} />+ </MCPAppSuppressionContext.Provider>+ <MCPAppViews+ key={`message-apps-${appRenderScope}`}+ attachments={messageAppAttachments}+ />+ </ToolDisclosureContext.Provider>+ </ReasoningDisclosureContext.Provider>+ </MediaContext.Provider>+ </MessageContext.Provider>);});diff --git a/client/src/components/Chat/Messages/Content/ProgressText.tsx b/client/src/components/Chat/Messages/Content/ProgressText.tsxindex 746c003b34..47d62f8655 100644--- a/client/src/components/Chat/Messages/Content/ProgressText.tsx+++ b/client/src/components/Chat/Messages/Content/ProgressText.tsx@@ -237,27 +237,24 @@ export default function ProgressText({{text}</span>{subtitle && (- <span className="min-w-0 shrink truncate font-normal text-text-secondary">+ <span className="text-text-secondary min-w-0 shrink truncate font-normal">{subtitle}</span>)}</span>{errorSuffix && (- <span className="shrink-0 font-normal text-status-error">· {errorSuffix}</span>+ <span className="text-status-error shrink-0 font-normal">· {errorSuffix}</span>)}{errorSuffix && verdict && (<span className="text-text-secondary shrink-0 font-normal">· {verdict}</span>)}- {duration && (- <>- {/* The compact form is the readable one on screen but a poor- thing to hear ("one point four s"), so it is hidden from- assistive technology and paired with a spoken equivalent.- Both live inside the button, so its accessible name carries- the duration — this is not an `aria-live` region and does not- re-announce. */}- <span className="text-text-secondary font-normal" aria-hidden="true">- · {localize(duration.key, duration.values)}+ {isRunning && phaseStartAt != null && localPhaseStart != null && (+ <ElapsedTimer start={localPhaseStart} />+ )}+ {durationParts.map(({ label, duration }) => (+ <span key={label} className="text-text-secondary shrink-0 font-normal">+ <span aria-hidden="true">+ · {label} {localize(duration.key, duration.values)}</span><span className="sr-only">{label} {localize(duration.announcedKey, duration.announcedValues)}diff --git a/client/src/components/Chat/Messages/Content/ToolApproval.tsx b/client/src/components/Chat/Messages/Content/ToolApproval.tsxindex cce54f4d30..b71ad5e1d2 100644--- a/client/src/components/Chat/Messages/Content/ToolApproval.tsx+++ b/client/src/components/Chat/Messages/Content/ToolApproval.tsx@@ -1,4 +1,4 @@-import { useId, useEffect, useMemo } from 'react';+import { useId, useContext, useEffect, useMemo } from 'react';import { Button, TextareaAutosize } from '@librechat/client';import { Check, X, Pencil, MessageSquare, ShieldQuestion, TriangleAlert } from 'lucide-react';import type { Agents } from 'librechat-data-provider';@@ -219,18 +219,18 @@ export default function ToolApproval({}const descriptionNode = safeDescription != null && safeDescription.length > 0 && (- <p className="text-sm text-text-secondary">{safeDescription}</p>+ <p className="text-text-secondary text-sm">{safeDescription}</p>);if (deferToComposer) {return (<div- className="my-2 flex w-full flex-col gap-2 rounded-lg border border-border-light bg-surface-secondary p-3"+ className="border-border-light bg-surface-secondary my-2 flex w-full flex-col gap-2 rounded-lg border p-3"data-testid="tool-approval"data-tool-call-id={toolCallId}>{descriptionNode}- <p className="flex items-center gap-1.5 text-xs text-text-secondary">+ <p className="text-text-secondary flex items-center gap-1.5 text-xs"><ShieldQuestion className="size-4 shrink-0" aria-hidden="true" />{localize('com_ui_approval_review_in_composer')}</p>@@ -244,9 +244,7 @@ export default function ToolApproval({data-testid="tool-approval"data-tool-call-id={toolCallId}>- {safeDescription != null && safeDescription.length > 0 && (- <p className="text-text-secondary text-sm">{safeDescription}</p>- )}+ {descriptionNode}<div className="flex flex-wrap gap-2">{allowedDecisions.map((decision) => {const Icon = DECISION_ICON[decision];diff --git a/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx b/client/src/components/Chat/Messages/Content/ToolCallGroup.tsxindex 96d9980063..9d3d750382 100644--- a/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx+++ b/client/src/components/Chat/Messages/Content/ToolCallGroup.tsx@@ -1,6 +1,5 @@import { useState, useRef, useMemo, useEffect, useCallback } from 'react';import { useRecoilValue } from 'recoil';-import { Button } from '@librechat/client';import { Tools, Constants, ContentTypes } from 'librechat-data-provider';import { ChevronDown, ListChecks, MessageCircleQuestion, Users } from 'lucide-react';import type { TAttachment, TMessageContentParts } from 'librechat-data-provider';@@ -27,6 +26,7 @@ import { ToolAuthWarning, ToolAuthWarningContext } from './auth';import { useMCPIconMap, useMCPServerNames } from '~/hooks/MCP';import { AttachmentGroup, ReasoningCompact } from './Parts';import { getOutcomeStatus, summarizeSpan } from './outcome';+import { FOLD_RAIL_CLASSES, ROW_GLYPH_SLOT } from './rows';import { MCPAppViews } from '~/components/MCPUIResource';import { StackedToolIcons } from './ToolOutput';import { mapAttachments } from '~/utils/map';@@ -578,7 +578,7 @@ export default function ToolCallGroup({)}aria-hidden="true"/>- </Button>+ </button>{!withinActivityPhase && !parentPhaseOwnsFailurePill && (<FailedRevealPillcount={activitySummary.failedCount}@@ -586,32 +586,7 @@ export default function ToolCallGroup({onReveal={handleRevealFailed}/>)}- <span- className={cn(- 'tool-status-text min-w-0 truncate font-medium',- activityFailed && 'text-text-warning',- )}- role="status"- title={groupLabel}- >- {groupLabel}- </span>- {groupDetail && (- <span- className="text-text-secondary max-w-[40%] min-w-0 truncate text-xs font-normal"- title={groupDetail}- >- · {groupDetail}- </span>- )}- <ChevronDown- className={cn(- 'text-text-secondary size-4 shrink-0 transition-transform duration-200 ease-out',- isExpanded && 'rotate-180',- )}- aria-hidden="true"- />- </Button>+ </div><divstyle={expandStyle}onTransitionEnd={handleTransitionEnd}diff --git a/client/src/components/Chat/Messages/Content/__tests__/ProgressText.test.tsx b/client/src/components/Chat/Messages/Content/__tests__/ProgressText.test.tsxindex e79ee8fc58..e43f57d9ad 100644--- a/client/src/components/Chat/Messages/Content/__tests__/ProgressText.test.tsx+++ b/client/src/components/Chat/Messages/Content/__tests__/ProgressText.test.tsx@@ -284,6 +284,20 @@ describe('ProgressText verdict', () => {expect(screen.getByRole('button')).toHaveTextContent('· com_ui_tool_failed· exit code 2');});+ it('keeps the failure verdict but hides preparation, call, total, and live timers', () => {+ renderProgressText({+ phase: 'failed',+ verdict: 'exit code 2',+ durationMs: 248_000,+ toolPreparationDurationMs: 242_000,+ toolExecutionDurationMs: 5_700,+ phaseStartAt: 1_000,+ });+ expect(screen.getByRole('button')).toHaveTextContent('exit code 2');+ expect(screen.queryByText(/Preparation|Tool call|Total elapsed|took/)).toBeNull();+ expect(screen.queryByTestId('stream-elapsed')).toBeNull();+ });+it('shows no verdict on a successful card', () => {renderProgressText({ verdict: 'exit code 2' });expect(screen.queryByText(/exit code 2/)).not.toBeInTheDocument();diff --git a/client/src/hooks/SSE/steps/content.ts b/client/src/hooks/SSE/steps/content.tsindex 49de22d7fe..728454e1fc 100644--- a/client/src/hooks/SSE/steps/content.ts+++ b/client/src/hooks/SSE/steps/content.ts@@ -324,6 +324,11 @@ export function updateContent(type: ToolCallTypes.TOOL_CALL,auth: contentPart.tool_call.auth,expires_at: contentPart.tool_call.expires_at,+ toolPreparationStartedAt:+ contentPart.tool_call.toolPreparationStartedAt ??+ existingToolCall?.toolPreparationStartedAt,+ toolDispatchedAt:+ contentPart.tool_call.toolDispatchedAt ?? existingToolCall?.toolDispatchedAt,};if (finalUpdate) {diff --git a/client/src/hooks/SSE/steps/tools.ts b/client/src/hooks/SSE/steps/tools.tsindex 20240a090b..0633df69bb 100644--- a/client/src/hooks/SSE/steps/tools.ts+++ b/client/src/hooks/SSE/steps/tools.ts@@ -1,4 +1,9 @@-import { StepTypes, ContentTypes, getRunStepDurationMs } from 'librechat-data-provider';+import {+ StepTypes,+ ContentTypes,+ getRunStepDurationMs,+ getRunStepCloseMetadata,+} from 'librechat-data-provider';import type { Agents, TMessage, PartMetadata } from 'librechat-data-provider';import { getStepMetadata, updateContent } from './content';@@ -60,6 +65,7 @@ export function applyToolCallsStep(message: TMessage,runStep: Agents.RunStep,editPrefixOffset: number,+ getTiming?: ToolTimingLookup,): { message: TMessage; toolCallId?: string } {if (runStep.stepDetails.type !== StepTypes.TOOL_CALLS) {return { message };@@ -81,7 +87,13 @@ export function applyToolCallsStep(index,{type: ContentTypes.TOOL_CALL,- tool_call: { name: toolCall.name ?? '', args: toolCall.args, id, stepId: runStep.id },+ tool_call: {+ name: toolCall.name ?? '',+ args: toolCall.args,+ id,+ stepId: runStep.id,+ ...getTiming?.(id),+ },},false,metadata,@@ -100,6 +112,7 @@ export function applyToolCallDelta(delta: Agents.RunStepDeltaEvent,toolCallId: string,editPrefixOffset: number,+ getTiming?: ToolTimingLookup,): TMessage | undefined {if (delta.delta.type !== StepTypes.TOOL_CALLS || !delta.delta.tool_calls) {return undefined;@@ -108,13 +121,15 @@ export function applyToolCallDelta(const metadata = getStepMetadata(runStep);let next: TMessage = { ...message };for (const toolCallDelta of delta.delta.tool_calls) {+ const id = toolCallDelta.id || toolCallId;const contentPart: Agents.MessageContentComplex = {type: ContentTypes.TOOL_CALL,tool_call: {name: toolCallDelta.name ?? '',args: toolCallDelta.args ?? '',- id: toolCallId,+ id,stepId: delta.id,+ ...getTiming?.(id, toolCallDelta.index),},};if (delta.delta.auth != null) {@@ -175,7 +190,9 @@ export function applyRunStepClosed([ContentTypes.TOOL_CALL]: {...existingToolCall,runStepStatus: closed.status,+ ...getRunStepCloseMetadata(closed),...(durationMs != null && { runStepDurationMs: durationMs }),+ ...timing,},};return { ...message, content };diff --git a/client/src/hooks/SSE/useStepHandler.ts b/client/src/hooks/SSE/useStepHandler.tsindex 2cdfc1a783..d407db3cc7 100644--- a/client/src/hooks/SSE/useStepHandler.ts+++ b/client/src/hooks/SSE/useStepHandler.ts@@ -1,7 +1,13 @@import { useCallback, useRef } from 'react';import { useStore } from 'jotai';import { useRecoilCallback } from 'recoil';-import { Constants, StepTypes, StepEvents, ContentTypes } from 'librechat-data-provider';+import {+ Constants,+ StepTypes,+ StepEvents,+ ContentTypes,+ getToolTimingDurations,+} from 'librechat-data-provider';import type {Agents,TMessage,@@ -615,6 +621,15 @@ export default function useStepHandler({response,runStep,editPrefixOffset,+ (callId) => ({+ toolPreparationStartedAt:+ firstFragmentByCall.current.get(toolTimingKey(runStep.id, callId)) ??+ (runStep.stepDetails.type === StepTypes.TOOL_CALLS &&+ (runStep.stepDetails.tool_calls?.length ?? 0) <= 1+ ? firstFragmentByStep.current.get(runStep.id)+ : undefined),+ toolDispatchedAt: dispatchedByCall.current.get(toolTimingKey(runStep.id, callId)),+ }),);if (toolCallId) {toolCallIdMap.current.set(runStep.id, toolCallId);@@ -833,6 +848,14 @@ export default function useStepHandler({runStepDelta,toolCallIdMap.current.get(runStepDelta.id) ?? '',editPrefixOffset,+ (callId, index) => ({+ toolPreparationStartedAt:+ firstFragmentByCall.current.get(toolTimingKey(runStepDelta.id, callId)) ??+ (index === 0 ? firstFragmentByStep.current.get(runStepDelta.id) : undefined),+ toolDispatchedAt: dispatchedByCall.current.get(+ toolTimingKey(runStepDelta.id, callId),+ ),+ }),);if (updatedResponse) {messageMap.current.set(responseMessageId, updatedResponse);@@ -948,7 +971,37 @@ export default function useStepHandler({return;}- const updatedResponse = applyRunStepClosed(response, runStep, closed, editPrefixOffset);+ const existing = response.content?.[runStep.index + editPrefixOffset];+ if (existing?.type !== ContentTypes.TOOL_CALL || !existing.tool_call) {+ return;+ }+ const existingToolCall = existing.tool_call;+ const callId = existingToolCall.id ?? '';+ const key = toolTimingKey(closed.id, callId);+ const singleCallStep =+ runStep.stepDetails.type === StepTypes.TOOL_CALLS &&+ (runStep.stepDetails.tool_calls?.length ?? 0) <= 1;+ const observedAt = Math.min(+ firstFragmentByCall.current.get(key) ?? Infinity,+ existingToolCall.toolPreparationStartedAt ?? Infinity,+ singleCallStep ? (firstFragmentByStep.current.get(closed.id) ?? Infinity) : Infinity,+ );+ const timing = getToolTimingDurations({+ observedAt: Number.isFinite(observedAt) ? observedAt : undefined,+ dispatchedAt: existingToolCall.toolDispatchedAt ?? dispatchedByCall.current.get(key),+ completedAt: completedByCall.current.get(key),+ });+ firstFragmentByCall.current.delete(key);+ firstFragmentByStep.current.delete(closed.id);+ dispatchedByCall.current.delete(key);+ completedByCall.current.delete(key);+ const updatedResponse = applyRunStepClosed(+ response,+ runStep,+ closed,+ editPrefixOffset,+ timing,+ );if (!updatedResponse) {return;}diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.jsonindex 2f36b5104c..80e0258aa2 100644--- a/client/src/locales/en/translation.json+++ b/client/src/locales/en/translation.json@@ -1,6 +1,59 @@{"com_ui_attachments": "Attachments","com_ui_no_schedules_match": "No schedules match your search",+ "com_ui_background_tasks": "Background tasks",+ "com_ui_background_tasks_cancel_disabled": "Stopping background tools is not enabled on this server",+ "com_ui_background_tasks_checked": "Checked background tasks",+ "com_ui_background_tasks_checking": "Checking background tasks",+ "com_ui_background_tasks_completed": "Completed",+ "com_ui_background_tasks_control_not_found": "Control not found",+ "com_ui_background_tasks_control_queued": "Control queued",+ "com_ui_background_tasks_empty": "No background tasks yet",+ "com_ui_background_tasks_failed_label": "Background tasks, {{0}} results not delivered",+ "com_ui_background_tasks_finished": "Finished",+ "com_ui_background_tasks_incomplete": "Some background results may not be shown. Check again later.",+ "com_ui_background_tasks_label": "Background tasks, {{0}} running",+ "com_ui_background_tasks_n_checks": "{{0}} checks",+ "com_ui_background_tasks_no_output": "No output returned",+ "com_ui_background_tasks_not_running": "No longer running",+ "com_ui_background_tasks_pending_label": "Background tasks, {{0}} results pending",+ "com_ui_background_tasks_raw_details": "Raw task details",+ "com_ui_background_tasks_result_available": "Result available on request",+ "com_ui_background_tasks_result_claimed": "Result claimed",+ "com_ui_background_tasks_result_pending": "Result pending",+ "com_ui_background_tasks_result_undelivered": "Result not delivered",+ "com_ui_background_tasks_running": "Running",+ "com_ui_background_tasks_stop": "Stop task",+ "com_ui_background_tasks_stop_all": "Stop all running tasks",+ "com_ui_background_tasks_stop_available": "Stop available running tasks",+ "com_ui_background_tasks_stop_failed": "Could not stop some tasks. Try again.",+ "com_ui_background_tasks_load_failed": "Could not load all tasks. The list may be incomplete. Try again.",+ "com_ui_background_tasks_stopping": "Stopping…",+ "com_ui_background_tasks_subagent": "Subagent",+ "com_ui_background_tasks_artifact_not_inline": "This task produced an artifact that is not shown here.",+ "com_ui_background_tasks_cancellation_requested": "Cancellation requested. The task may still be running; check again for its final status.",+ "com_ui_background_tasks_failed_delivery_guidance": "Automatic delivery failed. Poll each affected task to collect its result; it will not arrive as a new turn.",+ "com_ui_background_tasks_failed_delivery_note": "Automatic delivery failed. Poll this task to collect its result; it will not arrive as a new turn.",+ "com_ui_background_tasks_files_attached": "Generated files are attached to the original tool call.",+ "com_ui_background_tasks_files_attaching": "Output and generated files are being attached to the original tool call.",+ "com_ui_background_tasks_more_in_raw_details": "More information in raw task details.",+ "com_ui_background_tasks_notice_delivery_scheduled": "Result assigned to another poll or automatic delivery. It may still arrive as a new turn.",+ "com_ui_background_tasks_notice_discard_unavailable": "Could not discard the pending result. It may still arrive as a new turn; try again shortly.",+ "com_ui_background_tasks_notice_error": "The background-task check failed. See raw task details.",+ "com_ui_background_tasks_notice_invalid": "Invalid background-task request. Check the task ID or control arguments.",+ "com_ui_background_tasks_notice_not_found": "No background task with that ID was found in this conversation.",+ "com_ui_background_tasks_notice_outcome_unknown": "The task's outcome is unknown. Inspect the target system before repeating an action.",+ "com_ui_background_tasks_notice_rejected": "The request was rejected. Check raw details before trying again.",+ "com_ui_background_tasks_notice_result_persisting": "The result is being saved or recovered. Check again shortly; do not rerun the task.",+ "com_ui_background_tasks_notice_result_unavailable": "The result is temporarily unavailable. Check again later; do not automatically repeat a mutating action.",+ "com_ui_background_tasks_notice_subagent_only": "This control action is available only for subagent tasks.",+ "com_ui_background_tasks_notice_unavailable": "Task or control temporarily unavailable. Check again; do not assume the task stopped or its result will not arrive.",+ "com_ui_background_tasks_pending_delivery_guidance": "Finished results are pending delivery. Poll to collect now or wait for the agent to resume; do not treat them as delivered yet.",+ "com_ui_background_tasks_pending_delivery_note": "Result pending delivery. It may still arrive as a new turn; poll to collect it sooner.",+ "com_ui_background_tasks_result_discarded": "Finished result discarded. It will not arrive as a new turn.",+ "com_ui_background_tasks_running_elsewhere": "Still running outside this turn. Its result may arrive as a new turn.",+ "com_ui_background_tasks_subagent_pending_guidance": "Finished subagent results are pending delivery. Poll to collect now or wait for the agent to resume.",+ "com_ui_background_tasks_subagent_wakeup_guidance": "This subagent will automatically resume the agent when it finishes; there is no need to poll it repeatedly.","com_ui_repository_instructions": "Repository instructions","com_ui_repository_instructions_prefer": "Prefer repository conventions","com_ui_repository_instructions_defer": "Prefer agent conventions",@@ -2730,11 +2783,13 @@"com_ui_steer_delivery_uncertain": "Delivery status is unknown; this steering message may still reach the agent","com_ui_steer_failed": "Steering failed","com_ui_steer_failed_inline": "Couldn't add to this reply",+ "com_ui_steer_first_turn_stop": "Stop & send (first response)",+ "com_ui_steer_first_turn_stop_info": "Steering isn't available yet. Stops this response and sends your message as a new turn.","com_ui_steer_in_flight": "Steering",- "com_ui_steer_in_flight_preempt": "Interrupting",- "com_ui_steer_interrupting_info": "Interrupt requested. The response will stop at the next safe point, then your message takes over. Reasoning and tool calls are not interrupted. To interrupt them, stop the response instead.",- "com_ui_steer_interrupts_default": "Steering interrupts generation",- "com_ui_steer_interrupts_default_info": "When on, Enter stops the response at the next safe point instead of waiting for the agent's next tool step. Either way the partial answer is kept and the response continues.",+ "com_ui_steer_in_flight_preempt": "Steer sooner requested",+ "com_ui_steer_interrupting_info": "Earlier steering requested. The agent may pause a text reply at a safe point or restart an attempt that has produced only reasoning. Running tools finish first. If it cannot pause, your message waits for the next tool step or an end-of-response opportunity.",+ "com_ui_steer_interrupts_default": "Steer sooner on Enter",+ "com_ui_steer_interrupts_default_info": "When steering is the default, Enter requests an earlier safe point instead of waiting for the next tool step. Running tools finish first; a thinking-only attempt may restart. Text already shown is kept.","com_ui_steer_moved_to_queue": "Moved to the queue: it sends when this response finishes","com_ui_steer_paused_queued": "The agent is waiting for your review — your message was queued instead","com_ui_steer_preempt_unsupported": "This deployment can't steer mid-response. Your message waits for the next tool step or an end-of-response opportunity",diff --git a/client/src/routes/Layouts/Startup.tsx b/client/src/routes/Layouts/Startup.tsxindex d9c3ee819f..7775b770b4 100644--- a/client/src/routes/Layouts/Startup.tsx+++ b/client/src/routes/Layouts/Startup.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from 'react';import { Outlet, useNavigate, useLocation } from 'react-router-dom';import type { TStartupConfig } from 'librechat-data-provider';-import { DEFAULT_APP_TITLE, REDIRECT_PARAM, SESSION_KEY, setDocumentTitle } from '~/utils';+import { DEFAULT_APP_TITLE, REDIRECT_PARAM, hasStoredRedirect, setDocumentTitle } from '~/utils';import { TranslationKeys, useLocalize } from '~/hooks';import { useGetStartupConfig } from '~/data-provider';import AuthLayout from '~/components/Auth/AuthLayout';diff --git a/client/src/utils/__tests__/redirect.test.ts b/client/src/utils/__tests__/redirect.test.tsindex 4d8e171851..83667b0cf4 100644--- a/client/src/utils/__tests__/redirect.test.ts+++ b/client/src/utils/__tests__/redirect.test.ts@@ -3,6 +3,7 @@ import {getPostLoginRedirect,isSafeRedirect,withBasePath,+ hasStoredRedirect,SESSION_KEY,} from '../redirect';diff --git a/client/src/utils/redirect.ts b/client/src/utils/redirect.tsindex ceca700521..0cde6615d8 100644--- a/client/src/utils/redirect.ts+++ b/client/src/utils/redirect.ts@@ -31,6 +31,35 @@ function resolvesToSameOrigin(url: string): boolean {}}+/** Session storage is blocked outright in embedded and private contexts, where it throws on+ * access rather than returning null. The destination is a convenience, never a credential, so a+ * blocked store must cost the deep link, never the sign-in that carries it: every access+ * degrades to "no destination stored". Every other session-storage consumer in the client is+ * already guarded this way; the redirect flow was the one reaching for the store bare-handed. */+export const readStoredRedirect = (): string | null => {+ try {+ return sessionStorage.getItem(SESSION_KEY);+ } catch {+ return null;+ }+};++export const dropStoredRedirect = (): void => {+ try {+ sessionStorage.removeItem(SESSION_KEY);+ } catch {+ // A blocked store holds nothing to drop.+ }+};++const writeStoredRedirect = (value: string): void => {+ try {+ sessionStorage.setItem(SESSION_KEY, value);+ } catch {+ // The destination cannot cross a document swap in this context; the sign-in continues.+ }+};+/** Validates that a redirect target is a safe relative path (not an absolute or protocol-relative URL) */export function isSafeRedirect(url: string): boolean {if (hasControlChar(url)) {diff --git a/e2e/specs/mock/activity-prose.spec.ts b/e2e/specs/mock/activity-prose.spec.tsindex dde5cc6a32..4e15ad3102 100644--- a/e2e/specs/mock/activity-prose.spec.ts+++ b/e2e/specs/mock/activity-prose.spec.ts@@ -49,11 +49,14 @@ for (const autoExpandTools of [false, true]) {await page.goto(NEW_CHAT_PATH);await selectMockEndpoint(page, { label: 'Mock Provider F', model: 'mock-model-f' });- await page.getByRole('button', { name: 'MCP Servers', exact: true }).click();- const server = page.getByRole('menuitemcheckbox', { name: /E2E Memory/ });+ await page.getByRole('button', { name: 'Attach and tools' }).click();+ const palette = page.getByRole('dialog', { name: 'Attach and tools' });+ const server = palette.getByRole('button', { name: /^E2E Memory\b/ });+ await expect(server).toBeVisible({ timeout: 20_000 });await server.click();- await expect(server).toHaveAttribute('aria-checked', 'true');+ await expect(server).toHaveAttribute('aria-pressed', 'true');await page.keyboard.press('Escape');+ await expect(page.getByRole('listitem', { name: 'E2E Memory', exact: true })).toBeVisible();expect((await sendMessage(page, `E2E_ACTIVITY_PROSE_REPLY:${label}`)).ok()).toBeTruthy();const intro = messagesView(page).locator('.message-content p').filter({ hasText: INTRO });diff --git a/e2e/specs/mock/steering-escalation.spec.ts b/e2e/specs/mock/steering-escalation.spec.tsindex f5f3c1707e..e3aa388b31 100644--- a/e2e/specs/mock/steering-escalation.spec.ts+++ b/e2e/specs/mock/steering-escalation.spec.ts@@ -220,7 +220,7 @@ test.describe('escalating waiting messages to an interrupt', () => {await page.getByRole('menuitem', { name: 'Settings' }).click();await page.getByRole('tab', { name: 'Chat' }).click();const interruptToggle = page.getByRole('switch', {- name: 'Steering interrupts generation',+ name: 'Steer sooner on Enter',});await expect(interruptToggle).toBeVisible({ timeout: 5000 });await interruptToggle.click();diff --git a/librechat.example.yaml b/librechat.example.yamlindex 484de2ad8c..338567613f 100644--- a/librechat.example.yaml+++ b/librechat.example.yaml@@ -491,6 +491,11 @@ registration:# mcpApps:# resourcesPerMinute: 120# toolCallsPerMinute: 60+# # Shared account budget for all authenticated 2FA management operations.+# # Always active; successful and failed requests count. Uses Redis when enabled.+# # Minimum 3, so enable -> verify -> confirm can complete within one window.+# twoFactorManagement:+# requestsPerFiveMinutes: 7# # Authenticated agent-event admission has its own API-key-principal bucket.# agentEvents:# userMax: 40diff --git a/packages/api/src/app/service.spec.ts b/packages/api/src/app/service.spec.tsindex 48d0daecaa..10e9c5e20c 100644--- a/packages/api/src/app/service.spec.ts+++ b/packages/api/src/app/service.spec.ts@@ -737,6 +737,65 @@ describe('createAppConfigService', () => {expect(config.interfaceConfig?.modelSelect).toBe(true);});+ it.each([true, false])(+ 'preserves tenant isolation through a theme override (valid: %s), including cache hits',+ async (valid) => {+ const custom = [+ { name: 'Global', baseURL: 'https://global.example' },+ { name: 'Private', tenantId: 'owner-tenant', baseURL: 'https://private.example' },+ ];+ const base = {+ interfaceConfig: { theme: 'clickhouse' },+ endpoints: { custom },+ config: { endpoints: { custom } },+ };+ const deps = createDeps({+ loadBaseConfig: jest.fn().mockResolvedValue(base),+ getApplicableConfigs: jest.fn().mockResolvedValue([+ {+ priority: 10,+ isActive: true,+ overrides: {+ interface: {+ theme: {+ version: 1,+ name: 'override',+ modes: {+ light: {+ colors: {+ 'rgb-surface-primary': valid ? '1 2 3' : '300 16 32',+ 'surface-future': '4 5 6',+ },+ },+ },+ },+ },+ },+ },+ ]),+ });+ const { getAppConfig } = createAppConfigService(deps);+ for (const tenantId of ['other-tenant', 'owner-tenant', 'other-tenant']) {+ const config = await getAppConfig({ role: 'USER', tenantId });+ const names = tenantId === 'owner-tenant' ? ['Global', 'Private'] : ['Global'];+ expect(config.endpoints?.custom?.map((endpoint) => endpoint.name)).toEqual(names);+ expect(config.config.endpoints?.custom?.map((endpoint) => endpoint.name)).toEqual(names);+ expect(config.interfaceConfig?.theme).toEqual(+ valid+ ? {+ version: 1,+ name: 'override',+ modes: { light: { colors: { 'rgb-surface-primary': '1 2 3' } } },+ }+ : 'clickhouse',+ );+ }+ expect(custom).toHaveLength(2);+ expect(base.interfaceConfig.theme).toBe('clickhouse');+ expect(deps.getApplicableConfigs).toHaveBeenCalledTimes(2);+ },+ );+it('keeps the base theme when a DB override supplies an invalid one', async () => {const deps = createDeps({loadBaseConfig: jestdiff --git a/packages/api/src/app/service.ts b/packages/api/src/app/service.tsindex 73000e3fcd..2ce0b85c06 100644--- a/packages/api/src/app/service.ts+++ b/packages/api/src/app/service.ts@@ -569,9 +569,13 @@ export function createAppConfigService(deps: AppConfigServiceDeps): {try {const configs = await getApplicableConfigs(principals);if (configs.length > 0) {- merged = checkOverrideTheme(- baseConfig,- materializeConfigModelSpecs(mergeConfigOverrides(baseConfig, configs)),+ merged = scopeCustomEndpoints(+ checkOverrideTheme(+ scopedBaseConfig,+ materializeConfigModelSpecs(mergeConfigOverrides(scopedBaseConfig, configs)),+ ),+ effectiveTenantId,+ hiddenEndpoints,);}} catch (error) {diff --git a/packages/data-provider/src/config.spec.ts b/packages/data-provider/src/config.spec.tsindex 361045207b..fbfd629f63 100644--- a/packages/data-provider/src/config.spec.ts+++ b/packages/data-provider/src/config.spec.ts@@ -10,6 +10,7 @@ import {DEFAULT_STEER_ARM_CONFIRMATION_TIMEOUT_MS,codeEnvironmentUserConfigSchema,interfaceSchema,+ CODE_ENVIRONMENT_ADMISSION_MAX_MS,excludedKeys,DEFAULT_MCP_APP_ADMISSION_REQUESTS_PER_MINUTE,DEFAULT_MCP_APP_PERSISTED_BYTES,@@ -21,6 +22,7 @@ import {MAX_MCP_APP_PERSISTED_BYTES,resolveMCPAppRateLimits,resolveMCPAppsPolicy,+ endpointSchema,resolveEndpointType,webSearchSchema,} from './config';diff --git a/packages/data-provider/src/index.ts b/packages/data-provider/src/index.tsindex 3d18c331fc..592c6a5ede 100644--- a/packages/data-provider/src/index.ts+++ b/packages/data-provider/src/index.ts@@ -16,6 +16,7 @@ export * from './errors';export * from './runSteps';/* ui parts */export * from './parts';+export * from './toolTiming';/* artifacts */export * from './artifacts';/* schema helpers */diff --git a/packages/data-provider/src/parameterSettings.ts b/packages/data-provider/src/parameterSettings.tsindex d8a0c3ec74..7d21c90d8c 100644--- a/packages/data-provider/src/parameterSettings.ts+++ b/packages/data-provider/src/parameterSettings.ts@@ -19,15 +19,21 @@ import {BedrockProviders,anthropicSettings,} from './types';+import {+ hasAlwaysOnThinking,+ hasBetweenToolsThinkingFloor,+ supportsPromptCache,+ supportsAdaptiveThinking,+} from './bedrock';import {getModelKey,getSettingsKeys,reasoningOverrideSchema,ReasoningParameterFormat,} from './schemas';-import { isOpus55Model, supportsPromptCache, supportsAdaptiveThinking } from './bedrock';import { resolveEffectiveUseResponsesApi } from './file-config';import { clampSettingRange } from './generate';+import { gpt6Tier } from './families';// Base definitionsconst baseDefinitions: Record<string, SettingDefinition> = {diff --git a/packages/data-schemas/src/methods/conversation.ts b/packages/data-schemas/src/methods/conversation.tsindex 1b556288d6..2918817288 100644--- a/packages/data-schemas/src/methods/conversation.ts+++ b/packages/data-schemas/src/methods/conversation.ts@@ -3042,6 +3042,7 @@ export function createConversationMethods(delete sanitized.lastResponseMessageId;delete sanitized.lastResponseIsManual;delete sanitized.lastSeenAt;+ delete sanitized.codeApprovalMode;delete sanitized.initial_agent_id;delete sanitized.codeEnvironmentRevision;stripActorCheckpointFields(sanitized);