@librechat/agents-types 2.3.94 → 2.3.96

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.
Files changed (2) hide show
  1. package/llm.ts +40 -24
  2. package/package.json +1 -1
package/llm.ts CHANGED
@@ -8,9 +8,20 @@ import { ChatBedrockConverse } from '@langchain/aws';
8
8
  import { ChatVertexAI } from '@langchain/google-vertexai';
9
9
  import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
10
10
  import { BedrockChat } from '@langchain/community/chat_models/bedrock/web';
11
- import { ChatOpenAI, AzureChatOpenAI, ClientOptions as OAIClientOptions } from '@langchain/openai';
12
- import type { BindToolsInput, BaseChatModelParams } from '@langchain/core/language_models/chat_models';
13
- import type { ChatOpenAIFields, OpenAIChatInput, AzureOpenAIInput } from '@langchain/openai';
11
+ import {
12
+ ChatOpenAI,
13
+ AzureChatOpenAI,
14
+ ClientOptions as OAIClientOptions,
15
+ } from '@langchain/openai';
16
+ import type {
17
+ BindToolsInput,
18
+ BaseChatModelParams,
19
+ } from '@langchain/core/language_models/chat_models';
20
+ import type {
21
+ ChatOpenAIFields,
22
+ OpenAIChatInput,
23
+ AzureOpenAIInput,
24
+ } from '@langchain/openai';
14
25
  import type { BedrockChatFields } from '@langchain/community/chat_models/bedrock/web';
15
26
  import type { GoogleGenerativeAIChatInput } from '@langchain/google-genai';
16
27
  import type { ChatVertexAIInput } from '@langchain/google-vertexai';
@@ -27,16 +38,19 @@ import type { ChatOpenRouterCallOptions } from '@/llm/openrouter/llm';
27
38
  import { ChatOpenRouter } from '@/llm/openrouter/llm';
28
39
  import { Providers } from '@/common';
29
40
 
30
- export type AzureClientOptions = (Partial<OpenAIChatInput> & Partial<AzureOpenAIInput> & {
31
- openAIApiKey?: string;
32
- openAIApiVersion?: string;
33
- openAIBasePath?: string;
34
- deploymentName?: string;
35
- } & BaseChatModelParams & {
36
- configuration?: OAIClientOptions;
37
- });
41
+ export type AzureClientOptions = Partial<OpenAIChatInput> &
42
+ Partial<AzureOpenAIInput> & {
43
+ openAIApiKey?: string;
44
+ openAIApiVersion?: string;
45
+ openAIBasePath?: string;
46
+ deploymentName?: string;
47
+ } & BaseChatModelParams & {
48
+ configuration?: OAIClientOptions;
49
+ };
38
50
  export type ThinkingConfig = AnthropicInput['thinking'];
39
- export type ChatOpenAIToolType = BindToolsInput | OpenAIClient.ChatCompletionTool;
51
+ export type ChatOpenAIToolType =
52
+ | BindToolsInput
53
+ | OpenAIClient.ChatCompletionTool;
40
54
  export type CommonToolType = StructuredTool | ChatOpenAIToolType;
41
55
  export type AnthropicReasoning = {
42
56
  thinking?: ThinkingConfig | boolean;
@@ -58,17 +72,17 @@ export type DeepSeekClientOptions = ChatDeepSeekCallOptions;
58
72
  export type XAIClientOptions = ChatXAIInput;
59
73
 
60
74
  export type ClientOptions =
61
- | OpenAIClientOptions
62
- | AzureClientOptions
63
- | OllamaClientOptions
64
- | AnthropicClientOptions
65
- | MistralAIClientOptions
66
- | VertexAIClientOptions
67
- | BedrockClientOptions
68
- | BedrockConverseClientOptions
69
- | GoogleClientOptions
70
- | DeepSeekClientOptions
71
- | XAIClientOptions;
75
+ | OpenAIClientOptions
76
+ | AzureClientOptions
77
+ | OllamaClientOptions
78
+ | AnthropicClientOptions
79
+ | MistralAIClientOptions
80
+ | VertexAIClientOptions
81
+ | BedrockClientOptions
82
+ | BedrockConverseClientOptions
83
+ | GoogleClientOptions
84
+ | DeepSeekClientOptions
85
+ | XAIClientOptions;
72
86
 
73
87
  export type LLMConfig = {
74
88
  provider: Providers;
@@ -83,6 +97,7 @@ export type ProviderOptionsMap = {
83
97
  [Providers.DEEPSEEK]: DeepSeekClientOptions;
84
98
  [Providers.ANTHROPIC]: AnthropicClientOptions;
85
99
  [Providers.MISTRALAI]: MistralAIClientOptions;
100
+ [Providers.MISTRAL]: MistralAIClientOptions;
86
101
  [Providers.OPENROUTER]: ChatOpenRouterCallOptions;
87
102
  [Providers.BEDROCK_LEGACY]: BedrockClientOptions;
88
103
  [Providers.BEDROCK]: BedrockConverseClientOptions;
@@ -97,6 +112,7 @@ export type ChatModelMap = {
97
112
  [Providers.VERTEXAI]: ChatVertexAI;
98
113
  [Providers.ANTHROPIC]: ChatAnthropic;
99
114
  [Providers.MISTRALAI]: ChatMistralAI;
115
+ [Providers.MISTRAL]: ChatMistralAI;
100
116
  [Providers.OPENROUTER]: ChatOpenRouter;
101
117
  [Providers.BEDROCK_LEGACY]: BedrockChat;
102
118
  [Providers.BEDROCK]: ChatBedrockConverse;
@@ -112,4 +128,4 @@ export type ChatModelInstance = ChatModelMap[Providers];
112
128
 
113
129
  export type ModelWithTools = ChatModelInstance & {
114
130
  bindTools(tools: CommonToolType[]): Runnable;
115
- }
131
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@librechat/agents-types",
3
- "version": "2.3.94",
3
+ "version": "2.3.96",
4
4
  "description": "Type definitions for @librechat/agents",
5
5
  "types": "index.d.ts",
6
6
  "scripts": {