@dexto/core 1.5.7 → 1.5.8
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/agent/DextoAgent.cjs +96 -5
- package/dist/agent/DextoAgent.d.ts +32 -7
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +96 -5
- package/dist/agent/schemas.cjs +5 -0
- package/dist/agent/schemas.d.ts +60 -21
- package/dist/agent/schemas.d.ts.map +1 -1
- package/dist/agent/schemas.js +5 -0
- package/dist/context/manager.cjs +1 -1
- package/dist/context/manager.js +1 -1
- package/dist/context/utils.cjs +69 -42
- package/dist/context/utils.d.ts.map +1 -1
- package/dist/context/utils.js +69 -42
- package/dist/events/index.cjs +4 -1
- package/dist/events/index.d.ts +37 -2
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +4 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/llm/curation-config.cjs +82 -0
- package/dist/llm/curation-config.d.ts +13 -0
- package/dist/llm/curation-config.d.ts.map +1 -0
- package/dist/llm/curation-config.js +59 -0
- package/dist/llm/curation.cjs +57 -0
- package/dist/llm/curation.d.ts +16 -0
- package/dist/llm/curation.d.ts.map +1 -0
- package/dist/llm/curation.js +34 -0
- package/dist/llm/errors.cjs +1 -1
- package/dist/llm/errors.d.ts +8 -8
- package/dist/llm/errors.js +1 -1
- package/dist/llm/executor/provider-options.cjs +1 -1
- package/dist/llm/executor/provider-options.js +1 -1
- package/dist/llm/executor/turn-executor.cjs +8 -2
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +8 -2
- package/dist/llm/index.cjs +14 -3
- package/dist/llm/index.d.ts +3 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +13 -2
- package/dist/llm/registry/auto-update.cjs +263 -0
- package/dist/llm/registry/auto-update.d.ts +27 -0
- package/dist/llm/registry/auto-update.d.ts.map +1 -0
- package/dist/llm/registry/auto-update.js +227 -0
- package/dist/llm/registry/index.cjs +806 -0
- package/dist/llm/{registry.d.ts → registry/index.d.ts} +19 -41
- package/dist/llm/registry/index.d.ts.map +1 -0
- package/dist/llm/registry/index.js +756 -0
- package/dist/llm/registry/models.generated.cjs +4861 -0
- package/dist/llm/registry/models.generated.d.ts +431 -0
- package/dist/llm/registry/models.generated.d.ts.map +1 -0
- package/dist/llm/registry/models.generated.js +4838 -0
- package/dist/llm/registry/models.manual.cjs +44 -0
- package/dist/llm/registry/models.manual.d.ts +22 -0
- package/dist/llm/registry/models.manual.d.ts.map +1 -0
- package/dist/llm/registry/models.manual.js +21 -0
- package/dist/llm/registry/sync.cjs +354 -0
- package/dist/llm/registry/sync.d.ts +41 -0
- package/dist/llm/registry/sync.d.ts.map +1 -0
- package/dist/llm/registry/sync.js +328 -0
- package/dist/llm/resolver.cjs +27 -18
- package/dist/llm/resolver.d.ts +1 -1
- package/dist/llm/resolver.d.ts.map +1 -1
- package/dist/llm/resolver.js +28 -20
- package/dist/llm/schemas.cjs +13 -1
- package/dist/llm/schemas.d.ts +23 -23
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +14 -1
- package/dist/llm/services/factory.cjs +4 -4
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +4 -4
- package/dist/llm/services/test-utils.integration.cjs +1 -1
- package/dist/llm/services/test-utils.integration.js +1 -1
- package/dist/llm/services/vercel.cjs +4 -1
- package/dist/llm/services/vercel.d.ts +1 -0
- package/dist/llm/services/vercel.d.ts.map +1 -1
- package/dist/llm/services/vercel.js +4 -1
- package/dist/llm/types.cjs +1 -1
- package/dist/llm/types.d.ts +1 -1
- package/dist/llm/types.d.ts.map +1 -1
- package/dist/llm/types.js +1 -1
- package/dist/llm/validation.cjs +1 -1
- package/dist/llm/validation.js +1 -1
- package/dist/resources/handlers/filesystem-handler.cjs +25 -0
- package/dist/resources/handlers/filesystem-handler.d.ts +1 -0
- package/dist/resources/handlers/filesystem-handler.d.ts.map +1 -1
- package/dist/resources/handlers/filesystem-handler.js +25 -0
- package/dist/session/chat-session.cjs +1 -1
- package/dist/session/chat-session.js +1 -1
- package/dist/session/message-queue.cjs +29 -5
- package/dist/session/message-queue.d.ts +3 -1
- package/dist/session/message-queue.d.ts.map +1 -1
- package/dist/session/message-queue.js +29 -5
- package/dist/session/session-manager.cjs +40 -3
- package/dist/session/session-manager.d.ts +3 -1
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +30 -3
- package/dist/session/types.d.ts +1 -0
- package/dist/session/types.d.ts.map +1 -1
- package/dist/tools/internal-tools/provider.d.ts +3 -1
- package/dist/tools/internal-tools/provider.d.ts.map +1 -1
- package/dist/tools/internal-tools/registry.d.ts +1 -1
- package/dist/tools/internal-tools/registry.d.ts.map +1 -1
- package/dist/tools/tool-call-metadata.cjs +75 -0
- package/dist/tools/tool-call-metadata.d.ts +16 -0
- package/dist/tools/tool-call-metadata.d.ts.map +1 -0
- package/dist/tools/tool-call-metadata.js +51 -0
- package/dist/tools/tool-manager.cjs +257 -30
- package/dist/tools/tool-manager.d.ts +43 -2
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +257 -30
- package/dist/utils/api-key-resolver.cjs +1 -1
- package/dist/utils/api-key-resolver.js +1 -1
- package/dist/utils/env.cjs +49 -0
- package/dist/utils/env.d.ts +4 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +24 -0
- package/dist/utils/index.cjs +3 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/service-initializer.cjs +17 -5
- package/dist/utils/service-initializer.d.ts +23 -4
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/dist/utils/service-initializer.js +17 -5
- package/package.json +6 -2
- package/dist/llm/registry.cjs +0 -2075
- package/dist/llm/registry.d.ts.map +0 -1
- package/dist/llm/registry.js +0 -2025
package/dist/llm/schemas.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export interface LLMValidationOptions {
|
|
|
21
21
|
}
|
|
22
22
|
/** Business rules + compatibility checks */
|
|
23
23
|
export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
24
|
-
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"]>;
|
|
24
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
25
25
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
26
26
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
27
27
|
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -33,7 +33,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
33
33
|
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
34
34
|
}, "strict", z.ZodTypeAny, {
|
|
35
35
|
model: string;
|
|
36
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
36
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
37
37
|
apiKey?: string | undefined;
|
|
38
38
|
maxInputTokens?: number | undefined;
|
|
39
39
|
maxIterations?: number | undefined;
|
|
@@ -44,7 +44,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
44
44
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
45
45
|
}, {
|
|
46
46
|
model: string;
|
|
47
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
47
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
48
48
|
apiKey?: string | undefined;
|
|
49
49
|
maxInputTokens?: number | undefined;
|
|
50
50
|
maxIterations?: number | undefined;
|
|
@@ -61,7 +61,7 @@ export declare const LLMConfigBaseSchema: z.ZodObject<{
|
|
|
61
61
|
* When false, allows missing credentials for interactive configuration.
|
|
62
62
|
*/
|
|
63
63
|
export declare function createLLMConfigSchema(options?: LLMValidationOptions): z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
64
|
-
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"]>;
|
|
64
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
65
65
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
66
66
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
67
67
|
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -73,7 +73,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
73
73
|
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
74
74
|
}, "strict", z.ZodTypeAny, {
|
|
75
75
|
model: string;
|
|
76
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
76
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
77
77
|
apiKey?: string | undefined;
|
|
78
78
|
maxInputTokens?: number | undefined;
|
|
79
79
|
maxIterations?: number | undefined;
|
|
@@ -84,7 +84,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
84
84
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
85
85
|
}, {
|
|
86
86
|
model: string;
|
|
87
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
87
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
88
88
|
apiKey?: string | undefined;
|
|
89
89
|
maxInputTokens?: number | undefined;
|
|
90
90
|
maxIterations?: number | undefined;
|
|
@@ -95,7 +95,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
95
95
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
96
96
|
}>, {
|
|
97
97
|
model: string;
|
|
98
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
98
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
99
99
|
apiKey?: string | undefined;
|
|
100
100
|
maxInputTokens?: number | undefined;
|
|
101
101
|
maxIterations?: number | undefined;
|
|
@@ -106,7 +106,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
106
106
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
107
107
|
}, {
|
|
108
108
|
model: string;
|
|
109
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
109
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
110
110
|
apiKey?: string | undefined;
|
|
111
111
|
maxInputTokens?: number | undefined;
|
|
112
112
|
maxIterations?: number | undefined;
|
|
@@ -121,7 +121,7 @@ export declare function createLLMConfigSchema(options?: LLMValidationOptions): z
|
|
|
121
121
|
* Use createLLMConfigSchema({ strict: false }) for relaxed validation.
|
|
122
122
|
*/
|
|
123
123
|
export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
124
|
-
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"]>;
|
|
124
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
125
125
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
126
126
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
127
127
|
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -133,7 +133,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
133
133
|
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
134
134
|
}, "strict", z.ZodTypeAny, {
|
|
135
135
|
model: string;
|
|
136
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
136
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
137
137
|
apiKey?: string | undefined;
|
|
138
138
|
maxInputTokens?: number | undefined;
|
|
139
139
|
maxIterations?: number | undefined;
|
|
@@ -144,7 +144,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
144
144
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
145
145
|
}, {
|
|
146
146
|
model: string;
|
|
147
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
147
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
148
148
|
apiKey?: string | undefined;
|
|
149
149
|
maxInputTokens?: number | undefined;
|
|
150
150
|
maxIterations?: number | undefined;
|
|
@@ -155,7 +155,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
155
155
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
156
156
|
}>, {
|
|
157
157
|
model: string;
|
|
158
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
158
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
159
159
|
apiKey?: string | undefined;
|
|
160
160
|
maxInputTokens?: number | undefined;
|
|
161
161
|
maxIterations?: number | undefined;
|
|
@@ -166,7 +166,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
166
166
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
167
167
|
}, {
|
|
168
168
|
model: string;
|
|
169
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
169
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
170
170
|
apiKey?: string | undefined;
|
|
171
171
|
maxInputTokens?: number | undefined;
|
|
172
172
|
maxIterations?: number | undefined;
|
|
@@ -181,7 +181,7 @@ export declare const LLMConfigSchema: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
|
181
181
|
* Use this for interactive modes (CLI, WebUI) where users can configure later.
|
|
182
182
|
*/
|
|
183
183
|
export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObject<{
|
|
184
|
-
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"]>;
|
|
184
|
+
provider: z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>;
|
|
185
185
|
model: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
186
186
|
apiKey: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
187
187
|
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -193,7 +193,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
193
193
|
reasoningEffort: z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>;
|
|
194
194
|
}, "strict", z.ZodTypeAny, {
|
|
195
195
|
model: string;
|
|
196
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
196
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
197
197
|
apiKey?: string | undefined;
|
|
198
198
|
maxInputTokens?: number | undefined;
|
|
199
199
|
maxIterations?: number | undefined;
|
|
@@ -204,7 +204,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
204
204
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
205
205
|
}, {
|
|
206
206
|
model: string;
|
|
207
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
207
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
208
208
|
apiKey?: string | undefined;
|
|
209
209
|
maxInputTokens?: number | undefined;
|
|
210
210
|
maxIterations?: number | undefined;
|
|
@@ -215,7 +215,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
215
215
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
216
216
|
}>, {
|
|
217
217
|
model: string;
|
|
218
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
218
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
219
219
|
apiKey?: string | undefined;
|
|
220
220
|
maxInputTokens?: number | undefined;
|
|
221
221
|
maxIterations?: number | undefined;
|
|
@@ -226,7 +226,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
226
226
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
227
227
|
}, {
|
|
228
228
|
model: string;
|
|
229
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto";
|
|
229
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
230
230
|
apiKey?: string | undefined;
|
|
231
231
|
maxInputTokens?: number | undefined;
|
|
232
232
|
maxIterations?: number | undefined;
|
|
@@ -239,7 +239,7 @@ export declare const LLMConfigSchemaRelaxed: z.ZodBranded<z.ZodEffects<z.ZodObje
|
|
|
239
239
|
export type LLMConfig = z.input<typeof LLMConfigSchema>;
|
|
240
240
|
export type ValidatedLLMConfig = z.output<typeof LLMConfigSchema>;
|
|
241
241
|
export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
242
|
-
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"]>>;
|
|
242
|
+
provider: z.ZodOptional<z.ZodEnum<["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"]>>;
|
|
243
243
|
model: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
244
244
|
apiKey: z.ZodOptional<z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>>;
|
|
245
245
|
maxIterations: z.ZodOptional<z.ZodNumber>;
|
|
@@ -251,7 +251,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
251
251
|
reasoningEffort: z.ZodOptional<z.ZodOptional<z.ZodEnum<["none", "minimal", "low", "medium", "high", "xhigh"]>>>;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
253
253
|
model?: string | undefined;
|
|
254
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto" | undefined;
|
|
254
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
255
255
|
apiKey?: string | undefined;
|
|
256
256
|
maxInputTokens?: number | undefined;
|
|
257
257
|
maxIterations?: number | undefined;
|
|
@@ -262,7 +262,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
262
262
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
263
263
|
}, {
|
|
264
264
|
model?: string | undefined;
|
|
265
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto" | undefined;
|
|
265
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
266
266
|
apiKey?: string | undefined;
|
|
267
267
|
maxInputTokens?: number | undefined;
|
|
268
268
|
maxIterations?: number | undefined;
|
|
@@ -273,7 +273,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
273
273
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
274
274
|
}>, {
|
|
275
275
|
model?: string | undefined;
|
|
276
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto" | undefined;
|
|
276
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
277
277
|
apiKey?: string | undefined;
|
|
278
278
|
maxInputTokens?: number | undefined;
|
|
279
279
|
maxIterations?: number | undefined;
|
|
@@ -284,7 +284,7 @@ export declare const LLMUpdatesSchema: z.ZodEffects<z.ZodObject<{
|
|
|
284
284
|
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
285
285
|
}, {
|
|
286
286
|
model?: string | undefined;
|
|
287
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto" | undefined;
|
|
287
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
288
288
|
apiKey?: string | undefined;
|
|
289
289
|
maxInputTokens?: number | undefined;
|
|
290
290
|
maxIterations?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/llm/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../src/llm/schemas.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AA0ED,4CAA4C;AAG5C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBnB,CAAC;AAEd;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,oBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA6JvE;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA0C,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAA2C,CAAC;AAG/E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAIlE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYvB,CAAC;AACP,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/llm/schemas.js
CHANGED
|
@@ -10,11 +10,12 @@ import {
|
|
|
10
10
|
requiresBaseURL,
|
|
11
11
|
acceptsAnyModel,
|
|
12
12
|
supportsCustomModels,
|
|
13
|
+
hasAllRegistryModelsSupport,
|
|
13
14
|
getSupportedModels,
|
|
14
15
|
isValidProviderModel,
|
|
15
16
|
getMaxInputTokensForModel,
|
|
16
17
|
requiresApiKey
|
|
17
|
-
} from "./registry.js";
|
|
18
|
+
} from "./registry/index.js";
|
|
18
19
|
import { LLM_PROVIDERS } from "./types.js";
|
|
19
20
|
const LLMConfigFields = {
|
|
20
21
|
provider: z.enum(LLM_PROVIDERS).describe("LLM provider (e.g., 'openai', 'anthropic', 'google', 'groq')"),
|
|
@@ -67,6 +68,18 @@ function createLLMConfigSchema(options = {}) {
|
|
|
67
68
|
return LLMConfigBaseSchema.superRefine((data, ctx) => {
|
|
68
69
|
const baseURLIsSet = data.baseURL != null && data.baseURL.trim() !== "";
|
|
69
70
|
const maxInputTokensIsSet = data.maxInputTokens != null;
|
|
71
|
+
if (hasAllRegistryModelsSupport(data.provider) && !data.model.includes("/")) {
|
|
72
|
+
ctx.addIssue({
|
|
73
|
+
code: z.ZodIssueCode.custom,
|
|
74
|
+
path: ["model"],
|
|
75
|
+
message: `Provider '${data.provider}' requires OpenRouter-format model IDs (e.g. 'openai/gpt-5-mini' or 'anthropic/claude-sonnet-4.5'). You provided '${data.model}'.`,
|
|
76
|
+
params: {
|
|
77
|
+
code: LLMErrorCode.MODEL_INCOMPATIBLE,
|
|
78
|
+
scope: ErrorScope.LLM,
|
|
79
|
+
type: ErrorType.USER
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
}
|
|
70
83
|
if (strict && requiresApiKey(data.provider) && !data.apiKey?.trim()) {
|
|
71
84
|
const primaryVar = getPrimaryApiKeyEnvVar(data.provider);
|
|
72
85
|
ctx.addIssue({
|
|
@@ -34,7 +34,7 @@ var import_amazon_bedrock = require("@ai-sdk/amazon-bedrock");
|
|
|
34
34
|
var import_vercel = require("./vercel.js");
|
|
35
35
|
var import_cohere = require("@ai-sdk/cohere");
|
|
36
36
|
var import_ai_sdk_adapter = require("../providers/local/ai-sdk-adapter.js");
|
|
37
|
-
var import_registry = require("../registry.js");
|
|
37
|
+
var import_registry = require("../registry/index.js");
|
|
38
38
|
var import_api_key_resolver = require("../../utils/api-key-resolver.js");
|
|
39
39
|
const DEXTO_GATEWAY_HEADERS = {
|
|
40
40
|
SESSION_ID: "X-Dexto-Session-ID",
|
|
@@ -50,7 +50,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
50
50
|
}
|
|
51
51
|
switch (provider.toLowerCase()) {
|
|
52
52
|
case "openai": {
|
|
53
|
-
return (0, import_openai.createOpenAI)({ apiKey: apiKey ?? "" })(model);
|
|
53
|
+
return (0, import_openai.createOpenAI)({ apiKey: apiKey ?? "" }).responses(model);
|
|
54
54
|
}
|
|
55
55
|
case "openai-compatible": {
|
|
56
56
|
const compatibleBaseURL = baseURL?.replace(/\/$/, "") || process.env.OPENAI_BASE_URL?.replace(/\/$/, "");
|
|
@@ -61,7 +61,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
61
61
|
}
|
|
62
62
|
case "openrouter": {
|
|
63
63
|
const orBaseURL = baseURL || "https://openrouter.ai/api/v1";
|
|
64
|
-
return (0, import_openai.createOpenAI)({ apiKey: apiKey ?? "", baseURL: orBaseURL }).
|
|
64
|
+
return (0, import_openai.createOpenAI)({ apiKey: apiKey ?? "", baseURL: orBaseURL }).responses(model);
|
|
65
65
|
}
|
|
66
66
|
case "minimax": {
|
|
67
67
|
const minimaxBaseURL = baseURL || "https://api.minimax.chat/v1";
|
|
@@ -81,7 +81,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
81
81
|
const glamaBaseURL = "https://glama.ai/api/gateway/openai/v1";
|
|
82
82
|
return (0, import_openai.createOpenAI)({ apiKey: apiKey ?? "", baseURL: glamaBaseURL }).chat(model);
|
|
83
83
|
}
|
|
84
|
-
case "dexto": {
|
|
84
|
+
case "dexto-nova": {
|
|
85
85
|
const dextoBaseURL = "https://api.dexto.ai/v1";
|
|
86
86
|
const headers = {
|
|
87
87
|
[DEXTO_GATEWAY_HEADERS.CLIENT_SOURCE]: context?.clientSource ?? "cli"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/llm/services/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAUnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAu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,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;CACxC;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,kBAAkB,EAC7B,OAAO,CAAC,EAAE,oBAAoB,GAC/B,aAAa,CAoLf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC5B,MAAM,EAAE,kBAAkB,EAC1B,WAAW,EAAE,WAAW,EACxB,mBAAmB,EAAE,mBAAmB,EACxC,eAAe,EAAE,4BAA4B,EAC7C,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,MAAM,EACjB,eAAe,EAAE,OAAO,0BAA0B,EAAE,eAAe,EACnE,MAAM,EAAE,YAAY,EACpB,kBAAkB,CAAC,EAAE,OAAO,mCAAmC,EAAE,mBAAmB,GAAG,IAAI,EAC3F,gBAAgB,CAAC,EAAE,qBAAqB,GACzC,gBAAgB,CAgBlB"}
|
|
@@ -11,7 +11,7 @@ import { createAmazonBedrock } from "@ai-sdk/amazon-bedrock";
|
|
|
11
11
|
import { VercelLLMService } from "./vercel.js";
|
|
12
12
|
import { createCohere } from "@ai-sdk/cohere";
|
|
13
13
|
import { createLocalLanguageModel } from "../providers/local/ai-sdk-adapter.js";
|
|
14
|
-
import { requiresApiKey } from "../registry.js";
|
|
14
|
+
import { requiresApiKey } from "../registry/index.js";
|
|
15
15
|
import { getPrimaryApiKeyEnvVar, resolveApiKeyForProvider } from "../../utils/api-key-resolver.js";
|
|
16
16
|
const DEXTO_GATEWAY_HEADERS = {
|
|
17
17
|
SESSION_ID: "X-Dexto-Session-ID",
|
|
@@ -27,7 +27,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
27
27
|
}
|
|
28
28
|
switch (provider.toLowerCase()) {
|
|
29
29
|
case "openai": {
|
|
30
|
-
return createOpenAI({ apiKey: apiKey ?? "" })(model);
|
|
30
|
+
return createOpenAI({ apiKey: apiKey ?? "" }).responses(model);
|
|
31
31
|
}
|
|
32
32
|
case "openai-compatible": {
|
|
33
33
|
const compatibleBaseURL = baseURL?.replace(/\/$/, "") || process.env.OPENAI_BASE_URL?.replace(/\/$/, "");
|
|
@@ -38,7 +38,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
38
38
|
}
|
|
39
39
|
case "openrouter": {
|
|
40
40
|
const orBaseURL = baseURL || "https://openrouter.ai/api/v1";
|
|
41
|
-
return createOpenAI({ apiKey: apiKey ?? "", baseURL: orBaseURL }).
|
|
41
|
+
return createOpenAI({ apiKey: apiKey ?? "", baseURL: orBaseURL }).responses(model);
|
|
42
42
|
}
|
|
43
43
|
case "minimax": {
|
|
44
44
|
const minimaxBaseURL = baseURL || "https://api.minimax.chat/v1";
|
|
@@ -58,7 +58,7 @@ function createVercelModel(llmConfig, context) {
|
|
|
58
58
|
const glamaBaseURL = "https://glama.ai/api/gateway/openai/v1";
|
|
59
59
|
return createOpenAI({ apiKey: apiKey ?? "", baseURL: glamaBaseURL }).chat(model);
|
|
60
60
|
}
|
|
61
|
-
case "dexto": {
|
|
61
|
+
case "dexto-nova": {
|
|
62
62
|
const dextoBaseURL = "https://api.dexto.ai/v1";
|
|
63
63
|
const headers = {
|
|
64
64
|
[DEXTO_GATEWAY_HEADERS.CLIENT_SOURCE]: context?.clientSource ?? "cli"
|
|
@@ -176,7 +176,7 @@ const TestConfigs = {
|
|
|
176
176
|
// Native node-llama-cpp GGUF models
|
|
177
177
|
ollama: "llama3.2",
|
|
178
178
|
// Ollama server models
|
|
179
|
-
dexto: "anthropic/claude-4.5-sonnet"
|
|
179
|
+
"dexto-nova": "anthropic/claude-4.5-sonnet"
|
|
180
180
|
// Dexto gateway (OpenRouter model format)
|
|
181
181
|
};
|
|
182
182
|
return {
|
|
@@ -154,7 +154,7 @@ const TestConfigs = {
|
|
|
154
154
|
// Native node-llama-cpp GGUF models
|
|
155
155
|
ollama: "llama3.2",
|
|
156
156
|
// Ollama server models
|
|
157
|
-
dexto: "anthropic/claude-4.5-sonnet"
|
|
157
|
+
"dexto-nova": "anthropic/claude-4.5-sonnet"
|
|
158
158
|
// Dexto gateway (OpenRouter model format)
|
|
159
159
|
};
|
|
160
160
|
return {
|
|
@@ -68,7 +68,7 @@ __export(vercel_exports, {
|
|
|
68
68
|
module.exports = __toCommonJS(vercel_exports);
|
|
69
69
|
var import_types2 = require("../../logger/v2/types.js");
|
|
70
70
|
var import_manager = require("../../context/manager.js");
|
|
71
|
-
var import_registry = require("../registry.js");
|
|
71
|
+
var import_registry = require("../registry/index.js");
|
|
72
72
|
var import_vercel = require("../formatters/vercel.js");
|
|
73
73
|
var import_decorators = require("../../telemetry/decorators.js");
|
|
74
74
|
var import_api = require("@opentelemetry/api");
|
|
@@ -140,6 +140,9 @@ class VercelLLMService {
|
|
|
140
140
|
getAllTools() {
|
|
141
141
|
return this.toolManager.getAllTools();
|
|
142
142
|
}
|
|
143
|
+
getEnabledTools() {
|
|
144
|
+
return this.toolManager.getAllTools().then((tools) => this.toolManager.filterToolsForSession(tools, this.sessionId));
|
|
145
|
+
}
|
|
143
146
|
/**
|
|
144
147
|
* Create a TurnExecutor instance for executing the agent loop.
|
|
145
148
|
*/
|
|
@@ -45,6 +45,7 @@ export declare class VercelLLMService {
|
|
|
45
45
|
private getModelId;
|
|
46
46
|
constructor(toolManager: ToolManager, model: LanguageModel, systemPromptManager: SystemPromptManager, historyProvider: IConversationHistoryProvider, sessionEventBus: SessionEventBus, config: ValidatedLLMConfig, sessionId: string, resourceManager: ResourceManager, logger: IDextoLogger, compactionStrategy?: import('../../context/compaction/types.js').ICompactionStrategy | null, compactionConfig?: CompactionConfigInput);
|
|
47
47
|
getAllTools(): Promise<ToolSet>;
|
|
48
|
+
getEnabledTools(): Promise<ToolSet>;
|
|
48
49
|
/**
|
|
49
50
|
* Create a TurnExecutor instance for executing the agent loop.
|
|
50
51
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../../src/llm/services/vercel.ts"],"names":[],"mappings":"AAA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AAM,EAAE,YAAY,EACpB,kBAAkB,CAAC,EAAE,OAAO,mCAAmC,EAAE,mBAAmB,GAAG,IAAI,EAC3F,gBAAgB,CAAC,EAAE,qBAAqB;IAuD5C,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAI/B,eAAe,IAAI,OAAO,CAAC,OAAO,CAAC;IAMnC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA0B1B;;OAEG;IACH,OAAc,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAE7C;;;;;;;OAOG;IACG,MAAM,CACR,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACnC,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAwD5B;;;OAGG;IACH,SAAS,IAAI,gBAAgB;IA+B7B;;OAEG;IACH,iBAAiB,IAAI,cAAc,CAAC,OAAO,CAAC;IAI5C;;OAEG;IACH,eAAe,IAAI,mBAAmB;IAItC;;OAEG;IACH,qBAAqB,IACf,OAAO,mCAAmC,EAAE,mBAAmB,GAC/D,IAAI;CAGb"}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
var _VercelLLMService_decorators, _init;
|
|
7
7
|
import { DextoLogComponent } from "../../logger/v2/types.js";
|
|
8
8
|
import { ContextManager } from "../../context/manager.js";
|
|
9
|
-
import { getEffectiveMaxInputTokens, getMaxInputTokensForModel } from "../registry.js";
|
|
9
|
+
import { getEffectiveMaxInputTokens, getMaxInputTokensForModel } from "../registry/index.js";
|
|
10
10
|
import { VercelMessageFormatter } from "../formatters/vercel.js";
|
|
11
11
|
import { InstrumentClass } from "../../telemetry/decorators.js";
|
|
12
12
|
import { trace, context, propagation } from "@opentelemetry/api";
|
|
@@ -77,6 +77,9 @@ class VercelLLMService {
|
|
|
77
77
|
getAllTools() {
|
|
78
78
|
return this.toolManager.getAllTools();
|
|
79
79
|
}
|
|
80
|
+
getEnabledTools() {
|
|
81
|
+
return this.toolManager.getAllTools().then((tools) => this.toolManager.filterToolsForSession(tools, this.sessionId));
|
|
82
|
+
}
|
|
80
83
|
/**
|
|
81
84
|
* Create a TurnExecutor instance for executing the agent loop.
|
|
82
85
|
*/
|
package/dist/llm/types.cjs
CHANGED
|
@@ -41,7 +41,7 @@ const LLM_PROVIDERS = [
|
|
|
41
41
|
// Native node-llama-cpp execution (GGUF models)
|
|
42
42
|
"ollama",
|
|
43
43
|
// Ollama server integration
|
|
44
|
-
"dexto"
|
|
44
|
+
"dexto-nova"
|
|
45
45
|
// Dexto gateway - routes through api.dexto.ai/v1 with billing
|
|
46
46
|
];
|
|
47
47
|
const SUPPORTED_FILE_TYPES = ["pdf", "image", "audio"];
|
package/dist/llm/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const LLM_PROVIDERS: readonly ["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto"];
|
|
1
|
+
export declare const LLM_PROVIDERS: readonly ["openai", "openai-compatible", "anthropic", "google", "groq", "xai", "cohere", "minimax", "glm", "openrouter", "litellm", "glama", "vertex", "bedrock", "local", "ollama", "dexto-nova"];
|
|
2
2
|
export type LLMProvider = (typeof LLM_PROVIDERS)[number];
|
|
3
3
|
export declare const SUPPORTED_FILE_TYPES: readonly ["pdf", "image", "audio"];
|
|
4
4
|
export type SupportedFileType = (typeof SUPPORTED_FILE_TYPES)[number];
|
package/dist/llm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/llm/types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/llm/types.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,oMAkBhB,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,oBAAoB,oCAAqC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE;;;GAGG;AAEH,MAAM,WAAW,UAAU;IACvB,mDAAmD;IACnD,QAAQ,EAAE,WAAW,CAAC;IAEtB,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;CACjB;AAGD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
package/dist/llm/types.js
CHANGED
|
@@ -18,7 +18,7 @@ const LLM_PROVIDERS = [
|
|
|
18
18
|
// Native node-llama-cpp execution (GGUF models)
|
|
19
19
|
"ollama",
|
|
20
20
|
// Ollama server integration
|
|
21
|
-
"dexto"
|
|
21
|
+
"dexto-nova"
|
|
22
22
|
// Dexto gateway - routes through api.dexto.ai/v1 with billing
|
|
23
23
|
];
|
|
24
24
|
const SUPPORTED_FILE_TYPES = ["pdf", "image", "audio"];
|
package/dist/llm/validation.cjs
CHANGED
|
@@ -21,7 +21,7 @@ __export(validation_exports, {
|
|
|
21
21
|
validateInputForLLM: () => validateInputForLLM
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(validation_exports);
|
|
24
|
-
var import_registry = require("./registry.js");
|
|
24
|
+
var import_registry = require("./registry/index.js");
|
|
25
25
|
var import_result = require("../utils/result.js");
|
|
26
26
|
var import_types = require("../errors/types.cjs");
|
|
27
27
|
var import_error_codes = require("./error-codes.js");
|
package/dist/llm/validation.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PTJYTZNU.js";
|
|
2
|
-
import { validateModelFileSupport, getAllowedMimeTypes } from "./registry.js";
|
|
2
|
+
import { validateModelFileSupport, getAllowedMimeTypes } from "./registry/index.js";
|
|
3
3
|
import { ok, fail } from "../utils/result.js";
|
|
4
4
|
import { ErrorScope, ErrorType } from "../errors/types.js";
|
|
5
5
|
import { LLMErrorCode } from "./error-codes.js";
|
|
@@ -256,6 +256,10 @@ class FileSystemResourceHandler {
|
|
|
256
256
|
return;
|
|
257
257
|
}
|
|
258
258
|
if (stat.isDirectory()) {
|
|
259
|
+
const basename = import_path.default.basename(canonical).toLowerCase();
|
|
260
|
+
if (this.shouldIgnoreDirectory(basename)) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
259
263
|
const entries = await import_fs.promises.readdir(canonical);
|
|
260
264
|
for (const entry of entries) {
|
|
261
265
|
const entryPath = import_path.default.join(canonical, entry);
|
|
@@ -272,6 +276,27 @@ class FileSystemResourceHandler {
|
|
|
272
276
|
);
|
|
273
277
|
}
|
|
274
278
|
}
|
|
279
|
+
shouldIgnoreDirectory(basename) {
|
|
280
|
+
const ignoredDirectories = [
|
|
281
|
+
"node_modules",
|
|
282
|
+
".git",
|
|
283
|
+
".turbo",
|
|
284
|
+
".next",
|
|
285
|
+
"dist",
|
|
286
|
+
"build",
|
|
287
|
+
"out",
|
|
288
|
+
"coverage",
|
|
289
|
+
".cache",
|
|
290
|
+
".vscode",
|
|
291
|
+
".idea",
|
|
292
|
+
".changeset",
|
|
293
|
+
".github",
|
|
294
|
+
".husky",
|
|
295
|
+
"tmp",
|
|
296
|
+
"temp"
|
|
297
|
+
];
|
|
298
|
+
return ignoredDirectories.includes(basename);
|
|
299
|
+
}
|
|
275
300
|
shouldIncludeFile(filePath, includeExtensions, includeHidden) {
|
|
276
301
|
const basename = import_path.default.basename(filePath).toLowerCase();
|
|
277
302
|
const ext = import_path.default.extname(filePath).toLowerCase();
|
|
@@ -27,6 +27,7 @@ export declare class FileSystemResourceHandler implements InternalResourceHandle
|
|
|
27
27
|
refresh(): Promise<void>;
|
|
28
28
|
private buildResourceCache;
|
|
29
29
|
private scanPath;
|
|
30
|
+
private shouldIgnoreDirectory;
|
|
30
31
|
private shouldIncludeFile;
|
|
31
32
|
/**
|
|
32
33
|
* Generate a clean, user-friendly filename from a potentially messy path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filesystem-handler.d.ts","sourceRoot":"","sources":["../../../src/resources/handlers/filesystem-handler.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAEpF,qBAAa,yBAA0B,YAAW,uBAAuB;IACrE,OAAO,CAAC,MAAM,CAAoC;IAClD,OAAO,CAAC,cAAc,CAA4C;IAClE,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,cAAc,CAAgB;IACtC,OAAO,CAAC,eAAe,CAAqB;IAC5C,OAAO,CAAC,MAAM,CAAe;gBAGzB,MAAM,EAAE,iCAAiC,EACzC,MAAM,EAAE,YAAY,EACpB,eAAe,CAAC,EAAE,MAAM;IAO5B,OAAO,IAAI,MAAM;IAIX,UAAU,CAAC,SAAS,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CA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IlD,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI/B,OAAO,CAAC,aAAa;IAWrB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAexB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IA0D5D,OAAO,CAAC,YAAY;IAoDd,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAIhB,kBAAkB;YA8BlB,QAAQ;IAyEtB,OAAO,CAAC,qBAAqB;IAsB7B,OAAO,CAAC,iBAAiB;IAwCzB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA0C7B,OAAO,CAAC,WAAW;CA8CtB"}
|
|
@@ -224,6 +224,10 @@ class FileSystemResourceHandler {
|
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
226
226
|
if (stat.isDirectory()) {
|
|
227
|
+
const basename = path.basename(canonical).toLowerCase();
|
|
228
|
+
if (this.shouldIgnoreDirectory(basename)) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
227
231
|
const entries = await fs.readdir(canonical);
|
|
228
232
|
for (const entry of entries) {
|
|
229
233
|
const entryPath = path.join(canonical, entry);
|
|
@@ -240,6 +244,27 @@ class FileSystemResourceHandler {
|
|
|
240
244
|
);
|
|
241
245
|
}
|
|
242
246
|
}
|
|
247
|
+
shouldIgnoreDirectory(basename) {
|
|
248
|
+
const ignoredDirectories = [
|
|
249
|
+
"node_modules",
|
|
250
|
+
".git",
|
|
251
|
+
".turbo",
|
|
252
|
+
".next",
|
|
253
|
+
"dist",
|
|
254
|
+
"build",
|
|
255
|
+
"out",
|
|
256
|
+
"coverage",
|
|
257
|
+
".cache",
|
|
258
|
+
".vscode",
|
|
259
|
+
".idea",
|
|
260
|
+
".changeset",
|
|
261
|
+
".github",
|
|
262
|
+
".husky",
|
|
263
|
+
"tmp",
|
|
264
|
+
"temp"
|
|
265
|
+
];
|
|
266
|
+
return ignoredDirectories.includes(basename);
|
|
267
|
+
}
|
|
243
268
|
shouldIncludeFile(filePath, includeExtensions, includeHidden) {
|
|
244
269
|
const basename = path.basename(filePath).toLowerCase();
|
|
245
270
|
const ext = path.extname(filePath).toLowerCase();
|
|
@@ -28,7 +28,7 @@ var import_events = require("../events/index.js");
|
|
|
28
28
|
var import_types = require("../logger/v2/types.js");
|
|
29
29
|
var import_errors = require("../errors/index.js");
|
|
30
30
|
var import_error_codes = require("../plugins/error-codes.js");
|
|
31
|
-
var import_registry = require("../llm/registry.js");
|
|
31
|
+
var import_registry = require("../llm/registry/index.js");
|
|
32
32
|
class ChatSession {
|
|
33
33
|
/**
|
|
34
34
|
* Creates a new ChatSession instance.
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { DextoLogComponent } from "../logger/v2/types.js";
|
|
10
10
|
import { DextoRuntimeError, ErrorScope, ErrorType } from "../errors/index.js";
|
|
11
11
|
import { PluginErrorCode } from "../plugins/error-codes.js";
|
|
12
|
-
import { getModelPricing, calculateCost } from "../llm/registry.js";
|
|
12
|
+
import { getModelPricing, calculateCost } from "../llm/registry/index.js";
|
|
13
13
|
class ChatSession {
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new ChatSession instance.
|