librechat-data-provider 0.8.522 → 0.8.523
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{data-service-CaB7saTP.mjs → data-service-Bx6IFaSa.mjs} +638 -27
- package/dist/data-service-Bx6IFaSa.mjs.map +1 -0
- package/dist/{data-service-D5kHzBt-.js → data-service-CTX0tVO5.js} +871 -26
- package/dist/data-service-CTX0tVO5.js.map +1 -0
- package/dist/index.js +557 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +491 -20
- package/dist/index.mjs.map +1 -1
- package/dist/react-query/index.js +1 -1
- package/dist/react-query/index.mjs +1 -1
- package/dist/types/accessPermissions.d.ts +54 -1
- package/dist/types/api-endpoints.d.ts +6 -0
- package/dist/types/bedrock.d.ts +80 -20
- package/dist/types/code/approval.d.ts +26 -0
- package/dist/types/code/worker.d.ts +10 -0
- package/dist/types/code/workspace.d.ts +28 -0
- package/dist/types/codeEnvRef.d.ts +5 -0
- package/dist/types/config.d.ts +6062 -3828
- package/dist/types/data-service.d.ts +8 -0
- package/dist/types/errors.d.ts +2 -0
- package/dist/types/file-config.d.ts +137 -9
- package/dist/types/filters.d.ts +176 -176
- package/dist/types/generate.d.ts +28 -4
- package/dist/types/index.d.ts +7 -0
- package/dist/types/keys.d.ts +11 -1
- package/dist/types/mcp.d.ts +336 -330
- package/dist/types/messages.d.ts +19 -0
- package/dist/types/models.d.ts +367 -238
- package/dist/types/parameterSettings.d.ts +8 -0
- package/dist/types/providers.d.ts +1 -0
- package/dist/types/resolve-llm-delivery-path.d.ts +68 -0
- package/dist/types/schemas.d.ts +628 -317
- package/dist/types/svg.d.ts +34 -0
- package/dist/types/types/agents.d.ts +24 -0
- package/dist/types/types/assistants.d.ts +27 -3
- package/dist/types/types/files.d.ts +34 -0
- package/dist/types/types/insights.d.ts +9 -0
- package/dist/types/types/queries.d.ts +8 -1
- package/dist/types/types/queuedTurns.d.ts +16 -16
- package/dist/types/types/runs.d.ts +24 -5
- package/dist/types/types/schedules.d.ts +44 -11
- package/dist/types/types/traces.d.ts +85 -0
- package/dist/types/types.d.ts +41 -1
- package/package.json +2 -2
- package/dist/data-service-CaB7saTP.mjs.map +0 -1
- package/dist/data-service-D5kHzBt-.js.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as permissionEntrySchema, $a as googleSchema, $i as BedrockReasoningConfig, $n as specialVariables, $o as feedbackSchema, $r as defaultTextMimeTypes, $s as normalizeEndpointName, $t as azureGroupConfigsSchema, Aa as defaultAgentFormValues, Ai as materializeModelSpecEndpoints, An as imageGenTools, Ao as tQueryParamsSchema, Ar as isProcessMCPServerField, As as feedbackFilterFieldSchema, At as SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, B as MutationKeys, Ba as eReasoningResponseKeySchema, Bi as getMaxSubagents, Bn as modularEndpoints, Bo as actionDelimiter, Br as registerPage, Bs as hasActivePiiPatterns, Bt as SettingsViews, Ca as authTypeSchema, Ci as setFileConfigRegexCompiler, Cn as fileSourceSchema, Co as tConvoUpdateSchema, Cr as MCP_USER_INPUT_FIELDS, Cs as SKILL_FILTER_FIELDS, Ct as MAX_SUBAGENT_DEPTH, Da as compactAgentsSchema, Di as videoMimeTypes, Dn as getDefaultParamsEndpoint, Do as tPluginAuthConfigSchema, Dr as WebSocketOptionsSchema, Ds as agentInstructionFilterFieldSchema, Dt as RateLimitPrefix, Ea as compactAgentsBaseSchema, Ei as textMimeTypes, En as getConfigDefaults, Eo as tModelSpecPresetSchema, Er as StreamableHTTPOptionsSchema, Es as actionMetadataFilterFieldSchema, Et as OCRStrategy, F as request_default, Fa as eModelEndpointSchema, Fi as MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, Fn as langfuseConfigSchema, Fo as FilePurpose, Fr as FileSources, Fs as filterPiiStarterPatternSchema, Ft as SafeSearchTypes, G as PrincipalType, Ga as endpointSettings, Gi as clampSettingRange, Gn as paramDefinitionSchema, Go as isActionTool, Gr as bedrockDocumentFormats, Gs as skillFilterFieldSchema, Gt as VisionModes, H as AccessRoleIds, Ha as eThinkingDisplaySchema, Hi as ComponentTypes, Hn as normalizeSearxngEngines, Ho as defaultOrderQuery, Hr as applicationMimeTypes, Hs as messageFilterFieldSchema, Ht as TTSProviders, I as getTokenHeader, Ia as eReasoningContextSchema, Ii as MAX_CHAT_PROJECT_NAME_LENGTH, In as memorySchema, Io as MessageContentTypes, Ir as checkOpenAIStorage, Is as filtersConfigSchema, It as ScraperProviders, J as accessRoleToPermBits, Ja as getGoogleThinkingBudgetMax, Ji as generateOpenAISchema, Jn as resolveEndpointType, Jo as resolveStatefulCodeEnvironment, Jr as codeInterpreterMimeTypesList, Js as userSubmittedMessageFieldPathSchema, Jt as alternateName, K as ResourceType, Ka as extendedModelEndpointSchema, Ki as generateDynamicSchema, Kn as providerEndpointMap, Ko as STATEFUL_CODE_ENVIRONMENTS, Kr as bedrockDocumentMimeTypes, Ks as toolArgumentFilterFieldSchema, Kt as agentsEndpointSchema, L as setAcceptLanguageHeader, La as eReasoningEffortSchema, Li as MAX_GRAPH_SUBAGENT_MEMBERS, Ln as messageFilterPiiSchema, Lo as RunStatus, Lr as apiBaseUrl, Ls as getPiiRegexProgramSize, Lt as SearchCategories, Ma as documentSupportedProviders, Mi as resolveModelSpecEndpoint, Mn as interfaceSchema, Mo as AnnotationTypes, Mr as AuthorizationTypeEnum, Ms as filterPiiActionSchema, Mt as SKILL_SYNC_MAX_INTERVAL_MINUTES, Na as eAnthropicEffortSchema, Ni as specsConfigSchema, Nn as isRemoteOidcUrlAllowed, No as AssistantStreamEvents, Nr as TokenExchangeMethodEnum, Ns as filterPiiCustomPatternSchema, Nt as SKILL_SYNC_MIN_INTERVAL_MINUTES, Oa as compactAssistantSchema, Oi as REFILL_INTERVAL_UNITS, On as getEndpointField, Oo as tPluginSchema, Or as hasProcessMCPServerConfig, Os as conversationStarterFilterFieldSchema, Ot as RerankerTypes, Pa as eImageDetailSchema, Pi as tModelSpecSchema, Pn as isSecureCodeEnvironmentControlURL, Po as EToolResources, Pr as FileContext, Ps as filterPiiRegexSchema, Pt as STTProviders, Q as permBitsToAccessLevel, Qa as googleGenConfigSchema, Qi as BedrockProviders, Qn as skillSyncGitHubSourceSchema, Qo as feedbackRatingSchema, Qr as defaultSTTMimeTypes, Qs as isSensitiveEnvVar, Qt as azureEndpointSchema, R as setTokenHeader, Ra as eReasoningModeSchema, Ri as MAX_SUBAGENTS, Rn as messageFilterSchema, Ro as StepStatus, Rr as buildLoginRedirectUrl, Rs as hasActiveFiltersConfig, Rt as SearchProviders, Sa as assistantSchema, Si as retrievalMimeTypesList, Sn as excludedKeys, So as tConversationTagSchema, Sr as MCP_SERVER_TITLE_PATTERN, Ss as PROMPT_FILTER_FIELDS, St as LocalStorageKeys, Ta as coerceNumber, Ti as supportsFiles, Tn as fileStrategiesSchema, To as tMessageSchema, Tr as StdioOptionsSchema, Ts as TOOL_ARGUMENT_FILTER_FIELDS, Tt as MAX_SUBAGENT_RUN_CONFIGS, U as PermissionBits, Ua as eThinkingLevelSchema, Ui as OptionTypes, Un as normalizeServerName, Uo as hostImageIdSuffix, Ur as audioMimeTypes, Us as modelParameterFilterFieldSchema, Ut as Time, V as QueryKeys, Va as eReasoningSummarySchema, Vi as setMaxSubagents, Vn as normalizeMCPToolKey, Vo as actionDomainSeparator, Vr as sharedFileDownload, Vs as memoryFilterFieldSchema, Vt as SystemCategories, W as PrincipalModel, Wa as eVerbositySchema, Wi as SettingTypes, Wn as ocrSchema, Wo as hostImageNamePrefix, Wr as bedrockDocumentExtensions, Ws as promptFilterFieldSchema, Wt as ViolationTypes, X as getResourcePermissionsResponseSchema, Xa as getSettingsKeys, Xi as AnthropicEffort, Xn as setMessageFilterRegexValidator, Xo as FEEDBACK_REASON_KEYS, Xr as convertStringsToRegex, Xs as extractEnvVariable, Xt as assistantEndpointSchema, Y as effectivePermissionsResponseSchema, Ya as getModelKey, Yi as validateSettingDefinitions, Yn as retainRecentConfigSchema, Yo as FEEDBACK_RATINGS, Yr as codeTypeMapping, Ys as envVarRegex, Yt as anthropicEndpointSchema, Z as hasPermissions, Za as googleBaseSchema, Zi as AuthType, Zn as skillSyncConfigSchema, Zo as FEEDBACK_TAGS, Zr as defaultOCRMimeTypes, Zs as extractVariableName, Zt as azureBaseSchema, _a as agentsSchema, _i as mbToBytes, _n as defaultEndpoints, _o as removeNullishValues, _r as webSearchSchema, _s as MAX_PII_PATTERN_LABEL_LENGTH, _t as FetchTokenConfig, a as data_service_exports, aa as Providers, ai as fileConfigSchema, an as bedrockModels, ao as isAssistantsEndpoint, ar as summarizationTriggerSchema, as as AGENT_INSTRUCTION_FILTER_FIELDS, at as AgentCapabilities, ba as anthropicSchema, bi as mimeTypeAliases, bn as defaultSocialLogins, bo as tBannerSchema, br as MCPServersSchema, bs as MESSAGE_FILTER_FIELDS, bt as InfiniteCollections, ca as ReasoningMode, ci as getEndpointFileConfig, cn as checkpointerTypeSchema, co as isMythosClassModel, cr as toolApprovalModeSchema, cs as FEEDBACK_FILTER_FIELDS, ct as BASE_PRINCIPAL_CONFIG_SECTIONS, da as ReasoningSummary, di as imageTypeMapping, dn as codeEnvironmentUserConfigSchema, do as isUUID, dr as turnstileOptionsSchema, ds as HITL_MESSAGE_FILTER_FIELDS, dt as CohereConstants, ea as EModelEndpoint, ei as documentParserMimeTypes, en as azureGroupSchema, eo as googleSettings, er as splitMCPToolKey, es as feedbackTagKeySchema, et as principalSchema, fa as SkillsScope, fi as inferMimeType, fn as codeEnvironmentUserSettingsSchema, fo as openAIBaseSchema, fr as turnstileSchema, fs as MAX_PII_CUSTOM_PATTERNS_TOTAL, ft as Constants, ga as agentsBaseSchema, gi as isPermissiveMimeConfig, gn as defaultAssistantsVersion, go as paramEndpoints, gr as visionModels, gs as MAX_PII_PATTERN_ID_LENGTH, gt as ErrorTypes, ha as Verbosity, hi as isBedrockDocumentType, hn as defaultAgentCapabilities, ho as openRouterSchema, hr as vertexModelConfigSchema, hs as MAX_PII_PATTERNS_PER_SOURCE, ht as EndpointURLs, ia as MemoryScope, ii as fileConfig, in as bedrockGuardrailConfigSchema, io as isAgentsEndpoint, ir as summarizationConfigSchema, is as ACTION_METADATA_FILTER_FIELDS, it as AUTH_USER_DOC_BY_ID_PREFIX, ja as defaultAssistantFormValues, ji as modelSpecSubagentsSchema, jn as initialModelsConfig, jo as tSharedLinkSchema, jr as AuthTypeEnum, js as fileFilterFieldSchema, jt as SKILL_SYNC_MAX_DISCOVERY_DEPTH, ka as compactGoogleSchema, ki as getRefillEligibilityDate, kn as getSchemaDefaults, ko as tPresetSchema, kr as isProcessMCPServerConfig, ks as conversationTitleFilterFieldSchema, kt as RetentionMode, la as ReasoningParameterFormat, li as imageExtRegex, ln as cloudfrontConfigSchema, lo as isOpenAILikeProvider, lr as toolApprovalPolicySchema, ls as FILE_FILTER_FIELDS, lt as CacheKeys, ma as ThinkingLevel, mi as isAnthropicTextDocumentType, mn as contextPruningSchema, mo as openAISettings, mr as vertexAISchema, ms as MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, mt as EImageOutputType, na as ImageVisionTool, ni as excelFileTypes, nn as baseEndpointSchema, no as imageDetailValue, nr as stripServerNamePrefix, ns as getTagsForRating, nt as updateResourcePermissionsRequestSchema, oa as ReasoningContext, oi as fullMimeTypesList, on as buildServerNameAliases, oo as isDocumentSupportedProvider, or as supportsBalanceCheck, os as CONVERSATION_STARTER_FILTER_FIELDS, ot as AuthKeys, pa as ThinkingDisplay, pi as isAnthropicDocumentType, pn as configSchema, po as openAISchema, pr as validateVisionModel, ps as MAX_PII_CUSTOM_REGEX_CHARACTERS, pt as DEFAULT_MEMORY_MAX_INPUT_TOKENS, q as accessRoleSchema, qa as getGoogleThinkingBudgetBounds, qi as generateGoogleSchema, qn as rateLimitSchema, qo as resolveAllowedStatefulCodeEnvironments, qr as codeInterpreterMimeTypes, qs as unattributedAssistantContentSchema, qt as allowedAddressesSchema, ra as MYTHOS_CLASS_FAMILIES, ri as excelMimeTypes, rn as bedrockEndpointSchema, ro as inputTokensIncludesCache, rr as stripServerNamePrefixes, rs as toMinimalFeedback, rt as updateResourcePermissionsResponseSchema, sa as ReasoningEffort, si as getConfiguredMimeAccept, sn as checkpointerSchema, so as isImageVisionTool, sr as toolApprovalHookConfigSchema, ss as CONVERSATION_TITLE_FILTER_FIELDS, st as BASE_ONLY_CONFIG_SECTIONS, ta as ImageDetail, ti as endpointFileConfigSchema, tn as balanceSchema, to as imageDetailNumeric, tr as splitToolCallName, ts as getTagByKey, tt as resourcePermissionsResponseSchema, ua as ReasoningResponseKey, ui as imageMimeTypes, un as codeEnvironmentPermissionDecisionSchema, uo as isParamEndpoint, ur as transactionsSchema, us as FILTER_PII_STARTER_PATTERNS, ut as Capabilities, va as agentsSettings, vi as megabyte, vn as defaultModels, vo as resolveAgentSkillsScope, vr as MCPOptionsSchema, vs as MAX_PII_PATTERN_LENGTH, vt as ForkOptions, wa as cacheSubsetProviders, wi as supportedMimeTypes, wn as fileStorageSchema, wo as tExampleSchema, wr as SSEOptionsSchema, ws as STORED_MESSAGE_FILTER_FIELDS, wt as MAX_SUBAGENT_GRAPH_NODES, xa as anthropicSettings, xi as retrievalMimeTypes, xn as endpointSchema, xo as tConversationSchema, xr as MCP_SERVER_TITLE_ERROR, xs as MODEL_PARAMETER_FILTER_FIELDS, xt as KnownEndpoints, ya as anthropicBaseSchema, yi as mergeFileConfig, yn as defaultRetrievalModels, yo as subagentThreadLineageSchema, yr as MCPServerUserInputSchema, ys as MEMORY_FILTER_FIELDS, yt as ImageDetailCost, z as DynamicQueryKeys, za as eReasoningParameterFormatSchema, zi as MAX_SUBAGENTS_CEILING, zn as modelConfigSchema, zo as Tools, zr as loginPage, zs as hasActivePiiFields, zt as SettingsTabValues } from "./data-service-CaB7saTP.mjs";
|
|
1
|
+
import { $ as permissionEntrySchema, $a as eAnthropicEffortSchema, $i as specsConfigSchema, $n as ocrSchema, $o as tQueryParamsSchema, $r as registerPage, $s as MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, $t as alternateName, Aa as ReasoningResponseKey, Ac as skillFilterFieldSchema, Ai as isAnthropicTextDocumentType, An as fileStrategiesSchema, Ao as isMythosClassModel, Ar as MAX_MCP_ICON_PATH_LENGTH, As as getTagByKey, At as MAX_SUBAGENT_RUN_CONFIGS, B as MutationKeys, Ba as anthropicSchema, Bi as resolveUseResponsesApi, Bn as isSpeechProviderConfigured, Bo as removeNullishValues, Br as WebSocketOptionsSchema, Bs as isCodeWorkspaceSelection, Bt as SafeSearchTypes, Ca as MYTHOS_CLASS_FAMILIES, Cc as hasActiveFiltersConfig, Ci as getDocumentFileExtension, Cn as defaultModels, Co as inputTokensIncludesCache, Cr as turnstileOptionsSchema, Cs as resolveCodePermissionDecision, Ct as KnownEndpoints, Da as ReasoningEffort, Dc as messageFilterFieldSchema, Di as imageTypeMapping, Dn as excludedKeys, Do as isImageVisionTool, Dr as vertexModelConfigSchema, Ds as feedbackRatingSchema, Dt as LocalStorageKeys, Ea as ReasoningContext, Ec as memoryFilterFieldSchema, Ei as imageMimeTypes, En as endpointSchema, Eo as isDocumentSupportedProvider, Er as vertexAISchema, Es as FEEDBACK_TAGS, Et as LANGFUSE_TRACE_USER_METADATA_FIELDS, F as request_default, Fa as Verbosity, Fc as extractEnvVariable, Fi as mbToBytes, Fn as imageGenTools, Fo as openAIBaseSchema, Fr as MCP_SERVER_TITLE_PATTERN, Fs as CODE_WORKSPACE_ID_PATTERN, Ft as SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, G as PrincipalType, Ga as coerceNumber, Gi as supportsFiles, Gn as memorySchema, Go as tConversationTagSchema, Gr as AuthorizationTypeEnum, Gs as CONVERSATION_STARTER_FILTER_FIELDS, Gt as SettingsViews, H as AccessRoleIds, Ha as assistantSchema, Hi as retrievalMimeTypesList, Hn as langfuseTraceConfigSchema, Ho as subagentThreadLineageSchema, Hr as isProcessMCPServerConfig, Hs as isCodeWorkspaceSelections, Ht as SearchCategories, I as getTokenHeader, Ia as agentsBaseSchema, Ic as extractVariableName, Ii as megabyte, In as initialModelsConfig, Io as openAISchema, Ir as MCP_USER_INPUT_FIELDS, Is as CODE_WORKSPACE_MAX_COUNT, It as SKILL_SYNC_MAX_DISCOVERY_DEPTH, J as accessRoleToPermBits, Ja as compactAssistantSchema, Ji as REFILL_INTERVAL_UNITS, Jn as modelConfigSchema, Jo as tMessageSchema, Jr as FileSources, Js as FILE_FILTER_FIELDS, Jt as Time, K as ResourceType, Ka as compactAgentsBaseSchema, Ki as textMimeTypes, Kn as messageFilterPiiSchema, Ko as tConvoUpdateSchema, Kr as TokenExchangeMethodEnum, Ks as CONVERSATION_TITLE_FILTER_FIELDS, Kt as SystemCategories, L as setAcceptLanguageHeader, La as agentsSchema, Lc as isSensitiveEnvVar, Li as mergeFileConfig, Ln as interfaceSchema, Lo as openAISettings, Lr as SSEOptionsSchema, Ls as CODE_WORKSPACE_OPERATIONS, Lt as SKILL_SYNC_MAX_INTERVAL_MINUTES, Ma as SkillsScope, Mc as unattributedAssistantContentSchema, Mi as isMessageFileUpload, Mn as getDefaultParamsEndpoint, Mo as isParamEndpoint, Mr as MCPServerUserInputSchema, Ms as toMinimalFeedback, Mt as RateLimitPrefix, Na as ThinkingDisplay, Nc as userSubmittedMessageFieldPathSchema, Ni as isPermissiveMimeConfig, Nn as getEndpointField, No as isUUID, Nr as MCPServersSchema, Ns as CODE_ENVIRONMENT_DECISION_VERSION, Nt as RerankerTypes, Oa as ReasoningMode, Oc as modelParameterFilterFieldSchema, Oi as inferMimeType, On as fileSourceSchema, Oo as isKnownProviderIdentifier, Or as visionModels, Os as feedbackSchema, Ot as MAX_SUBAGENT_DEPTH, Pa as ThinkingLevel, Pc as envVarRegex, Pi as isResponsesApiUpload, Pn as getSchemaDefaults, Po as mediaSupportedProviders, Pr as MCP_SERVER_TITLE_ERROR, Ps as CODE_ENVIRONMENT_MODES, Pt as RetentionMode, Q as permBitsToAccessLevel, Qa as documentSupportedProviders, Qi as resolveModelSpecEndpoint, Qn as normalizeServerName, Qo as tPresetSchema, Qr as loginPage, Qs as MAX_PII_CUSTOM_REGEX_CHARACTERS, Qt as allowedAddressesSchema, R as setTokenHeader, Ra as agentsSettings, Rc as normalizeEndpointName, Ri as mimeTypeAliases, Rn as isRemoteOidcUrlAllowed, Ro as openRouterSchema, Rr as StdioOptionsSchema, Rs as CODE_WORKSPACE_SELECTION_ERROR_REASONS, Rt as SKILL_SYNC_MIN_INTERVAL_MINUTES, Sa as ImageVisionTool, Sc as getPiiRegexProgramSize, Si as getConfiguredMimeAccept, Sn as defaultEndpoints, So as imageDetailValue, Sr as transactionsSchema, Ss as resolveCodeApprovalMode, St as InfiniteCollections, Ta as Providers, Tc as hasActivePiiPatterns, Ti as imageExtRegex, Tn as defaultSocialLogins, To as isAssistantsEndpoint, Tr as validateVisionModel, Ts as FEEDBACK_REASON_KEYS, Tt as LANGFUSE_TRACE_USER_ID_FIELDS, U as PermissionBits, Ua as authTypeSchema, Ui as setFileConfigRegexCompiler, Un as listConfiguredSpeechProviders, Uo as tBannerSchema, Ur as isProcessMCPServerField, Us as ACTION_METADATA_FILTER_FIELDS, Ut as SearchProviders, V as QueryKeys, Va as anthropicSettings, Vi as retrievalMimeTypes, Vn as langfuseConfigSchema, Vo as resolveAgentSkillsScope, Vr as hasProcessMCPServerConfig, Vs as isCodeWorkspaceSelectionErrorReason, Vt as ScraperProviders, W as PrincipalModel, Wa as cacheSubsetProviders, Wi as supportedMimeTypes, Wn as mcpRefreshDefaults, Wo as tConversationSchema, Wr as AuthTypeEnum, Ws as AGENT_INSTRUCTION_FILTER_FIELDS, Wt as SettingsTabValues, X as getResourcePermissionsResponseSchema, Xa as defaultAgentFormValues, Xi as materializeModelSpecEndpoints, Xn as normalizeMCPToolKey, Xo as tPluginAuthConfigSchema, Xr as apiBaseUrl, Xs as HITL_MESSAGE_FILTER_FIELDS, Xt as VisionModes, Y as effectivePermissionsResponseSchema, Ya as compactGoogleSchema, Yi as getRefillEligibilityDate, Yn as modularEndpoints, Yo as tModelSpecPresetSchema, Yr as checkOpenAIStorage, Ys as FILTER_PII_STARTER_PATTERNS, Yt as ViolationTypes, Z as hasPermissions, Za as defaultAssistantFormValues, Zi as modelSpecSubagentsSchema, Zn as normalizeSearxngEngines, Zo as tPluginSchema, Zr as buildLoginRedirectUrl, Zs as MAX_PII_CUSTOM_PATTERNS_TOTAL, Zt as agentsEndpointSchema, _a as AuthType, _c as filterPiiActionSchema, _i as excelFileTypes, _n as codeEnvironmentUserSettingsSchema, _o as googleBaseSchema, _r as toolApprovalHookConfigSchema, _s as resolveAllowedStatefulCodeEnvironments, _t as EndpointURLs, a as data_service_exports, aa as MAX_SUBAGENTS_CEILING, ac as MESSAGE_FILTER_FIELDS, ai as bedrockDocumentFormats, an as azureGroupSchema, ao as eReasoningParameterFormatSchema, ar as retainRecentConfigSchema, as as MessageContentTypes, at as AgentCapabilities, ba as EModelEndpoint, bc as filterPiiStarterPatternSchema, bi as fileConfigSchema, bn as defaultAgentCapabilities, bo as googleSettings, br as traceViewerDefaults, bs as CodeApprovalModeError, bt as ForkOptions, ca as ComponentTypes, cc as SKILL_FILTER_FIELDS, ci as codeInterpreterMimeTypesList, cn as bedrockEndpointSchema, co as eThinkingDisplaySchema, cr as skillSyncGitHubSourceSchema, cs as Tools, ct as BASE_PRINCIPAL_CONFIG_SECTIONS, da as clampSettingRange, dc as actionMetadataFilterFieldSchema, di as defaultLLMDeliveryPathSchema, dn as buildServerNameAliases, do as endpointSettings, dr as splitToolCallName, ds as agentGitIdentitySchema, dt as CacheKeys, ea as tModelSpecSchema, ec as MAX_PII_PATTERNS_PER_SOURCE, ei as sharedFileDownload, en as anthropicEndpointSchema, eo as eImageDetailSchema, er as paramDefinitionSchema, es as tSharedLinkSchema, et as principalSchema, fa as generateDynamicSchema, fc as agentInstructionFilterFieldSchema, fi as defaultOCRMimeTypes, fn as checkpointerSchema, fo as extendedModelEndpointSchema, fr as stripServerNamePrefix, fs as defaultOrderQuery, ft as Capabilities, ga as AnthropicEffort, gc as fileFilterFieldSchema, gi as endpointFileConfigSchema, gn as codeEnvironmentUserConfigSchema, go as getSettingsKeys, gr as supportsBalanceCheck, gs as STATEFUL_CODE_ENVIRONMENTS, gt as EImageOutputType, ha as validateSettingDefinitions, hc as feedbackFilterFieldSchema, hi as documentParserMimeTypes, hn as codeEnvironmentPermissionDecisionSchema, ho as getModelKey, hr as summarizationTriggerSchema, hs as isActionTool, ht as DEFAULT_MEMORY_MAX_INPUT_TOKENS, ia as MAX_SUBAGENTS, ic as MEMORY_FILTER_FIELDS, ii as bedrockDocumentExtensions, in as azureGroupConfigsSchema, io as eReasoningModeSchema, ir as resolveTraceViewerConfig, is as FilePurpose, it as AUTH_USER_DOC_BY_ID_PREFIX, ja as ReasoningSummary, jc as toolArgumentFilterFieldSchema, ji as isBedrockDocumentType, jn as getConfigDefaults, jo as isOpenAILikeProvider, jr as MCPOptionsSchema, js as getTagsForRating, jt as OCRStrategy, ka as ReasoningParameterFormat, kc as promptFilterFieldSchema, ki as isAnthropicDocumentType, kn as fileStorageSchema, ko as isMediaSupportedProvider, kr as webSearchSchema, ks as feedbackTagKeySchema, kt as MAX_SUBAGENT_GRAPH_NODES, la as OptionTypes, lc as STORED_MESSAGE_FILTER_FIELDS, li as codeTypeMapping, ln as bedrockGuardrailConfigSchema, lo as eThinkingLevelSchema, lr as specialVariables, ls as actionDelimiter, lt as CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, ma as generateOpenAISchema, mc as conversationTitleFilterFieldSchema, mi as defaultTextMimeTypes, mn as cloudfrontConfigSchema, mo as getGoogleThinkingBudgetMax, mr as summarizationConfigSchema, ms as hostImageNamePrefix, mt as Constants, na as MAX_CHAT_PROJECT_NAME_LENGTH, nc as MAX_PII_PATTERN_LABEL_LENGTH, ni as applicationMimeTypes, nn as azureBaseSchema, no as eReasoningContextSchema, nr as rateLimitSchema, ns as AssistantStreamEvents, nt as updateResourcePermissionsRequestSchema, oa as getMaxSubagents, oc as MODEL_PARAMETER_FILTER_FIELDS, oi as bedrockDocumentMimeTypes, on as balanceSchema, oo as eReasoningResponseKeySchema, or as setMessageFilterRegexValidator, os as RunStatus, ot as AuthKeys, pa as generateGoogleSchema, pc as conversationStarterFilterFieldSchema, pi as defaultSTTMimeTypes, pn as checkpointerTypeSchema, po as getGoogleThinkingBudgetBounds, pr as stripServerNamePrefixes, ps as hostImageIdSuffix, pt as CohereConstants, q as accessRoleSchema, qa as compactAgentsSchema, qi as videoMimeTypes, qn as messageFilterSchema, qo as tExampleSchema, qr as FileContext, qs as FEEDBACK_FILTER_FIELDS, qt as TTSProviders, ra as MAX_GRAPH_SUBAGENT_MEMBERS, rc as MAX_PII_PATTERN_LENGTH, ri as audioMimeTypes, rn as azureEndpointSchema, ro as eReasoningEffortSchema, rr as resolveEndpointType, rs as EToolResources, rt as updateResourcePermissionsResponseSchema, sa as setMaxSubagents, sc as PROMPT_FILTER_FIELDS, si as codeInterpreterMimeTypes, sn as baseEndpointSchema, so as eReasoningSummarySchema, sr as skillSyncConfigSchema, ss as StepStatus, st as BASE_ONLY_CONFIG_SECTIONS, ta as MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, tc as MAX_PII_PATTERN_ID_LENGTH, ti as DefaultLLMDeliveryPath, tn as assistantEndpointSchema, to as eModelEndpointSchema, tr as providerEndpointMap, ts as AnnotationTypes, tt as resourcePermissionsResponseSchema, ua as SettingTypes, uc as TOOL_ARGUMENT_FILTER_FIELDS, ui as convertStringsToRegex, un as bedrockModels, uo as eVerbositySchema, ur as splitMCPToolKey, us as actionDomainSeparator, ut as CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, va as BedrockProviders, vc as filterPiiCustomPatternSchema, vi as excelMimeTypes, vn as configSchema, vo as googleGenConfigSchema, vr as toolApprovalModeSchema, vs as resolveStatefulCodeEnvironment, vt as ErrorTypes, wa as MemoryScope, wc as hasActivePiiFields, wi as getEndpointFileConfig, wn as defaultRetrievalModels, wo as isAgentsEndpoint, wr as turnstileSchema, ws as FEEDBACK_RATINGS, wt as LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, xa as ImageDetail, xc as filtersConfigSchema, xi as fullMimeTypesList, xn as defaultAssistantsVersion, xo as imageDetailNumeric, xr as traceViewerLimits, xs as getAllowedCodeApprovalModes, xt as ImageDetailCost, ya as BedrockReasoningConfig, yc as filterPiiRegexSchema, yi as fileConfig, yn as contextPruningSchema, yo as googleSchema, yr as toolApprovalPolicySchema, ys as CODE_APPROVAL_MODES, yt as FetchTokenConfig, z as DynamicQueryKeys, za as anthropicBaseSchema, zi as resolveSandboxFilename, zn as isSecureCodeEnvironmentControlURL, zo as paramEndpoints, zr as StreamableHTTPOptionsSchema, zs as isCodeEnvironmentMode, zt as STTProviders } from "./data-service-Bx6IFaSa.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import dayjs from "dayjs";
|
|
4
4
|
import utc from "dayjs/plugin/utc.js";
|
|
@@ -705,6 +705,10 @@ let ReasoningLabelEvents = /* @__PURE__ */ function(ReasoningLabelEvents) {
|
|
|
705
705
|
ReasoningLabelEvents["ON_REASONING_LABEL_ATTEMPT"] = "on_reasoning_label_attempt";
|
|
706
706
|
return ReasoningLabelEvents;
|
|
707
707
|
}({});
|
|
708
|
+
const finiteNonNegativeInteger = (value) => {
|
|
709
|
+
if (typeof value !== "number" || !Number.isFinite(value)) return;
|
|
710
|
+
return Math.min(Number.MAX_SAFE_INTEGER, Math.max(0, Math.floor(value)));
|
|
711
|
+
};
|
|
708
712
|
/**
|
|
709
713
|
* Full prompt token count for one completed model call — the EXACT context the
|
|
710
714
|
* model saw, provider-aware: additive providers (Bedrock) report `input_tokens`
|
|
@@ -716,37 +720,114 @@ let ReasoningLabelEvents = /* @__PURE__ */ function(ReasoningLabelEvents) {
|
|
|
716
720
|
* gauge reconciles its calibrated estimate to.
|
|
717
721
|
*/
|
|
718
722
|
const promptTokensFromUsage = (event) => {
|
|
719
|
-
const input = event.input_tokens ?? 0;
|
|
723
|
+
const input = finiteNonNegativeInteger(event.input_tokens) ?? 0;
|
|
720
724
|
const details = event.input_token_details ?? {};
|
|
721
|
-
const cacheRead = details.cache_read ?? 0;
|
|
722
|
-
const cacheCreation = details.cache_creation ?? 0;
|
|
723
|
-
return (event.provider != null ? inputTokensIncludesCache(event.provider) : cacheRead + cacheCreation <= input) ? input : input + cacheRead + cacheCreation;
|
|
725
|
+
const cacheRead = finiteNonNegativeInteger(details.cache_read) ?? 0;
|
|
726
|
+
const cacheCreation = finiteNonNegativeInteger(details.cache_creation) ?? 0;
|
|
727
|
+
return (event.provider != null ? inputTokensIncludesCache(event.provider) : cacheRead + cacheCreation <= input) ? input : Math.min(Number.MAX_SAFE_INTEGER, input + cacheRead + cacheCreation);
|
|
728
|
+
};
|
|
729
|
+
/**
|
|
730
|
+
* Scales per-tool result-message counts while bounding both malformed input and
|
|
731
|
+
* rounding error. Null-prototype records keep tool names as ordinary data keys;
|
|
732
|
+
* cumulative apportionment preserves the scaled sum in one linear pass.
|
|
733
|
+
*/
|
|
734
|
+
const scaleToolMessageTokenCounts = (value, oldTotal, newTotal) => {
|
|
735
|
+
if (value == null || typeof value !== "object" || Array.isArray(value)) return;
|
|
736
|
+
const scaled = Object.create(null);
|
|
737
|
+
let remaining = oldTotal;
|
|
738
|
+
let cumulative = 0;
|
|
739
|
+
let allocated = 0;
|
|
740
|
+
let found = false;
|
|
741
|
+
for (const [name, rawCount] of Object.entries(value)) {
|
|
742
|
+
const count = finiteNonNegativeInteger(rawCount);
|
|
743
|
+
if (count == null || count === 0) continue;
|
|
744
|
+
const bounded = Math.min(count, remaining);
|
|
745
|
+
remaining -= bounded;
|
|
746
|
+
cumulative += bounded;
|
|
747
|
+
const target = oldTotal > 0 ? Math.round(cumulative / oldTotal * newTotal) : 0;
|
|
748
|
+
const apportioned = target - allocated;
|
|
749
|
+
allocated = target;
|
|
750
|
+
if (apportioned > 0) {
|
|
751
|
+
scaled[name] = apportioned;
|
|
752
|
+
found = true;
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
return found ? scaled : void 0;
|
|
724
756
|
};
|
|
725
757
|
/**
|
|
726
758
|
* Reconciles a pre-invoke context snapshot's CALIBRATED estimate to a call's
|
|
727
759
|
* ACTUAL prompt tokens. The SDK's calibration multiplier scales only
|
|
728
|
-
* `messageTokens` (instructions/summary are raw tiktoken counts)
|
|
760
|
+
* `messageTokens` (instructions/summary are raw tiktoken counts) and can
|
|
729
761
|
* over-shoot badly when a provider injects server-side content the SDK never
|
|
730
762
|
* counted (e.g. Anthropic web search) — pinning the gauge several× too high and
|
|
731
763
|
* persisting it. Trust the provider's own prompt count: keep the raw
|
|
732
|
-
* instruction/summary rows, set `messageTokens` to the remainder,
|
|
733
|
-
*
|
|
764
|
+
* instruction/summary rows, set `messageTokens` to the remainder, recompute the
|
|
765
|
+
* free space, and rescale the `toolMessageTokens` share to the new message
|
|
766
|
+
* total. No-op when `promptTokens` is unusable.
|
|
734
767
|
*/
|
|
735
768
|
const reconcileContextUsage = (snapshot, promptTokens) => {
|
|
736
769
|
if (!Number.isFinite(promptTokens) || promptTokens <= 0) return snapshot;
|
|
770
|
+
const normalizedPromptTokens = Math.min(Number.MAX_SAFE_INTEGER, Math.floor(promptTokens));
|
|
771
|
+
if (normalizedPromptTokens <= 0) return snapshot;
|
|
737
772
|
const { breakdown } = snapshot;
|
|
738
|
-
const
|
|
739
|
-
const
|
|
740
|
-
const
|
|
741
|
-
|
|
773
|
+
const instructionTokens = finiteNonNegativeInteger(breakdown.instructionTokens) ?? 0;
|
|
774
|
+
const summaryTokens = finiteNonNegativeInteger(breakdown.summaryTokens) ?? 0;
|
|
775
|
+
const budget = finiteNonNegativeInteger(snapshot.contextBudget) ?? finiteNonNegativeInteger(breakdown.maxContextTokens);
|
|
776
|
+
const nonMessageTokens = instructionTokens + summaryTokens;
|
|
777
|
+
const messageTokens = Math.max(0, normalizedPromptTokens - nonMessageTokens);
|
|
778
|
+
/** `toolMessageTokens` is a subset of the OLD (calibrated) `messageTokens`;
|
|
779
|
+
* rescale it by the same proportion so the split tracks the provider's real
|
|
780
|
+
* total. A supplied zero remains a known-zero split; absent fields stay absent
|
|
781
|
+
* for older snapshots. */
|
|
782
|
+
const priorMessageTokens = finiteNonNegativeInteger(breakdown.messageTokens) ?? 0;
|
|
783
|
+
const priorToolMessageTokens = finiteNonNegativeInteger(breakdown.toolMessageTokens);
|
|
784
|
+
let toolMessageTokens;
|
|
785
|
+
if (priorToolMessageTokens != null) {
|
|
786
|
+
toolMessageTokens = 0;
|
|
787
|
+
if (priorMessageTokens > 0 && priorToolMessageTokens > 0) toolMessageTokens = Math.min(messageTokens, Math.round(Math.min(priorToolMessageTokens, priorMessageTokens) / priorMessageTokens * messageTokens));
|
|
788
|
+
}
|
|
789
|
+
const toolMessageTokenCounts = toolMessageTokens != null ? scaleToolMessageTokenCounts(breakdown.toolMessageTokenCounts, Math.min(priorToolMessageTokens ?? 0, priorMessageTokens), toolMessageTokens) : void 0;
|
|
790
|
+
const nextBreakdown = {
|
|
791
|
+
...breakdown,
|
|
792
|
+
instructionTokens,
|
|
793
|
+
summaryTokens,
|
|
794
|
+
messageTokens
|
|
795
|
+
};
|
|
796
|
+
if (toolMessageTokens == null) {
|
|
797
|
+
delete nextBreakdown.toolMessageTokens;
|
|
798
|
+
delete nextBreakdown.toolMessageTokenCounts;
|
|
799
|
+
} else {
|
|
800
|
+
nextBreakdown.toolMessageTokens = toolMessageTokens;
|
|
801
|
+
if (toolMessageTokenCounts == null) delete nextBreakdown.toolMessageTokenCounts;
|
|
802
|
+
else nextBreakdown.toolMessageTokenCounts = toolMessageTokenCounts;
|
|
803
|
+
}
|
|
804
|
+
const result = {
|
|
742
805
|
...snapshot,
|
|
743
|
-
breakdown:
|
|
744
|
-
...breakdown,
|
|
745
|
-
messageTokens
|
|
746
|
-
},
|
|
747
|
-
remainingContextTokens: budget != null ? Math.max(0, budget - promptTokens) : snapshot.remainingContextTokens
|
|
806
|
+
breakdown: nextBreakdown
|
|
748
807
|
};
|
|
808
|
+
if (budget != null) result.remainingContextTokens = Math.max(0, budget - normalizedPromptTokens);
|
|
809
|
+
else {
|
|
810
|
+
const remaining = finiteNonNegativeInteger(snapshot.remainingContextTokens);
|
|
811
|
+
if (remaining == null) delete result.remainingContextTokens;
|
|
812
|
+
else result.remainingContextTokens = remaining;
|
|
813
|
+
}
|
|
814
|
+
return result;
|
|
815
|
+
};
|
|
816
|
+
/** Provider output, including reasoning omitted from an under-reported output count. */
|
|
817
|
+
const outputTokensFromUsage = (event) => {
|
|
818
|
+
const output = finiteNonNegativeInteger(event.output_tokens) ?? 0;
|
|
819
|
+
const total = finiteNonNegativeInteger(event.total_tokens) ?? 0;
|
|
820
|
+
return Math.max(output, total - promptTokensFromUsage(event));
|
|
749
821
|
};
|
|
822
|
+
/** Reconcile and retain the primary call details on live, saved, and resumable snapshots. */
|
|
823
|
+
const reconcileContextUsageFromEvent = (snapshot, event) => ({
|
|
824
|
+
...reconcileContextUsage(snapshot, promptTokensFromUsage(event)),
|
|
825
|
+
model: event.model,
|
|
826
|
+
provider: event.provider,
|
|
827
|
+
completedOutputTokens: outputTokensFromUsage(event),
|
|
828
|
+
cacheRead: finiteNonNegativeInteger(event.input_token_details?.cache_read) ?? 0,
|
|
829
|
+
cacheWrite: finiteNonNegativeInteger(event.input_token_details?.cache_creation) ?? 0
|
|
830
|
+
});
|
|
750
831
|
//#endregion
|
|
751
832
|
//#region src/parsers.ts
|
|
752
833
|
dayjs.extend(utc);
|
|
@@ -1369,6 +1450,166 @@ function parseLangChainErrorCode(message) {
|
|
|
1369
1450
|
}
|
|
1370
1451
|
}
|
|
1371
1452
|
//#endregion
|
|
1453
|
+
//#region src/resolve-llm-delivery-path.ts
|
|
1454
|
+
/** Audio and video reach the model only through the media encoders, which support a
|
|
1455
|
+
* narrower provider set than documents. Images use the broadly supported vision
|
|
1456
|
+
* path and are never gated here. */
|
|
1457
|
+
const isProviderCapable = (mimeType, endpoint, useResponsesApi) => {
|
|
1458
|
+
if (mimeType.startsWith("audio/") || mimeType.startsWith("video/")) return isMediaSupportedProvider(endpoint);
|
|
1459
|
+
if (mimeType === "application/pdf") return useResponsesApi === true || isDocumentSupportedProvider(endpoint);
|
|
1460
|
+
return true;
|
|
1461
|
+
};
|
|
1462
|
+
const SYSTEM_LLM_DELIVERY_DEFAULTS = {
|
|
1463
|
+
fallback: "text",
|
|
1464
|
+
overrides: {
|
|
1465
|
+
"image/*": "provider",
|
|
1466
|
+
"video/*": "provider",
|
|
1467
|
+
"audio/*": "provider",
|
|
1468
|
+
"application/pdf": "provider"
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
/**
|
|
1472
|
+
* Types some step in the upload pipeline can turn into text: natively readable text,
|
|
1473
|
+
* documents a parser or OCR handles, images through OCR, and audio through transcription.
|
|
1474
|
+
*
|
|
1475
|
+
* Everything absent from this list, notably archives, tarballs, columnar data files and
|
|
1476
|
+
* video, has no such step, and the default text matcher accepts any well-formed type, so
|
|
1477
|
+
* routing them to text ends in their bytes being decoded as UTF-8.
|
|
1478
|
+
*/
|
|
1479
|
+
const TEXT_RECOVERABLE_MIME_TYPES = [
|
|
1480
|
+
/^text\//,
|
|
1481
|
+
/^image\//,
|
|
1482
|
+
/^audio\//,
|
|
1483
|
+
/^application\/(json|javascript|xml|sql|yaml|x-yaml|csv|typescript|x-sh|vnd\.coffeescript)$/,
|
|
1484
|
+
/^application\/pdf$/,
|
|
1485
|
+
/^application\/vnd\.openxmlformats-officedocument\.(wordprocessingml\.document|spreadsheetml\.sheet)$/,
|
|
1486
|
+
/^application\/vnd\.oasis\.opendocument\.(text|spreadsheet)$/,
|
|
1487
|
+
/^application\/(vnd\.ms-excel|x-msexcel|msexcel|x-ms-excel|x-excel|x-dos_ms_excel|xls|x-xls)$/,
|
|
1488
|
+
/^message\/rfc822$/
|
|
1489
|
+
];
|
|
1490
|
+
/**
|
|
1491
|
+
* Types whose bytes are text already, so reading them directly is meaningful. Everything
|
|
1492
|
+
* else needs a real extractor: decoding it as UTF-8 produces mojibake rather than content.
|
|
1493
|
+
*/
|
|
1494
|
+
/** Application types whose payload is text. Mirrors the set the content-protection code
|
|
1495
|
+
* treats as textual, plus the source and data formats this pipeline also accepts. */
|
|
1496
|
+
const TEXTUAL_APPLICATION_MIME_TYPES = new Set([
|
|
1497
|
+
"application/json",
|
|
1498
|
+
"application/javascript",
|
|
1499
|
+
"application/sql",
|
|
1500
|
+
"application/xml",
|
|
1501
|
+
"application/x-yaml",
|
|
1502
|
+
"application/yaml",
|
|
1503
|
+
"application/csv",
|
|
1504
|
+
"application/typescript",
|
|
1505
|
+
"application/x-sh",
|
|
1506
|
+
"application/vnd.coffeescript"
|
|
1507
|
+
]);
|
|
1508
|
+
function isNativelyReadableText(mimeType) {
|
|
1509
|
+
const normalized = mimeType.split(";", 1)[0].trim().toLowerCase();
|
|
1510
|
+
return normalized.startsWith("text/") || TEXTUAL_APPLICATION_MIME_TYPES.has(normalized) || normalized === "message/rfc822";
|
|
1511
|
+
}
|
|
1512
|
+
function hasTextExtractionPath(mimeType) {
|
|
1513
|
+
return TEXT_RECOVERABLE_MIME_TYPES.some((pattern) => pattern.test(mimeType));
|
|
1514
|
+
}
|
|
1515
|
+
/**
|
|
1516
|
+
* Resolves the default file path destination for a given mime type.
|
|
1517
|
+
* Resolution chain: endpoint overrides -> endpoint fallback -> global overrides -> global fallback -> system defaults.
|
|
1518
|
+
*/
|
|
1519
|
+
function resolveDefaultLLMDeliveryPath(mimeType, endpointConfig, globalConfig, endpoint, useResponsesApi, sttConfigured) {
|
|
1520
|
+
const wildcard = mimeType.split("/")[0] + "/*";
|
|
1521
|
+
if (endpointConfig?.overrides) {
|
|
1522
|
+
if (endpointConfig.overrides[mimeType]) return endpointConfig.overrides[mimeType];
|
|
1523
|
+
if (endpointConfig.overrides[wildcard]) return endpointConfig.overrides[wildcard];
|
|
1524
|
+
}
|
|
1525
|
+
if (endpointConfig?.fallback) return endpointConfig.fallback;
|
|
1526
|
+
if (globalConfig?.overrides) {
|
|
1527
|
+
if (globalConfig.overrides[mimeType]) return globalConfig.overrides[mimeType];
|
|
1528
|
+
if (globalConfig.overrides[wildcard]) return globalConfig.overrides[wildcard];
|
|
1529
|
+
}
|
|
1530
|
+
if (globalConfig?.fallback) return globalConfig.fallback;
|
|
1531
|
+
const systemDefault = SYSTEM_LLM_DELIVERY_DEFAULTS.overrides[mimeType] ?? SYSTEM_LLM_DELIVERY_DEFAULTS.overrides[wildcard] ?? SYSTEM_LLM_DELIVERY_DEFAULTS.fallback;
|
|
1532
|
+
/** Only the system default is capability-gated: an explicit config above is the
|
|
1533
|
+
* admin's decision. A known endpoint that cannot encode documents or media would
|
|
1534
|
+
* otherwise accept the upload and hand the model nothing at all. */
|
|
1535
|
+
/** `agents` is a container, not a provider: it is what an upload reports when the
|
|
1536
|
+
* agent's real provider could not be resolved, as for ephemeral agents. A custom
|
|
1537
|
+
* endpoint name is likewise unresolvable here, since its real provider is chosen
|
|
1538
|
+
* at request time and is usually OpenAI- or Anthropic-compatible. Judging
|
|
1539
|
+
* capability from either would downgrade media the actual provider can deliver,
|
|
1540
|
+
* so an unresolved provider keeps the system default. */
|
|
1541
|
+
const namedEndpoint = endpoint != null && endpoint !== "agents";
|
|
1542
|
+
const providerKnown = namedEndpoint && isKnownProviderIdentifier(endpoint);
|
|
1543
|
+
const isMedia = mimeType.startsWith("audio/") || mimeType.startsWith("video/");
|
|
1544
|
+
const canRecoverText = (type) => type.startsWith("audio/") && sttConfigured === false ? false : hasTextExtractionPath(type);
|
|
1545
|
+
if (systemDefault === "provider" && (isMedia ? namedEndpoint : providerKnown) && !isProviderCapable(mimeType, endpoint, useResponsesApi)) return canRecoverText(mimeType) ? "text" : "none";
|
|
1546
|
+
/** Bedrock's Converse document path natively accepts more than PDF, so on that
|
|
1547
|
+
* endpoint its document types belong on the provider path rather than being
|
|
1548
|
+
* extracted, which would drop non-text content and layout. */
|
|
1549
|
+
if (systemDefault !== "provider" && endpoint === "bedrock" && isBedrockDocumentType(mimeType)) return "provider";
|
|
1550
|
+
if (systemDefault === "text" && !canRecoverText(mimeType)) return "none";
|
|
1551
|
+
return systemDefault;
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* Delivery path for an upload that named no tool resource. The legacy chooser makes the
|
|
1555
|
+
* destination explicit, so nothing is inferred there.
|
|
1556
|
+
*/
|
|
1557
|
+
function resolveDefaultUploadLLMDeliveryPath({ mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
|
|
1558
|
+
if (endpointConfig?.legacyFileUploadUX === true) return "provider";
|
|
1559
|
+
return resolveDefaultLLMDeliveryPath(mimeType, endpointConfig?.defaultLLMDeliveryPath, fileConfig?.defaultLLMDeliveryPath, endpoint, useResponsesApi, sttConfigured);
|
|
1560
|
+
}
|
|
1561
|
+
/** Delivery path for an upload, honoring an explicitly chosen tool resource. */
|
|
1562
|
+
function resolveUploadLLMDeliveryPath({ toolResource, mimeType, endpointConfig, fileConfig, endpoint, useResponsesApi, sttConfigured }) {
|
|
1563
|
+
if (toolResource === "context" || toolResource === "ocr") return "text";
|
|
1564
|
+
if (toolResource === "file_search" || toolResource === "execute_code") return "none";
|
|
1565
|
+
return resolveDefaultUploadLLMDeliveryPath({
|
|
1566
|
+
mimeType,
|
|
1567
|
+
endpointConfig,
|
|
1568
|
+
fileConfig,
|
|
1569
|
+
endpoint,
|
|
1570
|
+
useResponsesApi,
|
|
1571
|
+
sttConfigured
|
|
1572
|
+
});
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Whether a file tool can do anything with this type. `file_search` indexes extracted
|
|
1576
|
+
* text, so it needs a type some step can turn into text and cannot use media, whose
|
|
1577
|
+
* extraction paths are OCR and speech rather than the vector store. Code execution is
|
|
1578
|
+
* judged by the list the client offers it from. Shared by upload-time selection and
|
|
1579
|
+
* deferred provisioning so the two cannot queue a file the other would refuse.
|
|
1580
|
+
*/
|
|
1581
|
+
function canToolResourceConsume(toolResource, mimeType) {
|
|
1582
|
+
if (toolResource === "file_search") return !mimeType.startsWith("image") && !mimeType.startsWith("audio") && !mimeType.startsWith("video") && (hasTextExtractionPath(mimeType) || matchesMimeList(mimeType, retrievalMimeTypes));
|
|
1583
|
+
if (toolResource === "execute_code") return matchesMimeList(mimeType, codeInterpreterMimeTypes);
|
|
1584
|
+
return true;
|
|
1585
|
+
}
|
|
1586
|
+
const matchesMimeList = (mimeType, patterns) => patterns.some((pattern) => pattern.test(mimeType));
|
|
1587
|
+
/**
|
|
1588
|
+
* Where a unified upload will end up, and whether it can be accepted at all.
|
|
1589
|
+
*
|
|
1590
|
+
* An upload has to be readable by something: the model, an extraction step, or a file
|
|
1591
|
+
* tool. A permanent one has to land on an agent resource too, or storing it succeeds
|
|
1592
|
+
* while leaving the agent no reference to it. Both outcomes are decided here rather than
|
|
1593
|
+
* discovered later, so a request that would change nothing is refused with a reason.
|
|
1594
|
+
*
|
|
1595
|
+
* `agentTools` is undefined when no agent record backs the upload, as for an ephemeral
|
|
1596
|
+
* agent that exists only for the request. An unknown tool set is not judged.
|
|
1597
|
+
*/
|
|
1598
|
+
function resolveUploadDestination(params) {
|
|
1599
|
+
const { toolResource, deliveryPath, mimeType, agentTools, hasAgent, isMessageAttachment, allowUnknownMessageConsumer = false, contextEnabled } = params;
|
|
1600
|
+
const refusesContext = (resource) => resource === "context" && hasAgent && !isMessageAttachment && contextEnabled === false;
|
|
1601
|
+
if (toolResource) {
|
|
1602
|
+
const resolved = toolResource === "ocr" ? "context" : toolResource;
|
|
1603
|
+
return refusesContext(resolved) ? { rejection: "context-disabled" } : { toolResource: resolved };
|
|
1604
|
+
}
|
|
1605
|
+
if (deliveryPath === "text") return refusesContext("context") ? { rejection: "context-disabled" } : { toolResource: "context" };
|
|
1606
|
+
const consumingTool = agentTools?.find((tool) => (tool === "execute_code" || tool === "file_search") && canToolResourceConsume(tool, mimeType));
|
|
1607
|
+
if (deliveryPath === "none" && consumingTool) return { toolResource: consumingTool };
|
|
1608
|
+
if (hasAgent && !isMessageAttachment) return { rejection: "no-agent-resource" };
|
|
1609
|
+
if (deliveryPath === "none" && (!isMessageAttachment || !allowUnknownMessageConsumer)) return { rejection: "no-consumer" };
|
|
1610
|
+
return {};
|
|
1611
|
+
}
|
|
1612
|
+
//#endregion
|
|
1372
1613
|
//#region src/messages.ts
|
|
1373
1614
|
/** A generated reasoning title describes the text as it existed at generation time.
|
|
1374
1615
|
* Any manual edit or merge into a different reasoning step invalidates the entire
|
|
@@ -1457,6 +1698,66 @@ function buildTree({ messages, fileMap }) {
|
|
|
1457
1698
|
if (!cached) treeCache.set(messages, entry);
|
|
1458
1699
|
return tree;
|
|
1459
1700
|
}
|
|
1701
|
+
/**
|
|
1702
|
+
* Memoizes a messages array's id index. Every row that needs to look another
|
|
1703
|
+
* message up (the hover controls resolving the turn a rerun would replay) would
|
|
1704
|
+
* otherwise scan the whole array, which is quadratic in the conversation. A
|
|
1705
|
+
* cache write replaces the array, so the index dies with the array it indexes
|
|
1706
|
+
* and can never answer from stale rows.
|
|
1707
|
+
*/
|
|
1708
|
+
const indexCache = /* @__PURE__ */ new WeakMap();
|
|
1709
|
+
/** The message with this id, resolved through the array's memoized index. */
|
|
1710
|
+
function findMessageById(messages, messageId) {
|
|
1711
|
+
if (messages == null || messageId == null) return;
|
|
1712
|
+
let index = indexCache.get(messages);
|
|
1713
|
+
if (index == null) {
|
|
1714
|
+
index = /* @__PURE__ */ new Map();
|
|
1715
|
+
for (const message of messages) if (message?.messageId != null && !index.has(message.messageId)) index.set(message.messageId, message);
|
|
1716
|
+
indexCache.set(messages, index);
|
|
1717
|
+
}
|
|
1718
|
+
return index.get(messageId);
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* True when a turn carries the marker the server stamps on a manual compaction:
|
|
1722
|
+
* `markCompactionSummary` sets `initiatedBy: 'user'` on the summary a Compact
|
|
1723
|
+
* action produced, and nothing else writes it, so an automatic summary detour is
|
|
1724
|
+
* not one. This is the compaction's own identity, independent of where it hangs:
|
|
1725
|
+
* Compact runs on whatever leaf the branch ends with, so its response can parent
|
|
1726
|
+
* onto a user message as easily as onto the answer it summarized. Redoing one is
|
|
1727
|
+
* the context indicator's Compact action, never a rerun of the turn behind it.
|
|
1728
|
+
*/
|
|
1729
|
+
function isUserInitiatedCompaction(message) {
|
|
1730
|
+
const content = message?.content;
|
|
1731
|
+
if (!Array.isArray(content)) return false;
|
|
1732
|
+
return content.some((part) => part?.type === "summary" && part.initiatedBy === "user");
|
|
1733
|
+
}
|
|
1734
|
+
/**
|
|
1735
|
+
* True when a message is a finished manual compaction: every content part is a
|
|
1736
|
+
* summary and at least one of them carries text. A part that is still streaming
|
|
1737
|
+
* or that failed contributes no text of its own, so an interrupted compaction
|
|
1738
|
+
* can be retried.
|
|
1739
|
+
*/
|
|
1740
|
+
function isCompactedLeaf(message) {
|
|
1741
|
+
const content = message?.content;
|
|
1742
|
+
if (!Array.isArray(content) || content.length === 0) return false;
|
|
1743
|
+
let usable = false;
|
|
1744
|
+
for (const part of content) {
|
|
1745
|
+
if (part?.type !== "summary") return false;
|
|
1746
|
+
if (part.summarizing === true || part.failed === true) continue;
|
|
1747
|
+
const hasText = (part.content ?? []).some((block) => typeof block?.text === "string" && block.text.trim().length > 0);
|
|
1748
|
+
usable = usable || hasText;
|
|
1749
|
+
}
|
|
1750
|
+
return usable;
|
|
1751
|
+
}
|
|
1752
|
+
//#endregion
|
|
1753
|
+
//#region src/errors.ts
|
|
1754
|
+
const TOOL_CALL_ERROR_PREFIX = /^Error:\s*(?:\[[^\]]*\]\s*)*tool call failed:\s*/i;
|
|
1755
|
+
function hasToolCallErrorPrefix(text) {
|
|
1756
|
+
return TOOL_CALL_ERROR_PREFIX.test(text);
|
|
1757
|
+
}
|
|
1758
|
+
function stripToolCallErrorPrefix(text) {
|
|
1759
|
+
return text.replace(TOOL_CALL_ERROR_PREFIX, "");
|
|
1760
|
+
}
|
|
1460
1761
|
//#endregion
|
|
1461
1762
|
//#region src/runSteps.ts
|
|
1462
1763
|
/**
|
|
@@ -5155,6 +5456,35 @@ const updateSchedulePayloadSchema = createSchedulePayloadSchema.omit({ clientReq
|
|
|
5155
5456
|
* server-side fresh-read fence alone cannot detect this).
|
|
5156
5457
|
*/
|
|
5157
5458
|
expectedConfigRevision: z.number().int().min(0).optional() });
|
|
5459
|
+
/** Only structured schedule preflight failures may request immediate suspension. */
|
|
5460
|
+
function getScheduleMCPDisabledReason(outcomes) {
|
|
5461
|
+
const statuses = new Set(outcomes?.map((outcome) => outcome.status));
|
|
5462
|
+
if (statuses.has("mcp_permission_denied")) return "mcp_permission_denied";
|
|
5463
|
+
if (statuses.has("mcp_configuration_missing")) return "mcp_configuration_missing";
|
|
5464
|
+
if (statuses.has("mcp_reauth_required")) return "mcp_reauth_required";
|
|
5465
|
+
}
|
|
5466
|
+
const scheduleMCPOutcomeSchema = z.object({
|
|
5467
|
+
server: z.string(),
|
|
5468
|
+
/** Agent whose selected tool requires this server. Used to open the correct
|
|
5469
|
+
* recovery chat when the requirement belongs to a handoff or subagent. */
|
|
5470
|
+
agentId: z.string().optional(),
|
|
5471
|
+
status: z.enum([
|
|
5472
|
+
"ready",
|
|
5473
|
+
"mcp_reauth_required",
|
|
5474
|
+
"mcp_configuration_missing",
|
|
5475
|
+
"mcp_permission_denied",
|
|
5476
|
+
"mcp_unavailable"
|
|
5477
|
+
])
|
|
5478
|
+
});
|
|
5479
|
+
function readScheduleMCPOutcomes(error) {
|
|
5480
|
+
if (!error || !/^mcp_(reauth_required|configuration_missing|permission_denied|unavailable): \[/.test(error)) return [];
|
|
5481
|
+
try {
|
|
5482
|
+
const result = scheduleMCPOutcomeSchema.array().safeParse(JSON.parse(error.slice(error.indexOf(": ") + 2)));
|
|
5483
|
+
return result.success ? result.data : [];
|
|
5484
|
+
} catch {
|
|
5485
|
+
return [];
|
|
5486
|
+
}
|
|
5487
|
+
}
|
|
5158
5488
|
//#endregion
|
|
5159
5489
|
//#region src/cadence.ts
|
|
5160
5490
|
/** Mirrors the server default when a weekly cadence omits `daysOfWeek`. */
|
|
@@ -5427,6 +5757,12 @@ let DATE_RANGE = /* @__PURE__ */ function(DATE_RANGE) {
|
|
|
5427
5757
|
const INSIGHTS_MAX_RANGE_DAYS = 30;
|
|
5428
5758
|
const INSIGHTS_SEARCH_MIN_LENGTH = 3;
|
|
5429
5759
|
const INSIGHTS_SEARCH_MAX_LENGTH = 200;
|
|
5760
|
+
const INSIGHTS_AGENT_ID_MAX_LENGTH = 256;
|
|
5761
|
+
//#endregion
|
|
5762
|
+
//#region src/types/traces.ts
|
|
5763
|
+
const TRACE_CURSOR_MAX_LENGTH = 4096;
|
|
5764
|
+
const TRACE_SOURCE_ID_MAX_LENGTH = 128;
|
|
5765
|
+
const TRACE_RECORD_ID_MAX_LENGTH = 256;
|
|
5430
5766
|
//#endregion
|
|
5431
5767
|
//#region src/types/queuedTurns.ts
|
|
5432
5768
|
const agentQueuedTurnStatuses = [
|
|
@@ -5513,6 +5849,7 @@ let ProviderId = /* @__PURE__ */ function(ProviderId) {
|
|
|
5513
5849
|
ProviderId["groq"] = "groq";
|
|
5514
5850
|
ProviderId["helicone"] = "helicone";
|
|
5515
5851
|
ProviderId["huggingface"] = "huggingface";
|
|
5852
|
+
ProviderId["lemonade"] = "lemonade";
|
|
5516
5853
|
ProviderId["mistral"] = "mistral";
|
|
5517
5854
|
ProviderId["mlx"] = "mlx";
|
|
5518
5855
|
ProviderId["ollama"] = "ollama";
|
|
@@ -5542,6 +5879,7 @@ const knownEndpointToProvider = {
|
|
|
5542
5879
|
["groq"]: "groq",
|
|
5543
5880
|
["helicone"]: "helicone",
|
|
5544
5881
|
["huggingface"]: "huggingface",
|
|
5882
|
+
["lemonade"]: "lemonade",
|
|
5545
5883
|
["mistral"]: "mistral",
|
|
5546
5884
|
["mlx"]: "mlx",
|
|
5547
5885
|
["ollama"]: "ollama",
|
|
@@ -5567,6 +5905,8 @@ const providerAliases = {
|
|
|
5567
5905
|
grok: "xai",
|
|
5568
5906
|
kimi: "moonshot",
|
|
5569
5907
|
moonshotai: "moonshot",
|
|
5908
|
+
amdlemonade: "lemonade",
|
|
5909
|
+
lemonadeserver: "lemonade",
|
|
5570
5910
|
mistralai: "mistral",
|
|
5571
5911
|
togetherai: "together"
|
|
5572
5912
|
};
|
|
@@ -5588,6 +5928,77 @@ function resolveModelCatalogKey(provider, catalogs) {
|
|
|
5588
5928
|
return catalogs?.[key] != null ? key : modelCatalogAliases[key] ?? key;
|
|
5589
5929
|
}
|
|
5590
5930
|
//#endregion
|
|
5931
|
+
//#region src/svg.ts
|
|
5932
|
+
/**
|
|
5933
|
+
* DOMPurify policy for user-provided SVG icons, shared by the browser uploader and
|
|
5934
|
+
* the server trust boundary so a preview and the persisted icon cannot disagree.
|
|
5935
|
+
* `use` is re-added for self-contained `<defs>` references (targets restricted by
|
|
5936
|
+
* `restrictSvgReferences`); every SMIL element is forbidden so a stored icon
|
|
5937
|
+
* cannot animate forever wherever it renders.
|
|
5938
|
+
*/
|
|
5939
|
+
const SVG_SANITIZE_CONFIG = {
|
|
5940
|
+
USE_PROFILES: {
|
|
5941
|
+
svg: true,
|
|
5942
|
+
svgFilters: true
|
|
5943
|
+
},
|
|
5944
|
+
ADD_TAGS: ["use"],
|
|
5945
|
+
ADD_ATTR: ["fr"],
|
|
5946
|
+
FORBID_TAGS: [
|
|
5947
|
+
"script",
|
|
5948
|
+
"foreignObject",
|
|
5949
|
+
"style",
|
|
5950
|
+
"a",
|
|
5951
|
+
"image",
|
|
5952
|
+
"animate",
|
|
5953
|
+
"animateColor",
|
|
5954
|
+
"animateMotion",
|
|
5955
|
+
"animateTransform",
|
|
5956
|
+
"mpath",
|
|
5957
|
+
"set"
|
|
5958
|
+
],
|
|
5959
|
+
FORBID_ATTR: ["style"]
|
|
5960
|
+
};
|
|
5961
|
+
const URL_TOKEN_PREFIX = /url\(\s*['"]?\s*/gi;
|
|
5962
|
+
/**
|
|
5963
|
+
* True when every `url()` token targets a fragment. Backslashes reject the value
|
|
5964
|
+
* outright: CSS unescapes idents before tokenizing, so `u\72l(...)` is a `url()`.
|
|
5965
|
+
*/
|
|
5966
|
+
function referencesOnlyFragments(value) {
|
|
5967
|
+
if (value.includes("\\")) return false;
|
|
5968
|
+
if (!value.toLowerCase().includes("url(")) return true;
|
|
5969
|
+
URL_TOKEN_PREFIX.lastIndex = 0;
|
|
5970
|
+
while (URL_TOKEN_PREFIX.exec(value) !== null) if (value[URL_TOKEN_PREFIX.lastIndex] !== "#") return false;
|
|
5971
|
+
return true;
|
|
5972
|
+
}
|
|
5973
|
+
/** DOMPurify hook that drops every attribute referencing outside the document. */
|
|
5974
|
+
function restrictSvgReferences(node) {
|
|
5975
|
+
const names = [];
|
|
5976
|
+
for (let i = 0; i < node.attributes.length; i += 1) names.push(node.attributes[i].name);
|
|
5977
|
+
for (const name of names) {
|
|
5978
|
+
const value = node.getAttribute(name)?.trim();
|
|
5979
|
+
if (value == null) continue;
|
|
5980
|
+
if (name === "href" || name === "xlink:href") {
|
|
5981
|
+
if (!value.startsWith("#")) node.removeAttribute(name);
|
|
5982
|
+
continue;
|
|
5983
|
+
}
|
|
5984
|
+
if (!referencesOnlyFragments(value)) node.removeAttribute(name);
|
|
5985
|
+
}
|
|
5986
|
+
}
|
|
5987
|
+
/** SVG names the HTML parser lowercases and its adjustment table does not restore. */
|
|
5988
|
+
const UNADJUSTED_SVG_TAGS = [[/(<\/?)fedropshadow\b/gi, "$1feDropShadow"]];
|
|
5989
|
+
const SVG_ROOT_TAG = /<svg(\s[^>]*)?>/i;
|
|
5990
|
+
/**
|
|
5991
|
+
* Makes HTML-mode sanitizer output valid as a standalone `image/svg+xml`
|
|
5992
|
+
* document: restores camelCase element names the HTML parser lowercased and
|
|
5993
|
+
* declares the SVG namespace on the root, without which an XML parser puts the
|
|
5994
|
+
* root in no namespace and the icon renders blank.
|
|
5995
|
+
*/
|
|
5996
|
+
function finalizeSvgMarkup(markup) {
|
|
5997
|
+
let restored = markup;
|
|
5998
|
+
for (const [pattern, canonical] of UNADJUSTED_SVG_TAGS) restored = restored.replace(pattern, canonical);
|
|
5999
|
+
return restored.replace(SVG_ROOT_TAG, (tag, attributes) => attributes != null && /\sxmlns\s*=/i.test(attributes) ? tag : `<svg xmlns="http://www.w3.org/2000/svg"${attributes ?? ""}>`);
|
|
6000
|
+
}
|
|
6001
|
+
//#endregion
|
|
5591
6002
|
//#region src/actions.ts
|
|
5592
6003
|
function sha1(input) {
|
|
5593
6004
|
return crypto.createHash("sha1").update(input).digest("hex");
|
|
@@ -6071,7 +6482,7 @@ function getUserTimezone() {
|
|
|
6071
6482
|
}
|
|
6072
6483
|
}
|
|
6073
6484
|
function createPayload(submission) {
|
|
6074
|
-
const { isEdited, addedConvo, userMessage, isContinued, isTemporary, isRegenerate, conversation, editedContent, ephemeralAgent, endpointOption, manualSkills, clientRequestId, recoverySteerId, expectedPredecessorCreatedAt } = submission;
|
|
6485
|
+
const { isEdited, addedConvo, userMessage, isContinued, isTemporary, isRegenerate, compact, conversation, editedContent, ephemeralAgent, endpointOption, manualSkills, codeApprovalMode, codeEnvironmentMode, codeWorkspaces, clientRequestId, recoverySteerId, expectedPredecessorCreatedAt } = submission;
|
|
6075
6486
|
const { conversationId } = tConvoUpdateSchema.parse(conversation);
|
|
6076
6487
|
const { endpoint: _e, endpointType } = endpointOption;
|
|
6077
6488
|
const endpoint = _e;
|
|
@@ -6085,12 +6496,18 @@ function createPayload(submission) {
|
|
|
6085
6496
|
endpoint,
|
|
6086
6497
|
addedConvo,
|
|
6087
6498
|
isTemporary,
|
|
6088
|
-
|
|
6499
|
+
/** A compaction borrows the regenerate shape client-side only: the server
|
|
6500
|
+
* must see it as a compaction, never as a regenerated user turn. */
|
|
6501
|
+
isRegenerate: compact === true ? void 0 : isRegenerate,
|
|
6502
|
+
...compact === true && { compact: true },
|
|
6089
6503
|
editedContent,
|
|
6090
6504
|
conversationId,
|
|
6091
6505
|
isContinued: !!(isEdited && isContinued),
|
|
6092
6506
|
ephemeralAgent: isAssistantsEndpoint(endpoint) ? void 0 : ephemeralAgent,
|
|
6093
6507
|
manualSkills: isAssistantsEndpoint(endpoint) ? void 0 : manualSkills,
|
|
6508
|
+
codeApprovalMode: isAssistantsEndpoint(endpoint) ? void 0 : codeApprovalMode,
|
|
6509
|
+
codeEnvironmentMode: isAssistantsEndpoint(endpoint) ? void 0 : codeEnvironmentMode,
|
|
6510
|
+
codeWorkspaces: isAssistantsEndpoint(endpoint) ? void 0 : codeWorkspaces,
|
|
6094
6511
|
timezone: getUserTimezone(),
|
|
6095
6512
|
clientRequestId,
|
|
6096
6513
|
recoverySteerId,
|
|
@@ -7273,6 +7690,38 @@ const paramSettings = {
|
|
|
7273
7690
|
[`bedrock-zai`]: bedrockZAI,
|
|
7274
7691
|
["google"]: googleConfig
|
|
7275
7692
|
};
|
|
7693
|
+
/**
|
|
7694
|
+
* Maps effective backend param names for OpenAI-compatible/Azure endpoints (as deleted from
|
|
7695
|
+
* `llmConfig` via `dropParams`, e.g. `maxTokens`) to their corresponding UI/conversation keys
|
|
7696
|
+
* (e.g. `max_tokens`). Native providers (anthropic, google, bedrock, ...) already render these
|
|
7697
|
+
* same camelCase names as their UI key (e.g. `topP`), so this alias must only be applied to
|
|
7698
|
+
* OpenAI-compatible parameter sets — see `resolveDropParamsUIKeys`.
|
|
7699
|
+
*/
|
|
7700
|
+
const dropParamsBackendToUIKey = {
|
|
7701
|
+
maxTokens: "max_tokens",
|
|
7702
|
+
topP: "top_p",
|
|
7703
|
+
frequencyPenalty: "frequency_penalty",
|
|
7704
|
+
presencePenalty: "presence_penalty"
|
|
7705
|
+
};
|
|
7706
|
+
/** Endpoint keys whose parameter settings render the OpenAI-compatible (snake_case) UI keys. */
|
|
7707
|
+
const openAILikeParamEndpointKeys = new Set([
|
|
7708
|
+
"openAI",
|
|
7709
|
+
"azureOpenAI",
|
|
7710
|
+
"custom",
|
|
7711
|
+
"openrouter"
|
|
7712
|
+
]);
|
|
7713
|
+
/**
|
|
7714
|
+
* Normalizes an admin-configured `dropParams` list into the UI/conversation keys used to hide
|
|
7715
|
+
* the matching controls in the settings panels. `endpointKey` should be the same key used to
|
|
7716
|
+
* resolve the panel's parameter settings (e.g. `overriddenEndpointKey`); the backend-name alias
|
|
7717
|
+
* is only applied for OpenAI-compatible endpoints, since native providers (anthropic, google,
|
|
7718
|
+
* bedrock, ...) already use these backend names as their UI key.
|
|
7719
|
+
*/
|
|
7720
|
+
function resolveDropParamsUIKeys(dropParams, endpointKey) {
|
|
7721
|
+
if (!dropParams || dropParams.length === 0) return /* @__PURE__ */ new Set();
|
|
7722
|
+
if (!openAILikeParamEndpointKeys.has(endpointKey)) return new Set(dropParams);
|
|
7723
|
+
return new Set(dropParams.map((param) => dropParamsBackendToUIKey[param] ?? param));
|
|
7724
|
+
}
|
|
7276
7725
|
const openAIColumns = {
|
|
7277
7726
|
col1: openAICol1,
|
|
7278
7727
|
col2: openAICol2
|
|
@@ -7456,6 +7905,28 @@ function getCodeEnvRefs(refs) {
|
|
|
7456
7905
|
return Object.entries(merged).flatMap(([routeKey, ref]) => ref ? [[routeKey, ref]] : []);
|
|
7457
7906
|
}
|
|
7458
7907
|
//#endregion
|
|
7459
|
-
export { ACTION_METADATA_FILTER_FIELDS, AGENT_INSTRUCTION_FILTER_FIELDS, AUTH_USER_DOC_BY_ID_PREFIX, AccessRoleIds, ActionRequest, ActivityLabelEvents, AgentCapabilities, AnnotationTypes, AnthropicEffort, ApprovalEvents, ArtifactModes, AssistantStreamEvents, AuthKeys, AuthType, AuthTypeEnum, AuthorizationTypeEnum, BASE_ONLY_CONFIG_SECTIONS, BASE_PRINCIPAL_CONFIG_SECTIONS, BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA, BEDROCK_OUTPUT_128K_BETA, BedrockProviders, BedrockReasoningConfig, CODE_ENV_KINDS, CONVERSATION_STARTER_FILTER_FIELDS, CONVERSATION_TITLE_FILTER_FIELDS, CacheKeys, Capabilities, CohereConstants, ComponentTypes, Constants, ContentTypes, DATE_RANGE, DEFAULT_MEMORY_MAX_INPUT_TOKENS, DynamicQueryKeys, EImageOutputType, EModelEndpoint, EToolResources, EndpointURLs, ErrorTypes, FEEDBACK_FILTER_FIELDS, FEEDBACK_RATINGS, FEEDBACK_REASON_KEYS, FEEDBACK_TAGS, FILE_FILTER_FIELDS, FILTER_PII_STARTER_PATTERNS, FetchTokenConfig, FileContext, FilePurpose, FileSources, ForkOptions, FunctionSignature, HITL_MESSAGE_FILTER_FIELDS, INSIGHTS_MAX_RANGE_DAYS, INSIGHTS_SEARCH_MAX_LENGTH, INSIGHTS_SEARCH_MIN_LENGTH, INTERFACE_PERMISSION_FIELDS, ImageDetail, ImageDetailCost, ImageVisionTool, InfiniteCollections, InvocationMode, KnownEndpoints, LocalStorageKeys, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, MAX_CHAT_PROJECT_NAME_LENGTH, MAX_GRAPH_SUBAGENT_MEMBERS, MAX_PII_CUSTOM_PATTERNS_TOTAL, MAX_PII_CUSTOM_REGEX_CHARACTERS, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, MAX_PII_PATTERNS_PER_SOURCE, MAX_PII_PATTERN_ID_LENGTH, MAX_PII_PATTERN_LABEL_LENGTH, MAX_PII_PATTERN_LENGTH, MAX_SUBAGENTS, MAX_SUBAGENTS_CEILING, MAX_SUBAGENT_DEPTH, MAX_SUBAGENT_GRAPH_NODES, MAX_SUBAGENT_RUN_CONFIGS, MCPOptionsSchema, MCPServerUserInputSchema, MCPServersSchema, MCP_SERVER_TITLE_ERROR, MCP_SERVER_TITLE_PATTERN, MCP_USER_INPUT_FIELDS, MEMORY_FILTER_FIELDS, MESSAGE_FILTER_FIELDS, MIN_REPORTABLE_RUN_STEP_DURATION_MS, MODEL_PARAMETER_FILTER_FIELDS, MYTHOS_CLASS_FAMILIES, MemoryScope, MessageContentTypes, MutationKeys, OCRStrategy, OptionTypes, PERMISSION_SUB_KEYS, PERMISSION_TYPE_INTERFACE_FIELDS, PROMPT_FILTER_FIELDS, PermissionBits, PermissionTypes, Permissions, PrincipalModel, PrincipalType, ProviderId, Providers, QueryKeys, REFILL_INTERVAL_UNITS, RUNTIME_CONFIG_INTERFACE_FIELDS, RateLimitPrefix, ReasoningContext, ReasoningEffort, ReasoningLabelEvents, ReasoningMode, ReasoningParameterFormat, ReasoningResponseKey, ReasoningSummary, RerankerTypes, ResourceType, RetentionMode, RunStatus, SCHEDULE_CRON_MAX_LENGTH, SEPARATORS, SKILL_BODY_MAX_LENGTH, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_DESCRIPTION_SHORT_THRESHOLD, SKILL_DISPLAY_TITLE_MAX_LENGTH, SKILL_FILTER_FIELDS, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, SKILL_SYNC_MAX_DISCOVERY_DEPTH, SKILL_SYNC_MAX_INTERVAL_MINUTES, SKILL_SYNC_MIN_INTERVAL_MINUTES, SSEOptionsSchema, STATEFUL_CODE_ENVIRONMENTS, STORED_MESSAGE_FILTER_FIELDS, STTProviders, SafeSearchTypes, ScraperProviders, SearchCategories, SearchProviders, SettingTypes, SettingsTabValues, SettingsViews, SkillsScope, StdioOptionsSchema, SteerEvents, StepEvents, StepStatus, StepTypes, StreamableHTTPOptionsSchema, SystemCategories, SystemRoles, TOOL_ARGUMENT_FILTER_FIELDS, TTSProviders, ThinkingDisplay, ThinkingLevel, Time, TokenExchangeMethodEnum, ToolCallTypes, Tools, UsageEvents, Verbosity, ViolationTypes, VisionModes, WebSocketOptionsSchema, accessRoleSchema, accessRoleToPermBits, accordian, actionDelimiter, actionDomainSeparator, actionMetadataFilterFieldSchema, agentInstructionFilterFieldSchema, agentParamSettings, agentPermissionsSchema, agentQueuedTurnCapabilitySchema, agentQueuedTurnDurability, agentQueuedTurnFileRefSchema, agentQueuedTurnReceiptSchema, agentQueuedTurnStatuses, agentsBaseSchema, agentsEndpointSchema, agentsSchema, agentsSettings, alert, alertDialog, allowedAddressesSchema, alternateName, anthropicBaseSchema, anthropicEndpointSchema, anthropicSchema, anthropicSettings, apiBaseUrl, appendAgentIdSuffix, applicationMimeTypes, applyModelAwareDefaults, assistantEndpointSchema, assistantSchema, audioMimeTypes, authTypeSchema, avatar, azureBaseSchema, azureEndpointSchema, azureGroupConfigsSchema, azureGroupSchema, badge, balanceSchema, baseEndpointSchema, bedrockDocumentExtensions, bedrockDocumentFormats, bedrockDocumentMimeTypes, bedrockEndpointSchema, bedrockGuardrailConfigSchema, bedrockInputParser, bedrockInputSchema, bedrockModels, bedrockOutputParser, bookmarkPermissionsSchema, breadcrumb, buildLoginRedirectUrl, buildServerNameAliases, buildTree, button, cacheSubsetProviders, cadenceIntervalMinutes, cadenceToCron, calendar, cancelAgentQueuedTurnResponseSchema, cancelAgentQueuedTurnSchema, capsEffortWhenThinkingDisabled, card, carousel, checkOpenAIStorage, checkbox, checkpointerSchema, checkpointerTypeSchema, clampEffortForDisabledThinking, clampOutputConfigEffort, clampSettingRange, cloudfrontConfigSchema, codeEnvironmentPermissionDecisionSchema, codeEnvironmentUserConfigSchema, codeEnvironmentUserSettingsSchema, codeInterpreterMimeTypes, codeInterpreterMimeTypesList, codeTypeMapping, coerceNumber, collapsible, compactAgentsBaseSchema, compactAgentsSchema, compactAssistantSchema, compactGoogleSchema, configSchema, contextPruningSchema, conversationStarterFilterFieldSchema, conversationTitleFilterFieldSchema, convertStringsToRegex, createPayload, createSchedulePayloadSchema, createURL, cronCadenceSchema, data_service_exports as dataService, defaultAgentCapabilities, defaultAgentFormValues, defaultAssistantFormValues, defaultAssistantsVersion, defaultEndpoints, defaultModels, defaultOCRMimeTypes, defaultOrderQuery, defaultRetrievalModels, defaultSTTMimeTypes, defaultSocialLogins, defaultTextMimeTypes, dialog, documentParserMimeTypes, documentSupportedProviders, drawer, dropdownMenu, eAnthropicEffortSchema, eImageDetailSchema, eModelEndpointSchema, eReasoningContextSchema, eReasoningEffortSchema, eReasoningModeSchema, eReasoningParameterFormatSchema, eReasoningResponseKeySchema, eReasoningSummarySchema, eThinkingDisplaySchema, eThinkingLevelSchema, eVerbositySchema, effectivePermissionsResponseSchema, encodeEphemeralAgentId, endpointFileConfigSchema, endpointSchema, endpointSettings, endpointToProvider, enqueueAgentQueuedTurnResponseSchema, enqueueAgentQueuedTurnSchema, envVarRegex, errorsToString, essentialShadcnComponents, excelFileTypes, excelMimeTypes, excludedKeys, extendedModelEndpointSchema, extractDomainFromUrl, extractEnvVariable, extractVariableName, feedbackFilterFieldSchema, feedbackRatingSchema, feedbackSchema, feedbackTagKeySchema, fileCitationsPermissionsSchema, fileConfig, fileConfigSchema, fileFilterFieldSchema, fileSearchPermissionsSchema, fileSourceSchema, fileStorageSchema, fileStrategiesSchema, filterPiiActionSchema, filterPiiCustomPatternSchema, filterPiiRegexSchema, filterPiiStarterPatternSchema, filtersConfigSchema, findLastSeparatorIndex, fullMimeTypesList, generateDynamicSchema, generateGoogleSchema, generateOpenAISchema, getCodeEnvRefForProfile, getCodeEnvRefs, getConfigDefaults, getConfiguredMimeAccept, getDefaultParamsEndpoint, getEnabledEndpoints, getEndpointField, getEndpointFileConfig, getEphemeralSender, getFirstDefinedValue, getGoogleThinkingBudgetBounds, getGoogleThinkingBudgetMax, getMaxSubagents, getModelKey, getNonEmptyValue, getPiiRegexProgramSize, getRefillEligibilityDate, getResourcePermissionsResponseSchema, getResponseSender, getRunStepDurationMs, getSchemaDefaults, getSettingsKeys, getTagByKey, getTagsForRating, getTokenHeader, googleBaseSchema, googleGenConfigSchema, googleSchema, googleSettings, hasActiveFiltersConfig, hasActivePiiFields, hasActivePiiPatterns, hasPermissions, hasProcessMCPServerConfig, hostImageIdSuffix, hostImageNamePrefix, hoverCard, imageDetailNumeric, imageDetailValue, imageExtRegex, imageGenTools, imageMimeTypes, imageTypeMapping, inferMimeType, initialModelsConfig, input, inputTokensIncludesCache, interfaceSchema, isActionTool, isAgentsEndpoint, isAnthropicDocumentType, isAnthropicTextDocumentType, isAssistantsEndpoint, isBedrockDocumentType, isCronCadence, isDocumentSupportedProvider, isEphemeralAgentId, isImageVisionTool, isMythosClassModel, isOpenAILikeProvider, isParamEndpoint, isPermissiveMimeConfig, isProcessMCPServerConfig, isProcessMCPServerField, isRemoteOidcUrlAllowed, isReportableRunStepDuration, isSecureCodeEnvironmentControlURL, isSensitiveEnvVar, isSystemRoleName, isThinkingDisabled, isUUID, isValidCronExpression, knownEndpointToProvider, label, langfuseConfigSchema, librechat, listAgentQueuedTurnsResponseSchema, listAgentQueuedTurnsSchema, loginPage, mapGroupToAzureConfig, mapModelToAzureConfig, marketplacePermissionsSchema, materializeModelSpecEndpoints, mbToBytes, mcpServersPermissionsSchema, megabyte, memoryFilterFieldSchema, memoryPermissionsSchema, memorySchema, menuBar, mergeCodeEnvRef, mergeFileConfig, messageFilterFieldSchema, messageFilterPiiSchema, messageFilterSchema, mimeTypeAliases, modelConfigSchema, modelParameterFilterFieldSchema, modelSpecSubagentsSchema, modularEndpoints, multiConvoPermissionsSchema, navigationMenu, nextRunInstants, normalizeActionToolName, normalizeEndpointName, normalizeMCPToolKey, normalizeSearxngEngines, normalizeServerName, ocrSchema, omitsSamplingParameters, omitsThinkingByDefault, openAIBaseSchema, openAISchema, openAISettings, openRouterSchema, openapiToFunction, orderEndpointsConfig, pagination, paramDefinitionSchema, paramEndpoints, paramSettings, parseCompactConvo, parseConvo, parseEphemeralAgentId, parseLangChainErrorCode, parseTextParts, peoplePickerPermissionsSchema, permBitsToAccessLevel, permissionEntrySchema, permissionsSchema, popover, presetSettings, principalSchema, progress, promptFilterFieldSchema, promptPermissionsSchema, promptTokensFromUsage, providerEndpointMap, radioGroup, rateLimitSchema, reconcileContextUsage, registerPage, remoteAgentsPermissionsSchema, removeCodeExecutionCaller, removeNullishValues, replaceSpecialVars, request_default as request, requiresExplicitThinkingDisabled, resolveAgentSkillsScope, resolveAllowedStatefulCodeEnvironments, resolveEndpointType, resolveModelCatalogKey, resolveModelSpecEndpoint, resolveProviderId, resolveRef, resolveStatefulCodeEnvironment, resolveThinkingDisplay, resourcePermissionsResponseSchema, retainRecentConfigSchema, retrievalMimeTypes, retrievalMimeTypesList, roleDefaults, roleSchema, runCodePermissionsSchema, scheduleCadenceSchema, scheduleFrequencies, scheduleStructuredFrequencies, scheduleTargets, schedulesPermissionsSchema, select, separator, setAcceptLanguageHeader, setFileConfigRegexCompiler, setMaxSubagents, setMessageFilterRegexValidator, setTokenHeader, sha1, shadcnComponents, sharedFileDownload, sharedLinksPermissionsSchema, skeleton, skillFilterFieldSchema, skillPermissionsSchema, skillSyncConfigSchema, skillSyncGitHubSourceSchema, slider, specialVariables, specsConfigSchema, splitMCPToolKey, splitToolCallName, stripAgentIdSuffix, stripLangChainTroubleshootingUrl, stripReasoningLabelMetadata, stripServerNamePrefix, stripServerNamePrefixes, structuredCadenceSchema, subagentThreadLineageSchema, summarizationConfigSchema, summarizationTriggerSchema, supportedMimeTypes, supportsAdaptiveThinking, supportsBalanceCheck, supportsContext1m, supportsFiles, supportsPromptCache, switchComponent, tBannerSchema, tConversationSchema, tConversationTagSchema, tConvoUpdateSchema, tExampleSchema, tMessageSchema, tModelSpecPresetSchema, tModelSpecSchema, tPluginAuthConfigSchema, tPluginSchema, tPresetSchema, tQueryParamsSchema, tSharedLinkSchema, table, tabs, temporaryChatPermissionsSchema, textMimeTypes, textarea, toMinimalFeedback, toast, toaster, toggle, toggleGroup, toolApprovalHookConfigSchema, toolApprovalModeSchema, toolApprovalPolicySchema, toolArgumentFilterFieldSchema, tooltip, transactionsSchema, turnstileOptionsSchema, turnstileSchema, unattributedAssistantContentSchema, updateResourcePermissionsRequestSchema, updateResourcePermissionsResponseSchema, updateSchedulePayloadSchema, useToast, userSubmittedMessageFieldPathSchema, utils, validateActionDomain, validateAndParseOpenAPISpec, validateAzureGroups, validateSettingDefinitions, validateVisionModel, vertexAISchema, vertexModelConfigSchema, videoMimeTypes, visionModels, webSearchPermissionsSchema, webSearchSchema };
|
|
7908
|
+
//#region src/code/worker.ts
|
|
7909
|
+
function isCodeWorkerShell(value) {
|
|
7910
|
+
return value === "posix" || value === "powershell";
|
|
7911
|
+
}
|
|
7912
|
+
function quotePosix(value) {
|
|
7913
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
7914
|
+
}
|
|
7915
|
+
function quotePowerShell(value) {
|
|
7916
|
+
return `'${value.replace(/'/g, "''")}'`;
|
|
7917
|
+
}
|
|
7918
|
+
function createCodeWorkerSetupCommand(pairing, shell, options = {}) {
|
|
7919
|
+
const quote = shell === "powershell" ? quotePowerShell : quotePosix;
|
|
7920
|
+
const pair = `librechat-code pair ${quote(pairing.endpoint)} ${quote(pairing.code)} --worker-id ${quote(pairing.workerId)}`;
|
|
7921
|
+
const run = ["librechat-code run", ...[
|
|
7922
|
+
options.defaultWorkspace === false ? null : "--default-workspace",
|
|
7923
|
+
options.allowWorkspaceWrites === true ? "--allow-workspace-writes" : null,
|
|
7924
|
+
options.allowWorkspaceCommands === true ? "--allow-workspace-commands" : null
|
|
7925
|
+
].filter((value) => value != null)].join(" ");
|
|
7926
|
+
if (shell === "powershell") return `${pair}\n$env:LIBRECHAT_CODE_WORKER_ID = ${quote(pairing.workerId)}\n${run}`;
|
|
7927
|
+
return `${pair}\nLIBRECHAT_CODE_WORKER_ID=${quote(pairing.workerId)} ${run}`;
|
|
7928
|
+
}
|
|
7929
|
+
//#endregion
|
|
7930
|
+
export { ACTION_METADATA_FILTER_FIELDS, AGENT_INSTRUCTION_FILTER_FIELDS, AUTH_USER_DOC_BY_ID_PREFIX, AccessRoleIds, ActionRequest, ActivityLabelEvents, AgentCapabilities, AnnotationTypes, AnthropicEffort, ApprovalEvents, ArtifactModes, AssistantStreamEvents, AuthKeys, AuthType, AuthTypeEnum, AuthorizationTypeEnum, BASE_ONLY_CONFIG_SECTIONS, BASE_PRINCIPAL_CONFIG_SECTIONS, BEDROCK_FINE_GRAINED_TOOL_STREAMING_BETA, BEDROCK_OUTPUT_128K_BETA, BedrockProviders, BedrockReasoningConfig, CODE_APPROVAL_MODES, CODE_ENVIRONMENT_COMMAND_TIMEOUT_DEFAULT_MS, CODE_ENVIRONMENT_COMMAND_TIMEOUT_HARD_MAX_MS, CODE_ENVIRONMENT_DECISION_VERSION, CODE_ENVIRONMENT_MODES, CODE_ENV_KINDS, CODE_WORKSPACE_ID_PATTERN, CODE_WORKSPACE_MAX_COUNT, CODE_WORKSPACE_OPERATIONS, CODE_WORKSPACE_SELECTION_ERROR_REASONS, CONVERSATION_STARTER_FILTER_FIELDS, CONVERSATION_TITLE_FILTER_FIELDS, CacheKeys, Capabilities, CodeApprovalModeError, CohereConstants, ComponentTypes, Constants, ContentTypes, DATE_RANGE, DEFAULT_MEMORY_MAX_INPUT_TOKENS, DefaultLLMDeliveryPath, DynamicQueryKeys, EImageOutputType, EModelEndpoint, EToolResources, EndpointURLs, ErrorTypes, FEEDBACK_FILTER_FIELDS, FEEDBACK_RATINGS, FEEDBACK_REASON_KEYS, FEEDBACK_TAGS, FILE_FILTER_FIELDS, FILTER_PII_STARTER_PATTERNS, FetchTokenConfig, FileContext, FilePurpose, FileSources, ForkOptions, FunctionSignature, HITL_MESSAGE_FILTER_FIELDS, INSIGHTS_AGENT_ID_MAX_LENGTH, INSIGHTS_MAX_RANGE_DAYS, INSIGHTS_SEARCH_MAX_LENGTH, INSIGHTS_SEARCH_MIN_LENGTH, INTERFACE_PERMISSION_FIELDS, ImageDetail, ImageDetailCost, ImageVisionTool, InfiniteCollections, InvocationMode, KnownEndpoints, LANGFUSE_TRACE_CONVERSATION_METADATA_FIELDS, LANGFUSE_TRACE_USER_ID_FIELDS, LANGFUSE_TRACE_USER_METADATA_FIELDS, LocalStorageKeys, MAX_CHAT_PROJECT_DESCRIPTION_LENGTH, MAX_CHAT_PROJECT_NAME_LENGTH, MAX_GRAPH_SUBAGENT_MEMBERS, MAX_MCP_ICON_PATH_LENGTH, MAX_PII_CUSTOM_PATTERNS_TOTAL, MAX_PII_CUSTOM_REGEX_CHARACTERS, MAX_PII_CUSTOM_REGEX_INSTRUCTIONS, MAX_PII_PATTERNS_PER_SOURCE, MAX_PII_PATTERN_ID_LENGTH, MAX_PII_PATTERN_LABEL_LENGTH, MAX_PII_PATTERN_LENGTH, MAX_SUBAGENTS, MAX_SUBAGENTS_CEILING, MAX_SUBAGENT_DEPTH, MAX_SUBAGENT_GRAPH_NODES, MAX_SUBAGENT_RUN_CONFIGS, MCPOptionsSchema, MCPServerUserInputSchema, MCPServersSchema, MCP_SERVER_TITLE_ERROR, MCP_SERVER_TITLE_PATTERN, MCP_USER_INPUT_FIELDS, MEMORY_FILTER_FIELDS, MESSAGE_FILTER_FIELDS, MIN_REPORTABLE_RUN_STEP_DURATION_MS, MODEL_PARAMETER_FILTER_FIELDS, MYTHOS_CLASS_FAMILIES, MemoryScope, MessageContentTypes, MutationKeys, OCRStrategy, OptionTypes, PERMISSION_SUB_KEYS, PERMISSION_TYPE_INTERFACE_FIELDS, PROMPT_FILTER_FIELDS, PermissionBits, PermissionTypes, Permissions, PrincipalModel, PrincipalType, ProviderId, Providers, QueryKeys, REFILL_INTERVAL_UNITS, RUNTIME_CONFIG_INTERFACE_FIELDS, RateLimitPrefix, ReasoningContext, ReasoningEffort, ReasoningLabelEvents, ReasoningMode, ReasoningParameterFormat, ReasoningResponseKey, ReasoningSummary, RerankerTypes, ResourceType, RetentionMode, RunStatus, SCHEDULE_CRON_MAX_LENGTH, SEPARATORS, SKILL_BODY_MAX_LENGTH, SKILL_DESCRIPTION_MAX_LENGTH, SKILL_DESCRIPTION_SHORT_THRESHOLD, SKILL_DISPLAY_TITLE_MAX_LENGTH, SKILL_FILTER_FIELDS, SKILL_NAME_MAX_LENGTH, SKILL_NAME_PATTERN, SKILL_SYNC_DEFAULT_DISCOVERY_DEPTH, SKILL_SYNC_MAX_DISCOVERY_DEPTH, SKILL_SYNC_MAX_INTERVAL_MINUTES, SKILL_SYNC_MIN_INTERVAL_MINUTES, SSEOptionsSchema, STATEFUL_CODE_ENVIRONMENTS, STORED_MESSAGE_FILTER_FIELDS, STTProviders, SVG_SANITIZE_CONFIG, SYSTEM_LLM_DELIVERY_DEFAULTS, SafeSearchTypes, ScraperProviders, SearchCategories, SearchProviders, SettingTypes, SettingsTabValues, SettingsViews, SkillsScope, StdioOptionsSchema, SteerEvents, StepEvents, StepStatus, StepTypes, StreamableHTTPOptionsSchema, SystemCategories, SystemRoles, TOOL_ARGUMENT_FILTER_FIELDS, TRACE_CURSOR_MAX_LENGTH, TRACE_RECORD_ID_MAX_LENGTH, TRACE_SOURCE_ID_MAX_LENGTH, TTSProviders, ThinkingDisplay, ThinkingLevel, Time, TokenExchangeMethodEnum, ToolCallTypes, Tools, UsageEvents, Verbosity, ViolationTypes, VisionModes, WebSocketOptionsSchema, accessRoleSchema, accessRoleToPermBits, accordian, actionDelimiter, actionDomainSeparator, actionMetadataFilterFieldSchema, agentGitIdentitySchema, agentInstructionFilterFieldSchema, agentParamSettings, agentPermissionsSchema, agentQueuedTurnCapabilitySchema, agentQueuedTurnDurability, agentQueuedTurnFileRefSchema, agentQueuedTurnReceiptSchema, agentQueuedTurnStatuses, agentsBaseSchema, agentsEndpointSchema, agentsSchema, agentsSettings, alert, alertDialog, allowedAddressesSchema, alternateName, anthropicBaseSchema, anthropicEndpointSchema, anthropicSchema, anthropicSettings, apiBaseUrl, appendAgentIdSuffix, applicationMimeTypes, applyModelAwareDefaults, assistantEndpointSchema, assistantSchema, audioMimeTypes, authTypeSchema, avatar, azureBaseSchema, azureEndpointSchema, azureGroupConfigsSchema, azureGroupSchema, badge, balanceSchema, baseEndpointSchema, bedrockDocumentExtensions, bedrockDocumentFormats, bedrockDocumentMimeTypes, bedrockEndpointSchema, bedrockGuardrailConfigSchema, bedrockInputParser, bedrockInputSchema, bedrockModels, bedrockOutputParser, bookmarkPermissionsSchema, breadcrumb, buildLoginRedirectUrl, buildServerNameAliases, buildTree, button, cacheSubsetProviders, cadenceIntervalMinutes, cadenceToCron, calendar, canToolResourceConsume, cancelAgentQueuedTurnResponseSchema, cancelAgentQueuedTurnSchema, capsEffortWhenThinkingDisabled, card, carousel, checkOpenAIStorage, checkbox, checkpointerSchema, checkpointerTypeSchema, clampEffortForDisabledThinking, clampOutputConfigEffort, clampSettingRange, cloudfrontConfigSchema, codeEnvironmentPermissionDecisionSchema, codeEnvironmentUserConfigSchema, codeEnvironmentUserSettingsSchema, codeInterpreterMimeTypes, codeInterpreterMimeTypesList, codeTypeMapping, coerceNumber, collapsible, compactAgentsBaseSchema, compactAgentsSchema, compactAssistantSchema, compactGoogleSchema, configSchema, contextPruningSchema, conversationStarterFilterFieldSchema, conversationTitleFilterFieldSchema, convertStringsToRegex, createCodeWorkerSetupCommand, createPayload, createSchedulePayloadSchema, createURL, cronCadenceSchema, data_service_exports as dataService, defaultAgentCapabilities, defaultAgentFormValues, defaultAssistantFormValues, defaultAssistantsVersion, defaultEndpoints, defaultLLMDeliveryPathSchema, defaultModels, defaultOCRMimeTypes, defaultOrderQuery, defaultRetrievalModels, defaultSTTMimeTypes, defaultSocialLogins, defaultTextMimeTypes, dialog, documentParserMimeTypes, documentSupportedProviders, drawer, dropdownMenu, eAnthropicEffortSchema, eImageDetailSchema, eModelEndpointSchema, eReasoningContextSchema, eReasoningEffortSchema, eReasoningModeSchema, eReasoningParameterFormatSchema, eReasoningResponseKeySchema, eReasoningSummarySchema, eThinkingDisplaySchema, eThinkingLevelSchema, eVerbositySchema, effectivePermissionsResponseSchema, encodeEphemeralAgentId, endpointFileConfigSchema, endpointSchema, endpointSettings, endpointToProvider, enqueueAgentQueuedTurnResponseSchema, enqueueAgentQueuedTurnSchema, envVarRegex, errorsToString, essentialShadcnComponents, excelFileTypes, excelMimeTypes, excludedKeys, extendedModelEndpointSchema, extractDomainFromUrl, extractEnvVariable, extractVariableName, feedbackFilterFieldSchema, feedbackRatingSchema, feedbackSchema, feedbackTagKeySchema, fileCitationsPermissionsSchema, fileConfig, fileConfigSchema, fileFilterFieldSchema, fileSearchPermissionsSchema, fileSourceSchema, fileStorageSchema, fileStrategiesSchema, filterPiiActionSchema, filterPiiCustomPatternSchema, filterPiiRegexSchema, filterPiiStarterPatternSchema, filtersConfigSchema, finalizeSvgMarkup, findLastSeparatorIndex, findMessageById, fullMimeTypesList, generateDynamicSchema, generateGoogleSchema, generateOpenAISchema, getAllowedCodeApprovalModes, getCodeEnvRefForProfile, getCodeEnvRefs, getConfigDefaults, getConfiguredMimeAccept, getDefaultParamsEndpoint, getDocumentFileExtension, getEnabledEndpoints, getEndpointField, getEndpointFileConfig, getEphemeralSender, getFirstDefinedValue, getGoogleThinkingBudgetBounds, getGoogleThinkingBudgetMax, getMaxSubagents, getModelKey, getNonEmptyValue, getPiiRegexProgramSize, getRefillEligibilityDate, getResourcePermissionsResponseSchema, getResponseSender, getRunStepDurationMs, getScheduleMCPDisabledReason, getSchemaDefaults, getSettingsKeys, getTagByKey, getTagsForRating, getTokenHeader, googleBaseSchema, googleGenConfigSchema, googleSchema, googleSettings, hasActiveFiltersConfig, hasActivePiiFields, hasActivePiiPatterns, hasPermissions, hasProcessMCPServerConfig, hasTextExtractionPath, hasToolCallErrorPrefix, hostImageIdSuffix, hostImageNamePrefix, hoverCard, imageDetailNumeric, imageDetailValue, imageExtRegex, imageGenTools, imageMimeTypes, imageTypeMapping, inferMimeType, initialModelsConfig, input, inputTokensIncludesCache, interfaceSchema, isActionTool, isAgentsEndpoint, isAnthropicDocumentType, isAnthropicTextDocumentType, isAssistantsEndpoint, isBedrockDocumentType, isCodeEnvironmentMode, isCodeWorkerShell, isCodeWorkspaceSelection, isCodeWorkspaceSelectionErrorReason, isCodeWorkspaceSelections, isCompactedLeaf, isCronCadence, isDocumentSupportedProvider, isEphemeralAgentId, isImageVisionTool, isKnownProviderIdentifier, isMediaSupportedProvider, isMessageFileUpload, isMythosClassModel, isNativelyReadableText, isOpenAILikeProvider, isParamEndpoint, isPermissiveMimeConfig, isProcessMCPServerConfig, isProcessMCPServerField, isRemoteOidcUrlAllowed, isReportableRunStepDuration, isResponsesApiUpload, isSecureCodeEnvironmentControlURL, isSensitiveEnvVar, isSpeechProviderConfigured, isSystemRoleName, isThinkingDisabled, isUUID, isUserInitiatedCompaction, isValidCronExpression, knownEndpointToProvider, label, langfuseConfigSchema, langfuseTraceConfigSchema, librechat, listAgentQueuedTurnsResponseSchema, listAgentQueuedTurnsSchema, listConfiguredSpeechProviders, loginPage, mapGroupToAzureConfig, mapModelToAzureConfig, marketplacePermissionsSchema, materializeModelSpecEndpoints, mbToBytes, mcpRefreshDefaults, mcpServersPermissionsSchema, mediaSupportedProviders, megabyte, memoryFilterFieldSchema, memoryPermissionsSchema, memorySchema, menuBar, mergeCodeEnvRef, mergeFileConfig, messageFilterFieldSchema, messageFilterPiiSchema, messageFilterSchema, mimeTypeAliases, modelConfigSchema, modelParameterFilterFieldSchema, modelSpecSubagentsSchema, modularEndpoints, multiConvoPermissionsSchema, navigationMenu, nextRunInstants, normalizeActionToolName, normalizeEndpointName, normalizeMCPToolKey, normalizeSearxngEngines, normalizeServerName, ocrSchema, omitsSamplingParameters, omitsThinkingByDefault, openAIBaseSchema, openAISchema, openAISettings, openRouterSchema, openapiToFunction, orderEndpointsConfig, outputTokensFromUsage, pagination, paramDefinitionSchema, paramEndpoints, paramSettings, parseCompactConvo, parseConvo, parseEphemeralAgentId, parseLangChainErrorCode, parseTextParts, peoplePickerPermissionsSchema, permBitsToAccessLevel, permissionEntrySchema, permissionsSchema, popover, presetSettings, principalSchema, progress, promptFilterFieldSchema, promptPermissionsSchema, promptTokensFromUsage, providerEndpointMap, radioGroup, rateLimitSchema, readScheduleMCPOutcomes, reconcileContextUsage, reconcileContextUsageFromEvent, registerPage, remoteAgentsPermissionsSchema, removeCodeExecutionCaller, removeNullishValues, replaceSpecialVars, request_default as request, requiresExplicitThinkingDisabled, resolveAgentSkillsScope, resolveAllowedStatefulCodeEnvironments, resolveCodeApprovalMode, resolveCodePermissionDecision, resolveDefaultLLMDeliveryPath, resolveDefaultUploadLLMDeliveryPath, resolveDropParamsUIKeys, resolveEndpointType, resolveModelCatalogKey, resolveModelSpecEndpoint, resolveProviderId, resolveRef, resolveSandboxFilename, resolveStatefulCodeEnvironment, resolveThinkingDisplay, resolveTraceViewerConfig, resolveUploadDestination, resolveUploadLLMDeliveryPath, resolveUseResponsesApi, resourcePermissionsResponseSchema, restrictSvgReferences, retainRecentConfigSchema, retrievalMimeTypes, retrievalMimeTypesList, roleDefaults, roleSchema, runCodePermissionsSchema, scheduleCadenceSchema, scheduleFrequencies, scheduleMCPOutcomeSchema, scheduleStructuredFrequencies, scheduleTargets, schedulesPermissionsSchema, select, separator, setAcceptLanguageHeader, setFileConfigRegexCompiler, setMaxSubagents, setMessageFilterRegexValidator, setTokenHeader, sha1, shadcnComponents, sharedFileDownload, sharedLinksPermissionsSchema, skeleton, skillFilterFieldSchema, skillPermissionsSchema, skillSyncConfigSchema, skillSyncGitHubSourceSchema, slider, specialVariables, specsConfigSchema, splitMCPToolKey, splitToolCallName, stripAgentIdSuffix, stripLangChainTroubleshootingUrl, stripReasoningLabelMetadata, stripServerNamePrefix, stripServerNamePrefixes, stripToolCallErrorPrefix, structuredCadenceSchema, subagentThreadLineageSchema, summarizationConfigSchema, summarizationTriggerSchema, supportedMimeTypes, supportsAdaptiveThinking, supportsBalanceCheck, supportsContext1m, supportsFiles, supportsPromptCache, switchComponent, tBannerSchema, tConversationSchema, tConversationTagSchema, tConvoUpdateSchema, tExampleSchema, tMessageSchema, tModelSpecPresetSchema, tModelSpecSchema, tPluginAuthConfigSchema, tPluginSchema, tPresetSchema, tQueryParamsSchema, tSharedLinkSchema, table, tabs, temporaryChatPermissionsSchema, textMimeTypes, textarea, toMinimalFeedback, toast, toaster, toggle, toggleGroup, toolApprovalHookConfigSchema, toolApprovalModeSchema, toolApprovalPolicySchema, toolArgumentFilterFieldSchema, tooltip, traceViewerDefaults, traceViewerLimits, transactionsSchema, turnstileOptionsSchema, turnstileSchema, unattributedAssistantContentSchema, updateResourcePermissionsRequestSchema, updateResourcePermissionsResponseSchema, updateSchedulePayloadSchema, useToast, userSubmittedMessageFieldPathSchema, utils, validateActionDomain, validateAndParseOpenAPISpec, validateAzureGroups, validateSettingDefinitions, validateVisionModel, vertexAISchema, vertexModelConfigSchema, videoMimeTypes, visionModels, webSearchPermissionsSchema, webSearchSchema };
|
|
7460
7931
|
|
|
7461
7932
|
//# sourceMappingURL=index.mjs.map
|