illuma-agents 1.0.10 → 1.0.11
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/LICENSE +1 -1
- package/dist/cjs/agents/AgentContext.cjs +228 -27
- package/dist/cjs/agents/AgentContext.cjs.map +1 -1
- package/dist/cjs/common/enum.cjs +2 -0
- package/dist/cjs/common/enum.cjs.map +1 -1
- package/dist/cjs/events.cjs +3 -11
- package/dist/cjs/events.cjs.map +1 -1
- package/dist/cjs/graphs/Graph.cjs +27 -18
- package/dist/cjs/graphs/Graph.cjs.map +1 -1
- package/dist/cjs/instrumentation.cjs +1 -3
- package/dist/cjs/instrumentation.cjs.map +1 -1
- package/dist/cjs/llm/anthropic/index.cjs +1 -1
- package/dist/cjs/llm/anthropic/index.cjs.map +1 -1
- package/dist/cjs/llm/bedrock/index.cjs +122 -7
- package/dist/cjs/llm/bedrock/index.cjs.map +1 -1
- package/dist/cjs/llm/google/index.cjs +1 -1
- package/dist/cjs/llm/google/index.cjs.map +1 -1
- package/dist/cjs/llm/openai/index.cjs +6 -6
- package/dist/cjs/llm/openai/index.cjs.map +1 -1
- package/dist/cjs/llm/openrouter/index.cjs +1 -1
- package/dist/cjs/llm/openrouter/index.cjs.map +1 -1
- package/dist/cjs/main.cjs +18 -0
- package/dist/cjs/main.cjs.map +1 -1
- package/dist/cjs/messages/cache.cjs +149 -54
- package/dist/cjs/messages/cache.cjs.map +1 -1
- package/dist/cjs/messages/tools.cjs +85 -0
- package/dist/cjs/messages/tools.cjs.map +1 -0
- package/dist/cjs/run.cjs +0 -8
- package/dist/cjs/run.cjs.map +1 -1
- package/dist/cjs/tools/CodeExecutor.cjs +4 -0
- package/dist/cjs/tools/CodeExecutor.cjs.map +1 -1
- package/dist/cjs/tools/ProgrammaticToolCalling.cjs +438 -0
- package/dist/cjs/tools/ProgrammaticToolCalling.cjs.map +1 -0
- package/dist/cjs/tools/ToolNode.cjs +53 -15
- package/dist/cjs/tools/ToolNode.cjs.map +1 -1
- package/dist/cjs/tools/ToolSearchRegex.cjs +455 -0
- package/dist/cjs/tools/ToolSearchRegex.cjs.map +1 -0
- package/dist/cjs/tools/search/schema.cjs +7 -9
- package/dist/cjs/tools/search/schema.cjs.map +1 -1
- package/dist/cjs/utils/run.cjs +5 -1
- package/dist/cjs/utils/run.cjs.map +1 -1
- package/dist/esm/agents/AgentContext.mjs +228 -27
- package/dist/esm/agents/AgentContext.mjs.map +1 -1
- package/dist/esm/common/enum.mjs +2 -0
- package/dist/esm/common/enum.mjs.map +1 -1
- package/dist/esm/events.mjs +4 -12
- package/dist/esm/events.mjs.map +1 -1
- package/dist/esm/graphs/Graph.mjs +27 -18
- package/dist/esm/graphs/Graph.mjs.map +1 -1
- package/dist/esm/instrumentation.mjs +1 -3
- package/dist/esm/instrumentation.mjs.map +1 -1
- package/dist/esm/llm/anthropic/index.mjs +1 -1
- package/dist/esm/llm/anthropic/index.mjs.map +1 -1
- package/dist/esm/llm/bedrock/index.mjs +122 -7
- package/dist/esm/llm/bedrock/index.mjs.map +1 -1
- package/dist/esm/llm/google/index.mjs +1 -1
- package/dist/esm/llm/google/index.mjs.map +1 -1
- package/dist/esm/llm/openai/index.mjs +6 -6
- package/dist/esm/llm/openai/index.mjs.map +1 -1
- package/dist/esm/llm/openrouter/index.mjs +1 -1
- package/dist/esm/llm/openrouter/index.mjs.map +1 -1
- package/dist/esm/main.mjs +3 -0
- package/dist/esm/main.mjs.map +1 -1
- package/dist/esm/messages/cache.mjs +149 -54
- package/dist/esm/messages/cache.mjs.map +1 -1
- package/dist/esm/messages/tools.mjs +82 -0
- package/dist/esm/messages/tools.mjs.map +1 -0
- package/dist/esm/run.mjs +0 -8
- package/dist/esm/run.mjs.map +1 -1
- package/dist/esm/tools/CodeExecutor.mjs +4 -0
- package/dist/esm/tools/CodeExecutor.mjs.map +1 -1
- package/dist/esm/tools/ProgrammaticToolCalling.mjs +430 -0
- package/dist/esm/tools/ProgrammaticToolCalling.mjs.map +1 -0
- package/dist/esm/tools/ToolNode.mjs +53 -15
- package/dist/esm/tools/ToolNode.mjs.map +1 -1
- package/dist/esm/tools/ToolSearchRegex.mjs +448 -0
- package/dist/esm/tools/ToolSearchRegex.mjs.map +1 -0
- package/dist/esm/tools/search/schema.mjs +7 -9
- package/dist/esm/tools/search/schema.mjs.map +1 -1
- package/dist/esm/utils/run.mjs +5 -1
- package/dist/esm/utils/run.mjs.map +1 -1
- package/dist/types/agents/AgentContext.d.ts +65 -5
- package/dist/types/common/enum.d.ts +2 -0
- package/dist/types/graphs/Graph.d.ts +3 -2
- package/dist/types/index.d.ts +2 -0
- package/dist/types/llm/anthropic/index.d.ts +1 -1
- package/dist/types/llm/bedrock/index.d.ts +31 -4
- package/dist/types/llm/google/index.d.ts +1 -1
- package/dist/types/llm/openai/index.d.ts +3 -3
- package/dist/types/llm/openrouter/index.d.ts +1 -1
- package/dist/types/messages/cache.d.ts +23 -8
- package/dist/types/messages/index.d.ts +1 -0
- package/dist/types/messages/tools.d.ts +17 -0
- package/dist/types/test/mockTools.d.ts +28 -0
- package/dist/types/tools/ProgrammaticToolCalling.d.ts +91 -0
- package/dist/types/tools/ToolNode.d.ts +10 -2
- package/dist/types/tools/ToolSearchRegex.d.ts +80 -0
- package/dist/types/types/graph.d.ts +7 -1
- package/dist/types/types/tools.d.ts +138 -0
- package/package.json +7 -2
- package/src/agents/AgentContext.ts +267 -27
- package/src/agents/__tests__/AgentContext.test.ts +805 -0
- package/src/common/enum.ts +2 -0
- package/src/events.ts +5 -12
- package/src/graphs/Graph.ts +33 -19
- package/src/index.ts +2 -0
- package/src/instrumentation.ts +1 -4
- package/src/llm/anthropic/index.ts +2 -2
- package/src/llm/bedrock/__tests__/bedrock-caching.test.ts +473 -0
- package/src/llm/bedrock/index.ts +150 -13
- package/src/llm/google/index.ts +2 -2
- package/src/llm/openai/index.ts +9 -9
- package/src/llm/openrouter/index.ts +2 -2
- package/src/messages/__tests__/tools.test.ts +473 -0
- package/src/messages/cache.ts +163 -61
- package/src/messages/index.ts +1 -0
- package/src/messages/tools.ts +99 -0
- package/src/run.ts +0 -9
- package/src/scripts/code_exec_ptc.ts +334 -0
- package/src/scripts/image.ts +178 -0
- package/src/scripts/programmatic_exec.ts +396 -0
- package/src/scripts/programmatic_exec_agent.ts +231 -0
- package/src/scripts/test-tools-before-handoff.ts +5 -1
- package/src/scripts/tool_search_regex.ts +162 -0
- package/src/scripts/tools.ts +4 -1
- package/src/specs/thinking-prune.test.ts +52 -118
- package/src/test/mockTools.ts +366 -0
- package/src/tools/CodeExecutor.ts +4 -0
- package/src/tools/ProgrammaticToolCalling.ts +558 -0
- package/src/tools/ToolNode.ts +59 -18
- package/src/tools/ToolSearchRegex.ts +535 -0
- package/src/tools/__tests__/ProgrammaticToolCalling.integration.test.ts +318 -0
- package/src/tools/__tests__/ProgrammaticToolCalling.test.ts +853 -0
- package/src/tools/__tests__/ToolSearchRegex.integration.test.ts +161 -0
- package/src/tools/__tests__/ToolSearchRegex.test.ts +232 -0
- package/src/tools/search/jina-reranker.test.ts +16 -16
- package/src/tools/search/schema.ts +7 -9
- package/src/types/graph.ts +7 -1
- package/src/types/tools.ts +166 -0
- package/src/utils/run.ts +5 -1
- package/src/tools/search/direct-url.test.ts +0 -530
package/src/llm/bedrock/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Optimized ChatBedrockConverse wrapper that fixes contentBlockIndex conflicts
|
|
3
|
+
* and adds prompt caching support for Bedrock Converse API.
|
|
3
4
|
*
|
|
4
5
|
* Bedrock sends the same contentBlockIndex for both text and tool_use content blocks,
|
|
5
6
|
* causing LangChain's merge logic to fail with "field[contentBlockIndex] already exists"
|
|
@@ -9,28 +10,128 @@
|
|
|
9
10
|
* The contentBlockIndex field is only used internally by Bedrock's streaming protocol
|
|
10
11
|
* and isn't needed by application logic - the index field on tool_call_chunks serves
|
|
11
12
|
* the purpose of tracking tool call ordering.
|
|
13
|
+
*
|
|
14
|
+
* PROMPT CACHING:
|
|
15
|
+
* When promptCache: true is set, this wrapper adds cachePoint markers to the tools array
|
|
16
|
+
* to enable Bedrock prompt caching for tool definitions. This allows tool schemas to be
|
|
17
|
+
* cached and reused across requests, reducing latency and costs.
|
|
18
|
+
*
|
|
19
|
+
* CACHE TOKEN EXTRACTION:
|
|
20
|
+
* LangChain AWS doesn't extract cacheReadInputTokens/cacheWriteInputTokens from Bedrock's
|
|
21
|
+
* response. This wrapper adds input_token_details to usage_metadata with cache information.
|
|
12
22
|
*/
|
|
13
23
|
|
|
14
24
|
import { ChatBedrockConverse } from '@langchain/aws';
|
|
15
25
|
import type { ChatBedrockConverseInput } from '@langchain/aws';
|
|
16
26
|
import { AIMessageChunk } from '@langchain/core/messages';
|
|
17
|
-
import type { BaseMessage } from '@langchain/core/messages';
|
|
27
|
+
import type { BaseMessage, UsageMetadata } from '@langchain/core/messages';
|
|
18
28
|
import { ChatGenerationChunk } from '@langchain/core/outputs';
|
|
19
29
|
import type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
|
|
20
30
|
|
|
31
|
+
/** Extended input type with promptCache option */
|
|
32
|
+
export interface CustomChatBedrockConverseInput extends ChatBedrockConverseInput {
|
|
33
|
+
promptCache?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
export class CustomChatBedrockConverse extends ChatBedrockConverse {
|
|
22
|
-
|
|
37
|
+
promptCache: boolean;
|
|
38
|
+
|
|
39
|
+
constructor(fields?: CustomChatBedrockConverseInput) {
|
|
23
40
|
super(fields);
|
|
41
|
+
this.promptCache = fields?.promptCache ?? false;
|
|
24
42
|
}
|
|
25
43
|
|
|
26
44
|
static lc_name(): string {
|
|
27
|
-
return '
|
|
45
|
+
return 'LibreChatBedrockConverse';
|
|
28
46
|
}
|
|
29
47
|
|
|
30
48
|
/**
|
|
31
|
-
* Override
|
|
32
|
-
* This
|
|
33
|
-
*
|
|
49
|
+
* Override invocationParams to add cachePoint to tools when promptCache is enabled.
|
|
50
|
+
* This enables Bedrock prompt caching for tool definitions.
|
|
51
|
+
*
|
|
52
|
+
* STRATEGY: Separate cachePoints for core tools and MCP tools
|
|
53
|
+
* - Core tools (web_search, execute_code, etc.) are stable → cache first
|
|
54
|
+
* - MCP tools (have '_mcp_' in name) are dynamic → cache separately after
|
|
55
|
+
* - This allows core tools to stay cached when MCP selection changes
|
|
56
|
+
*
|
|
57
|
+
* NOTE: Only Claude models support cachePoint - Nova and other models will reject it.
|
|
58
|
+
*/
|
|
59
|
+
invocationParams(
|
|
60
|
+
options?: this['ParsedCallOptions']
|
|
61
|
+
): ReturnType<ChatBedrockConverse['invocationParams']> {
|
|
62
|
+
const params = super.invocationParams(options);
|
|
63
|
+
|
|
64
|
+
// Add cachePoint to tools array if promptCache is enabled and tools exist
|
|
65
|
+
// Only Claude models support cachePoint - check model name
|
|
66
|
+
const modelId = this.model?.toLowerCase() ?? '';
|
|
67
|
+
const isClaudeModel = modelId.includes('claude') || modelId.includes('anthropic');
|
|
68
|
+
|
|
69
|
+
if (
|
|
70
|
+
this.promptCache &&
|
|
71
|
+
isClaudeModel &&
|
|
72
|
+
params.toolConfig?.tools &&
|
|
73
|
+
Array.isArray(params.toolConfig.tools) &&
|
|
74
|
+
params.toolConfig.tools.length > 0
|
|
75
|
+
) {
|
|
76
|
+
// Separate core tools from MCP tools
|
|
77
|
+
// MCP tools have '_mcp_' in their name (e.g., 'search_emails_mcp_Google-Workspace')
|
|
78
|
+
const coreTools: typeof params.toolConfig.tools = [];
|
|
79
|
+
const mcpTools: typeof params.toolConfig.tools = [];
|
|
80
|
+
const coreToolNames: string[] = [];
|
|
81
|
+
const mcpToolNames: string[] = [];
|
|
82
|
+
|
|
83
|
+
for (const tool of params.toolConfig.tools) {
|
|
84
|
+
// Check if tool has a name property with '_mcp_' pattern
|
|
85
|
+
const toolName = (tool as { toolSpec?: { name?: string } })?.toolSpec?.name ?? '';
|
|
86
|
+
if (toolName.includes('_mcp_')) {
|
|
87
|
+
mcpTools.push(tool);
|
|
88
|
+
mcpToolNames.push(toolName);
|
|
89
|
+
} else {
|
|
90
|
+
coreTools.push(tool);
|
|
91
|
+
coreToolNames.push(toolName);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Always log cache structure (INFO level for tracking)
|
|
96
|
+
console.log(`[Cache] 🔧 Tools | Core: [${coreToolNames.join(', ')}] (${coreTools.length}) | MCP: [${mcpToolNames.join(', ')}] (${mcpTools.length})`);
|
|
97
|
+
|
|
98
|
+
// Build tools array with strategic cachePoints:
|
|
99
|
+
// [CoreTool1, CoreTool2, cachePoint] + [MCPTool1, MCPTool2, cachePoint]
|
|
100
|
+
const toolsWithCache: typeof params.toolConfig.tools = [];
|
|
101
|
+
let cachePointCount = 0;
|
|
102
|
+
|
|
103
|
+
// Add core tools with cachePoint (if any)
|
|
104
|
+
if (coreTools.length > 0) {
|
|
105
|
+
toolsWithCache.push(...coreTools);
|
|
106
|
+
toolsWithCache.push({ cachePoint: { type: 'default' } });
|
|
107
|
+
cachePointCount++;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Add MCP tools with their own cachePoint (if any)
|
|
111
|
+
if (mcpTools.length > 0) {
|
|
112
|
+
toolsWithCache.push(...mcpTools);
|
|
113
|
+
toolsWithCache.push({ cachePoint: { type: 'default' } });
|
|
114
|
+
cachePointCount++;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// If no tools at all (shouldn't happen but safety check)
|
|
118
|
+
if (toolsWithCache.length === 0) {
|
|
119
|
+
toolsWithCache.push({ cachePoint: { type: 'default' } });
|
|
120
|
+
cachePointCount++;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
console.log(`[Cache] 📍 Tool cachePoints: ${cachePointCount} | Order: [${coreToolNames.length > 0 ? 'CoreTools→CP' : ''}${mcpToolNames.length > 0 ? '→MCPTools→CP' : ''}]`);
|
|
124
|
+
|
|
125
|
+
params.toolConfig.tools = toolsWithCache;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return params;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Override _streamResponseChunks to:
|
|
133
|
+
* 1. Strip contentBlockIndex from response_metadata to prevent merge conflicts
|
|
134
|
+
* 2. Extract cacheReadInputTokens/cacheWriteInputTokens and add to usage_metadata
|
|
34
135
|
*/
|
|
35
136
|
async *_streamResponseChunks(
|
|
36
137
|
messages: BaseMessage[],
|
|
@@ -50,21 +151,57 @@ export class CustomChatBedrockConverse extends ChatBedrockConverse {
|
|
|
50
151
|
(chunk.message as Partial<AIMessageChunk>).response_metadata &&
|
|
51
152
|
typeof chunk.message.response_metadata === 'object'
|
|
52
153
|
) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
);
|
|
154
|
+
const responseMetadata = chunk.message.response_metadata as Record<string, unknown>;
|
|
155
|
+
let needsModification = false;
|
|
156
|
+
let cleanedMetadata = responseMetadata;
|
|
57
157
|
|
|
158
|
+
// Check if contentBlockIndex exists anywhere in response_metadata
|
|
159
|
+
const hasContentBlockIndex = this.hasContentBlockIndex(responseMetadata);
|
|
58
160
|
if (hasContentBlockIndex) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
161
|
+
cleanedMetadata = this.removeContentBlockIndex(responseMetadata) as Record<string, unknown>;
|
|
162
|
+
needsModification = true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Extract cache tokens from metadata.usage (Bedrock streaming format)
|
|
166
|
+
// The metadata chunk contains usage with cacheReadInputTokens/cacheWriteInputTokens
|
|
167
|
+
const metadata = responseMetadata.metadata as Record<string, unknown> | undefined;
|
|
168
|
+
const usage = (metadata?.usage ?? responseMetadata.usage) as Record<string, unknown> | undefined;
|
|
169
|
+
|
|
170
|
+
let enhancedUsageMetadata: UsageMetadata | undefined = chunk.message.usage_metadata;
|
|
171
|
+
|
|
172
|
+
if (usage) {
|
|
173
|
+
const cacheRead = (usage.cacheReadInputTokens as number) ?? 0;
|
|
174
|
+
const cacheWrite = (usage.cacheWriteInputTokens as number) ?? 0;
|
|
175
|
+
const inputTokens = (usage.inputTokens as number) ?? 0;
|
|
176
|
+
const outputTokens = (usage.outputTokens as number) ?? 0;
|
|
177
|
+
|
|
178
|
+
if (cacheRead > 0 || cacheWrite > 0) {
|
|
179
|
+
// Always log cache results for tracking
|
|
180
|
+
const cacheStatus = cacheRead > 0 && cacheWrite === 0 ? '✅ HIT' :
|
|
181
|
+
cacheWrite > 0 && cacheRead === 0 ? '📝 WRITE' :
|
|
182
|
+
cacheRead > 0 && cacheWrite > 0 ? '🔄 PARTIAL' : '❌ MISS';
|
|
183
|
+
console.log(`[Cache] ${cacheStatus} | read=${cacheRead} | write=${cacheWrite} | input=${inputTokens} | output=${outputTokens}`);
|
|
184
|
+
|
|
185
|
+
needsModification = true;
|
|
186
|
+
enhancedUsageMetadata = {
|
|
187
|
+
input_tokens: chunk.message.usage_metadata?.input_tokens ?? inputTokens,
|
|
188
|
+
output_tokens: chunk.message.usage_metadata?.output_tokens ?? outputTokens,
|
|
189
|
+
total_tokens: chunk.message.usage_metadata?.total_tokens ?? (usage.totalTokens as number) ?? 0,
|
|
190
|
+
input_token_details: {
|
|
191
|
+
cache_read: cacheRead,
|
|
192
|
+
cache_creation: cacheWrite,
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
}
|
|
62
197
|
|
|
198
|
+
if (needsModification) {
|
|
63
199
|
yield new ChatGenerationChunk({
|
|
64
200
|
text: chunk.text,
|
|
65
201
|
message: new AIMessageChunk({
|
|
66
202
|
...chunk.message,
|
|
67
203
|
response_metadata: cleanedMetadata,
|
|
204
|
+
usage_metadata: enhancedUsageMetadata,
|
|
68
205
|
}),
|
|
69
206
|
generationInfo: chunk.generationInfo,
|
|
70
207
|
});
|
package/src/llm/google/index.ts
CHANGED
|
@@ -122,8 +122,8 @@ export class CustomChatGoogleGenerativeAI extends ChatGoogleGenerativeAI {
|
|
|
122
122
|
this.streamUsage = fields.streamUsage ?? this.streamUsage;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
static lc_name(): '
|
|
126
|
-
return '
|
|
125
|
+
static lc_name(): 'LibreChatGoogleGenerativeAI' {
|
|
126
|
+
return 'LibreChatGoogleGenerativeAI';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/**
|
package/src/llm/openai/index.ts
CHANGED
|
@@ -211,7 +211,7 @@ export class ChatOpenAI extends OriginalChatOpenAI<t.ChatOpenAICallOptions> {
|
|
|
211
211
|
return this.client;
|
|
212
212
|
}
|
|
213
213
|
static lc_name(): string {
|
|
214
|
-
return '
|
|
214
|
+
return 'LibreChatOpenAI';
|
|
215
215
|
}
|
|
216
216
|
protected _getClientOptions(
|
|
217
217
|
options?: OpenAICoreRequestOptions
|
|
@@ -466,8 +466,8 @@ export class AzureChatOpenAI extends OriginalAzureChatOpenAI {
|
|
|
466
466
|
public get exposedClient(): CustomOpenAIClient {
|
|
467
467
|
return this.client;
|
|
468
468
|
}
|
|
469
|
-
static lc_name(): '
|
|
470
|
-
return '
|
|
469
|
+
static lc_name(): 'LibreChatAzureOpenAI' {
|
|
470
|
+
return 'LibreChatAzureOpenAI';
|
|
471
471
|
}
|
|
472
472
|
/**
|
|
473
473
|
* Returns backwards compatible reasoning parameters from constructor params and call options
|
|
@@ -539,8 +539,8 @@ export class AzureChatOpenAI extends OriginalAzureChatOpenAI {
|
|
|
539
539
|
...params.defaultHeaders,
|
|
540
540
|
'User-Agent':
|
|
541
541
|
defaultHeaders['User-Agent'] != null
|
|
542
|
-
? `${defaultHeaders['User-Agent']}:
|
|
543
|
-
: '
|
|
542
|
+
? `${defaultHeaders['User-Agent']}: librechat-azure-openai-v2`
|
|
543
|
+
: 'librechat-azure-openai-v2',
|
|
544
544
|
};
|
|
545
545
|
|
|
546
546
|
this.client = new CustomAzureOpenAIClient({
|
|
@@ -613,8 +613,8 @@ export class ChatDeepSeek extends OriginalChatDeepSeek {
|
|
|
613
613
|
public get exposedClient(): CustomOpenAIClient {
|
|
614
614
|
return this.client;
|
|
615
615
|
}
|
|
616
|
-
static lc_name(): '
|
|
617
|
-
return '
|
|
616
|
+
static lc_name(): 'LibreChatDeepSeek' {
|
|
617
|
+
return 'LibreChatDeepSeek';
|
|
618
618
|
}
|
|
619
619
|
protected _getClientOptions(
|
|
620
620
|
options?: OpenAICoreRequestOptions
|
|
@@ -814,8 +814,8 @@ export class ChatXAI extends OriginalChatXAI {
|
|
|
814
814
|
}
|
|
815
815
|
}
|
|
816
816
|
|
|
817
|
-
static lc_name(): '
|
|
818
|
-
return '
|
|
817
|
+
static lc_name(): 'LibreChatXAI' {
|
|
818
|
+
return 'LibreChatXAI';
|
|
819
819
|
}
|
|
820
820
|
|
|
821
821
|
public get exposedClient(): CustomOpenAIClient {
|
|
@@ -44,8 +44,8 @@ export class ChatOpenRouter extends ChatOpenAI {
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
static lc_name(): '
|
|
48
|
-
return '
|
|
47
|
+
static lc_name(): 'LibreChatOpenRouter' {
|
|
48
|
+
return 'LibreChatOpenRouter';
|
|
49
49
|
}
|
|
50
50
|
protected override _convertOpenAIDeltaToBaseMessageChunk(
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|