@flutchai/flutch-sdk 0.6.2 → 0.6.5

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/index.d.cts CHANGED
@@ -8,13 +8,16 @@ import Redis from 'ioredis';
8
8
  import { Registry } from 'prom-client';
9
9
  import { Response, Request as Request$1 } from 'express';
10
10
  import { DiscoveryService, MetadataScanner, ModuleRef } from '@nestjs/core';
11
- import { AIMessageChunk, ToolMessage, AIMessage } from '@langchain/core/messages';
11
+ import { AIMessageChunk, BaseMessage, ToolMessage, AIMessage } from '@langchain/core/messages';
12
12
  import { Runnable, RunnableConfig } from '@langchain/core/runnables';
13
13
  import { DynamicStructuredTool, StructuredTool } from '@langchain/core/tools';
14
14
  import { BaseChatModel, BaseChatModelCallOptions } from '@langchain/core/language_models/chat_models';
15
15
  import { BaseDocumentCompressor } from '@langchain/core/retrievers/document_compressors';
16
16
  import { Embeddings } from '@langchain/core/embeddings';
17
17
  import { BaseLanguageModelInput } from '@langchain/core/language_models/base';
18
+ import { ChatBedrockConverse } from '@langchain/aws';
19
+ import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
20
+ import { ChatResult, ChatGenerationChunk } from '@langchain/core/outputs';
18
21
  import { Document } from '@langchain/core/documents';
19
22
 
20
23
  interface RequestContext {
@@ -1042,11 +1045,13 @@ interface ModelConfig {
1042
1045
  tools?: ToolConfig[];
1043
1046
  baseURL?: string;
1044
1047
  providerConfig?: Record<string, any>;
1048
+ supportsSamplingParams?: boolean;
1045
1049
  }
1046
1050
  interface ModelByIdConfig {
1047
1051
  modelId: string;
1048
1052
  temperature?: number;
1049
1053
  maxTokens?: number;
1054
+ supportsSamplingParams?: boolean;
1050
1055
  baseURL?: string;
1051
1056
  toolsConfig?: IAgentToolConfig[];
1052
1057
  customTools?: DynamicStructuredTool[];
@@ -1058,10 +1063,11 @@ interface ModelConfigWithToken {
1058
1063
  modelId: string;
1059
1064
  modelName: string;
1060
1065
  provider: ModelProvider;
1061
- defaultTemperature: number;
1062
- defaultMaxTokens: number;
1066
+ defaultTemperature?: number;
1067
+ defaultMaxTokens?: number;
1063
1068
  apiToken?: string;
1064
1069
  requiresApiKey: boolean;
1070
+ supportsSamplingParams?: boolean;
1065
1071
  useBedrock?: boolean;
1066
1072
  bedrockModelId?: string;
1067
1073
  baseURL?: string;
@@ -1115,6 +1121,7 @@ declare class ModelInitializer implements IModelInitializer {
1115
1121
  constructor(configFetcher?: ModelConfigFetcher, logger?: Logger, apiKeyResolver?: ApiKeyResolver);
1116
1122
  private resolveApiKey;
1117
1123
  private resolveBedrockRegion;
1124
+ private resolveSampling;
1118
1125
  private hashToolsConfig;
1119
1126
  private generateModelCacheKey;
1120
1127
  private readonly chatModelCreators;
@@ -1174,12 +1181,53 @@ interface IToolExecutionContext {
1174
1181
  }
1175
1182
 
1176
1183
  declare function isReasoningModel(modelName: string): boolean;
1184
+ declare function toOptionalNumber(value: unknown): number | undefined;
1185
+ declare const SAMPLING_PARAM_FREE_THRESHOLDS: Record<string, {
1186
+ major: number;
1187
+ minor: number;
1188
+ }>;
1189
+ declare function modelAcceptsSamplingParams(modelIdentifier?: string): boolean;
1190
+ interface SamplingParams {
1191
+ temperature?: number;
1192
+ topP?: number;
1193
+ topK?: number;
1194
+ }
1195
+ interface ResolvedSamplingParams {
1196
+ params: SamplingParams;
1197
+ dropped: string[];
1198
+ accepted: boolean;
1199
+ }
1200
+ declare function resolveSamplingParams(modelIdentifiers: (string | undefined)[], requested: SamplingParams, supportsSamplingParams?: boolean): ResolvedSamplingParams;
1177
1201
  declare function hashToolsConfig(toolsConfig: IAgentToolConfig[]): string;
1178
1202
  declare function normalizeToolConfigs(tools?: ToolConfig[]): IAgentToolConfig[] | undefined;
1179
1203
  declare const DEFAULT_ROUTER_URL = "https://router.flutch.ai";
1180
1204
  declare function resolveRouterURL(baseURL?: string): string | undefined;
1181
1205
  declare function generateModelCacheKey(modelId: string, temperature?: number, maxTokens?: number, toolsConfig?: IAgentToolConfig[], baseURL?: string): string;
1182
- declare function buildOpenAIModelConfig(modelName: string, temperature: number, maxTokens: number, apiToken: string): Record<string, any>;
1206
+ declare function buildOpenAIModelConfig(modelName: string, temperature: number | undefined, maxTokens: number | undefined, apiToken: string): Record<string, any>;
1207
+
1208
+ interface LangchainReasoningBlock {
1209
+ type: "reasoning_content";
1210
+ reasoningText?: {
1211
+ text?: string | null;
1212
+ signature?: string | null;
1213
+ } | null;
1214
+ redactedContent?: string | null;
1215
+ }
1216
+ declare function isReasoningBlock(block: unknown): block is LangchainReasoningBlock;
1217
+ declare function isSendableReasoningBlock(block: LangchainReasoningBlock): boolean;
1218
+ declare function sanitizeMessageReasoning(message: BaseMessage): BaseMessage;
1219
+ interface SanitizedHistory {
1220
+ messages: BaseMessage[];
1221
+ sanitized: number;
1222
+ }
1223
+ declare function sanitizeReasoningForBedrock(messages: BaseMessage[]): SanitizedHistory;
1224
+
1225
+ declare class FlutchChatBedrockConverse extends ChatBedrockConverse {
1226
+ static lc_name(): string;
1227
+ private sanitize;
1228
+ _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
1229
+ _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
1230
+ }
1183
1231
 
1184
1232
  interface VoyageAIRerankConfig {
1185
1233
  apiKey?: string;
@@ -1806,4 +1854,4 @@ declare class MongoTokenStore implements IOAuthTokenStore {
1806
1854
  private ensureIndex;
1807
1855
  }
1808
1856
 
1809
- export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, type FlutchContext, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, flutchFetch, flutchHeaders, flutchMistralHook, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getFlutchContext, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isInternalMode, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall, withFlutchContext, wrapCohereFetcher };
1857
+ export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, FlutchChatBedrockConverse, type FlutchContext, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type LangchainReasoningBlock, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type ResolvedSamplingParams, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, SAMPLING_PARAM_FREE_THRESHOLDS, type SamplingParams, type SanitizedHistory, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, flutchFetch, flutchHeaders, flutchMistralHook, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getFlutchContext, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isInternalMode, isReasoningBlock, isReasoningModel, isSendableReasoningBlock, loadOAuthProviders, modelAcceptsSamplingParams, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, resolveSamplingParams, sanitizeMessageReasoning, sanitizeReasoningForBedrock, sanitizeTraceData, storeAttachmentData, toOptionalNumber, traceApiCall, withFlutchContext, wrapCohereFetcher };
package/dist/index.d.ts CHANGED
@@ -8,13 +8,16 @@ import Redis from 'ioredis';
8
8
  import { Registry } from 'prom-client';
9
9
  import { Response, Request as Request$1 } from 'express';
10
10
  import { DiscoveryService, MetadataScanner, ModuleRef } from '@nestjs/core';
11
- import { AIMessageChunk, ToolMessage, AIMessage } from '@langchain/core/messages';
11
+ import { AIMessageChunk, BaseMessage, ToolMessage, AIMessage } from '@langchain/core/messages';
12
12
  import { Runnable, RunnableConfig } from '@langchain/core/runnables';
13
13
  import { DynamicStructuredTool, StructuredTool } from '@langchain/core/tools';
14
14
  import { BaseChatModel, BaseChatModelCallOptions } from '@langchain/core/language_models/chat_models';
15
15
  import { BaseDocumentCompressor } from '@langchain/core/retrievers/document_compressors';
16
16
  import { Embeddings } from '@langchain/core/embeddings';
17
17
  import { BaseLanguageModelInput } from '@langchain/core/language_models/base';
18
+ import { ChatBedrockConverse } from '@langchain/aws';
19
+ import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
20
+ import { ChatResult, ChatGenerationChunk } from '@langchain/core/outputs';
18
21
  import { Document } from '@langchain/core/documents';
19
22
 
20
23
  interface RequestContext {
@@ -1042,11 +1045,13 @@ interface ModelConfig {
1042
1045
  tools?: ToolConfig[];
1043
1046
  baseURL?: string;
1044
1047
  providerConfig?: Record<string, any>;
1048
+ supportsSamplingParams?: boolean;
1045
1049
  }
1046
1050
  interface ModelByIdConfig {
1047
1051
  modelId: string;
1048
1052
  temperature?: number;
1049
1053
  maxTokens?: number;
1054
+ supportsSamplingParams?: boolean;
1050
1055
  baseURL?: string;
1051
1056
  toolsConfig?: IAgentToolConfig[];
1052
1057
  customTools?: DynamicStructuredTool[];
@@ -1058,10 +1063,11 @@ interface ModelConfigWithToken {
1058
1063
  modelId: string;
1059
1064
  modelName: string;
1060
1065
  provider: ModelProvider;
1061
- defaultTemperature: number;
1062
- defaultMaxTokens: number;
1066
+ defaultTemperature?: number;
1067
+ defaultMaxTokens?: number;
1063
1068
  apiToken?: string;
1064
1069
  requiresApiKey: boolean;
1070
+ supportsSamplingParams?: boolean;
1065
1071
  useBedrock?: boolean;
1066
1072
  bedrockModelId?: string;
1067
1073
  baseURL?: string;
@@ -1115,6 +1121,7 @@ declare class ModelInitializer implements IModelInitializer {
1115
1121
  constructor(configFetcher?: ModelConfigFetcher, logger?: Logger, apiKeyResolver?: ApiKeyResolver);
1116
1122
  private resolveApiKey;
1117
1123
  private resolveBedrockRegion;
1124
+ private resolveSampling;
1118
1125
  private hashToolsConfig;
1119
1126
  private generateModelCacheKey;
1120
1127
  private readonly chatModelCreators;
@@ -1174,12 +1181,53 @@ interface IToolExecutionContext {
1174
1181
  }
1175
1182
 
1176
1183
  declare function isReasoningModel(modelName: string): boolean;
1184
+ declare function toOptionalNumber(value: unknown): number | undefined;
1185
+ declare const SAMPLING_PARAM_FREE_THRESHOLDS: Record<string, {
1186
+ major: number;
1187
+ minor: number;
1188
+ }>;
1189
+ declare function modelAcceptsSamplingParams(modelIdentifier?: string): boolean;
1190
+ interface SamplingParams {
1191
+ temperature?: number;
1192
+ topP?: number;
1193
+ topK?: number;
1194
+ }
1195
+ interface ResolvedSamplingParams {
1196
+ params: SamplingParams;
1197
+ dropped: string[];
1198
+ accepted: boolean;
1199
+ }
1200
+ declare function resolveSamplingParams(modelIdentifiers: (string | undefined)[], requested: SamplingParams, supportsSamplingParams?: boolean): ResolvedSamplingParams;
1177
1201
  declare function hashToolsConfig(toolsConfig: IAgentToolConfig[]): string;
1178
1202
  declare function normalizeToolConfigs(tools?: ToolConfig[]): IAgentToolConfig[] | undefined;
1179
1203
  declare const DEFAULT_ROUTER_URL = "https://router.flutch.ai";
1180
1204
  declare function resolveRouterURL(baseURL?: string): string | undefined;
1181
1205
  declare function generateModelCacheKey(modelId: string, temperature?: number, maxTokens?: number, toolsConfig?: IAgentToolConfig[], baseURL?: string): string;
1182
- declare function buildOpenAIModelConfig(modelName: string, temperature: number, maxTokens: number, apiToken: string): Record<string, any>;
1206
+ declare function buildOpenAIModelConfig(modelName: string, temperature: number | undefined, maxTokens: number | undefined, apiToken: string): Record<string, any>;
1207
+
1208
+ interface LangchainReasoningBlock {
1209
+ type: "reasoning_content";
1210
+ reasoningText?: {
1211
+ text?: string | null;
1212
+ signature?: string | null;
1213
+ } | null;
1214
+ redactedContent?: string | null;
1215
+ }
1216
+ declare function isReasoningBlock(block: unknown): block is LangchainReasoningBlock;
1217
+ declare function isSendableReasoningBlock(block: LangchainReasoningBlock): boolean;
1218
+ declare function sanitizeMessageReasoning(message: BaseMessage): BaseMessage;
1219
+ interface SanitizedHistory {
1220
+ messages: BaseMessage[];
1221
+ sanitized: number;
1222
+ }
1223
+ declare function sanitizeReasoningForBedrock(messages: BaseMessage[]): SanitizedHistory;
1224
+
1225
+ declare class FlutchChatBedrockConverse extends ChatBedrockConverse {
1226
+ static lc_name(): string;
1227
+ private sanitize;
1228
+ _generate(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): Promise<ChatResult>;
1229
+ _streamResponseChunks(messages: BaseMessage[], options: this["ParsedCallOptions"], runManager?: CallbackManagerForLLMRun): AsyncGenerator<ChatGenerationChunk>;
1230
+ }
1183
1231
 
1184
1232
  interface VoyageAIRerankConfig {
1185
1233
  apiKey?: string;
@@ -1806,4 +1854,4 @@ declare class MongoTokenStore implements IOAuthTokenStore {
1806
1854
  private ensureIndex;
1807
1855
  }
1808
1856
 
1809
- export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, type FlutchContext, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, flutchFetch, flutchHeaders, flutchMistralHook, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getFlutchContext, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isInternalMode, isReasoningModel, loadOAuthProviders, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, sanitizeTraceData, storeAttachmentData, traceApiCall, withFlutchContext, wrapCohereFetcher };
1857
+ export { type ACLValidationResult, AbstractGraphBuilder, type ApiCallTracerOptions, type ApiKeyResolver, AttachmentType, type AuditEntry, type BaseGraphConfig, type BaseGraphContext, GraphController as BaseGraphServiceController, UniversalGraphModule as BaseGraphServiceModule, type BaseGraphState, BuilderRegistryService, Callback, CallbackACL, CallbackAuditAction, CallbackAuditor, type CallbackContext, CallbackController, type CallbackEntry, type CallbackHandler, type CallbackMetadata, CallbackMetrics, type CallbackPatch, type CallbackPatchHandler, CallbackPatchService, CallbackRateLimiter, type CallbackRecord, CallbackRegistry, type CallbackRequest, type CallbackResult, CallbackStore, CallbackTokenGuard, type CallbackUser, type ChannelState, type ChartType, ChatFeature, type ChatModelCreator, type ChatModelOrRunnable, type ChatModelWithTools, type CitationValue, type CompiledGraphFor, type CustomDocument, DEFAULT_ATTACHMENT_THRESHOLD, DEFAULT_ROUTER_URL, DEFAULT_TRACER_OPTIONS, type DataEnvelope, ENDPOINT_METADATA_KEY, type EmbeddingModelCreator, Endpoint, type EndpointDescriptor, type EndpointHandler, type EndpointMetadata, type EndpointOptions, EndpointRegistry, EventProcessor, type ExecuteToolWithAttachmentsParams, type ExecuteToolWithAttachmentsResult, type ExtendedCallbackContext, type ExtendedCallbackHandler, ExternalGraphBuilder, FileBasedDiscovery, FileTokenStore, FlutchChatBedrockConverse, type FlutchContext, GraphController, GraphEngineFactory, GraphEngineType, GraphManifestSchema, GraphManifestValidator, GraphServiceTokens, GraphTypeUtils, type IAgentToolConfig, type IAgentToolConfiguration, type IAttachment, type IBaseEntity, type IChartDataPoint, type IChartDataset, type IChartValue, type IContentBlock, type IContentChain, type IDeletionInfo, type IGenericGraphType, type IGraphAttachment, type IGraphBuilder, type IGraphCompiler, type IGraphConfigurable, type IGraphEngine, type IGraphLogger, type IGraphManifest, type IGraphMetadata, type IGraphMetadataRegistry, type IGraphRequestPayload, type IGraphResponsePayload, type IGraphRunnableConfig, type IGraphService, type IGraphServiceRegistry, type IGraphSettingsRepository, type IGraphTraceEvent, type IGraphTracer, type IGraphTypeMetadata, type IGraphTypeRegistry, type ILangGraphConfig, type IModelInitializer, type IOAuthTokenStore, type IReasoningChain, type IReasoningStep, type IStoredMessageContent, type ISystemToolCredentials, type IToolCall, type IToolCatalog, type IToolConfigOption, type IToolExecutionContext, type ITracingEvent, type IUsageMetrics, type IUsageRecorder, type IdempotencyConfig, type IdempotencyEntry, IdempotencyManager, IdempotencyStatus, type KnowledgeBaseInfo, type LLMCallRecord, type LLMConfig, type LLModel, LangGraphEngine, type LangchainReasoningBlock, type MappedChannels, McpConverter, type McpRuntimeClient, McpRuntimeHttpClient, type McpTool, McpToolFilter, type Model, type ModelByIdConfig, type ModelByIdWithTypeConfig, type ModelConfig, type ModelConfigFetcher, type ModelConfigWithToken, type ModelConfigWithTokenAndType, type ModelCreators, ModelInitializer, ModelProvider, ModelType, type MongoDBConfig, MongoTokenStore, type OAuthProviderConfig, type OAuthProviderDef, OAuthTokenManager, type OAuthTokenManagerOptions, type OAuthTokens, type PostgresConfig, type RateLimitConfig, type RateLimitResult, type RequestContext, type RerankModelCreator, type ResolvedSamplingParams, type RetrieveQueryOptions, type RetrieverConfig, RetrieverSearchType, RetrieverService, type RouterConfig, SAMPLING_PARAM_FREE_THRESHOLDS, type SamplingParams, type SanitizedHistory, type ServiceDiscoveryProvider, SmartCallbackRouter, StaticDiscovery, type StreamAccumulator, StreamChannel, type StrictGraphRunnableConfig, TelegramPatchHandler, type ToolConfig, type ToolExecutionResult, type TraceApiCallResult, type TracingLevel, UIDispatchController, type UIDispatchDto, UIEndpoint, type UIEndpointClassMetadata, type UIEndpointMethodMetadata, UIEndpointsDiscoveryService, UniversalCallbackService, UniversalGraphModule, type UniversalGraphModuleOptions, UniversalGraphService, type VersionResolution, type VersionResolutionOptions, type VersionRoute, VersionedGraphService, type VersioningConfig, VoyageAIRerank, type VoyageAIRerankConfig, WebPatchHandler, WithCallbacks, WithEndpoints, WithUIEndpoints, _internals, bootstrap, buildOAuthAuthorizationUrl, buildOpenAIModelConfig, clearAttachmentDataStore, createEndpointDescriptors, createGraphAttachment, createMongoClientAdapter, createStaticMessage, decryptTokens, dispatchAttachments, encryptTokens, executeToolWithAttachments, findCallbackMethod, findEndpointMethod, flutchFetch, flutchHeaders, flutchMistralHook, generateAttachmentSummary, generateModelCacheKey, getAttachmentData, getCallbackMetadata, getEndpointMetadata, getFlutchContext, getOAuthProvider, getOAuthProviderNames, getUIEndpointClassMetadata, getUIEndpointMethodsMetadata, hasCallbacks, hasUIEndpoints, hashToolsConfig, isInternalMode, isReasoningBlock, isReasoningModel, isSendableReasoningBlock, loadOAuthProviders, modelAcceptsSamplingParams, normalizeToolConfigs, registerFinanceExampleCallback, registerUIEndpointsFromClass, resolveOAuthProviderConfig, resolveRouterURL, resolveSamplingParams, sanitizeMessageReasoning, sanitizeReasoningForBedrock, sanitizeTraceData, storeAttachmentData, toOptionalNumber, traceApiCall, withFlutchContext, wrapCohereFetcher };