@dexto/core 1.6.1 → 1.6.2
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 +54 -0
- package/dist/agent/DextoAgent.d.ts +12 -1
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +54 -0
- package/dist/agent/agent-options.d.ts +6 -1
- package/dist/agent/agent-options.d.ts.map +1 -1
- package/dist/events/index.d.ts +9 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/llm/executor/provider-options.cjs +223 -28
- package/dist/llm/executor/provider-options.d.ts +3 -37
- package/dist/llm/executor/provider-options.d.ts.map +1 -1
- package/dist/llm/executor/provider-options.js +227 -27
- package/dist/llm/executor/stream-processor.cjs +54 -31
- package/dist/llm/executor/stream-processor.d.ts +9 -2
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +52 -29
- package/dist/llm/executor/turn-executor.cjs +63 -41
- package/dist/llm/executor/turn-executor.d.ts +2 -2
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +53 -31
- package/dist/llm/formatters/vercel.cjs +15 -3
- package/dist/llm/formatters/vercel.d.ts +1 -0
- package/dist/llm/formatters/vercel.d.ts.map +1 -1
- package/dist/llm/formatters/vercel.js +15 -3
- package/dist/llm/index.cjs +8 -0
- package/dist/llm/index.d.ts +2 -1
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +7 -0
- package/dist/llm/providers/local/schemas.d.ts +2 -2
- package/dist/llm/providers/openrouter-model-registry.cjs +66 -11
- package/dist/llm/providers/openrouter-model-registry.d.ts +26 -0
- package/dist/llm/providers/openrouter-model-registry.d.ts.map +1 -1
- package/dist/llm/providers/openrouter-model-registry.js +65 -11
- package/dist/llm/reasoning/anthropic-betas.cjs +31 -0
- package/dist/llm/reasoning/anthropic-betas.d.ts +3 -0
- package/dist/llm/reasoning/anthropic-betas.d.ts.map +1 -0
- package/dist/llm/reasoning/anthropic-betas.js +7 -0
- package/dist/llm/reasoning/anthropic-thinking.cjs +79 -0
- package/dist/llm/reasoning/anthropic-thinking.d.ts +15 -0
- package/dist/llm/reasoning/anthropic-thinking.d.ts.map +1 -0
- package/dist/llm/reasoning/anthropic-thinking.js +52 -0
- package/dist/llm/reasoning/openai-reasoning-effort.cjs +86 -0
- package/dist/llm/reasoning/openai-reasoning-effort.d.ts +5 -0
- package/dist/llm/reasoning/openai-reasoning-effort.d.ts.map +1 -0
- package/dist/llm/reasoning/openai-reasoning-effort.js +61 -0
- package/dist/llm/reasoning/profile.cjs +113 -0
- package/dist/llm/reasoning/profile.d.ts +13 -0
- package/dist/llm/reasoning/profile.d.ts.map +1 -0
- package/dist/llm/reasoning/profile.js +92 -0
- package/dist/llm/reasoning/profiles/anthropic.cjs +61 -0
- package/dist/llm/reasoning/profiles/anthropic.d.ts +8 -0
- package/dist/llm/reasoning/profiles/anthropic.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/anthropic.js +45 -0
- package/dist/llm/reasoning/profiles/bedrock.cjs +54 -0
- package/dist/llm/reasoning/profiles/bedrock.d.ts +3 -0
- package/dist/llm/reasoning/profiles/bedrock.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/bedrock.js +36 -0
- package/dist/llm/reasoning/profiles/google.cjs +45 -0
- package/dist/llm/reasoning/profiles/google.d.ts +9 -0
- package/dist/llm/reasoning/profiles/google.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/google.js +21 -0
- package/dist/llm/reasoning/profiles/openai-compatible.cjs +39 -0
- package/dist/llm/reasoning/profiles/openai-compatible.d.ts +3 -0
- package/dist/llm/reasoning/profiles/openai-compatible.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/openai-compatible.js +16 -0
- package/dist/llm/reasoning/profiles/openai.cjs +41 -0
- package/dist/llm/reasoning/profiles/openai.d.ts +3 -0
- package/dist/llm/reasoning/profiles/openai.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/openai.js +18 -0
- package/dist/llm/reasoning/profiles/openrouter.cjs +83 -0
- package/dist/llm/reasoning/profiles/openrouter.d.ts +10 -0
- package/dist/llm/reasoning/profiles/openrouter.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/openrouter.js +59 -0
- package/dist/llm/reasoning/profiles/shared.cjs +80 -0
- package/dist/llm/reasoning/profiles/shared.d.ts +25 -0
- package/dist/llm/reasoning/profiles/shared.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/shared.js +53 -0
- package/dist/llm/reasoning/profiles/vertex.cjs +46 -0
- package/dist/llm/reasoning/profiles/vertex.d.ts +3 -0
- package/dist/llm/reasoning/profiles/vertex.d.ts.map +1 -0
- package/dist/llm/reasoning/profiles/vertex.js +23 -0
- package/dist/llm/registry/auto-update.cjs +18 -0
- package/dist/llm/registry/auto-update.d.ts.map +1 -1
- package/dist/llm/registry/auto-update.js +18 -0
- package/dist/llm/registry/index.cjs +126 -26
- package/dist/llm/registry/index.d.ts +48 -4
- package/dist/llm/registry/index.d.ts.map +1 -1
- package/dist/llm/registry/index.js +136 -28
- package/dist/llm/registry/models.generated.cjs +5198 -59
- package/dist/llm/registry/models.generated.d.ts +1893 -76
- package/dist/llm/registry/models.generated.d.ts.map +1 -1
- package/dist/llm/registry/models.generated.js +5196 -58
- package/dist/llm/registry/sync.cjs +72 -1
- package/dist/llm/registry/sync.d.ts +21 -1
- package/dist/llm/registry/sync.d.ts.map +1 -1
- package/dist/llm/registry/sync.js +72 -1
- package/dist/llm/resolver.cjs +13 -1
- package/dist/llm/resolver.d.ts.map +1 -1
- package/dist/llm/resolver.js +13 -1
- package/dist/llm/schemas.cjs +75 -14
- package/dist/llm/schemas.d.ts +80 -23
- package/dist/llm/schemas.d.ts.map +1 -1
- package/dist/llm/schemas.js +75 -14
- package/dist/llm/services/factory.cjs +55 -8
- package/dist/llm/services/factory.d.ts +1 -1
- package/dist/llm/services/factory.d.ts.map +1 -1
- package/dist/llm/services/factory.js +58 -8
- package/dist/llm/services/vercel.cjs +1 -1
- package/dist/llm/services/vercel.js +1 -1
- package/dist/llm/types.d.ts +9 -0
- package/dist/llm/types.d.ts.map +1 -1
- package/dist/prompts/index.cjs +9 -0
- package/dist/prompts/index.d.ts +1 -0
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +10 -0
- package/dist/prompts/prompt-manager.cjs +2 -0
- package/dist/prompts/prompt-manager.d.ts.map +1 -1
- package/dist/prompts/prompt-manager.js +2 -0
- package/dist/prompts/providers/config-prompt-provider.cjs +11 -1
- package/dist/prompts/providers/config-prompt-provider.d.ts.map +1 -1
- package/dist/prompts/providers/config-prompt-provider.js +11 -1
- package/dist/prompts/schemas.cjs +2 -2
- package/dist/prompts/schemas.js +2 -2
- package/dist/prompts/types.d.ts +6 -2
- package/dist/prompts/types.d.ts.map +1 -1
- package/dist/tools/tool-manager.cjs +88 -2
- package/dist/tools/tool-manager.d.ts +15 -1
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +88 -2
- package/dist/utils/service-initializer.d.ts +1 -0
- package/dist/utils/service-initializer.d.ts.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var openai_reasoning_effort_exports = {};
|
|
20
|
+
__export(openai_reasoning_effort_exports, {
|
|
21
|
+
coerceOpenAIReasoningEffort: () => coerceOpenAIReasoningEffort,
|
|
22
|
+
getSupportedOpenAIReasoningEfforts: () => getSupportedOpenAIReasoningEfforts,
|
|
23
|
+
supportsOpenAIReasoningEffort: () => supportsOpenAIReasoningEffort
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(openai_reasoning_effort_exports);
|
|
26
|
+
function normalizeOpenAIModelId(model) {
|
|
27
|
+
const id = model.split("/").pop() ?? model;
|
|
28
|
+
return id.toLowerCase();
|
|
29
|
+
}
|
|
30
|
+
function getSupportedOpenAIReasoningEfforts(model) {
|
|
31
|
+
const id = normalizeOpenAIModelId(model);
|
|
32
|
+
if (id.includes("gpt-5-pro")) {
|
|
33
|
+
return ["high"];
|
|
34
|
+
}
|
|
35
|
+
if (id.startsWith("gpt-5.3")) {
|
|
36
|
+
return ["low", "medium", "high", "xhigh"];
|
|
37
|
+
}
|
|
38
|
+
if (id.startsWith("gpt-5.2")) {
|
|
39
|
+
return ["low", "medium", "high", "xhigh"];
|
|
40
|
+
}
|
|
41
|
+
if (id.includes("gpt-5.1-codex-max")) {
|
|
42
|
+
return ["none", "low", "medium", "high", "xhigh"];
|
|
43
|
+
}
|
|
44
|
+
if (id.startsWith("gpt-5.1")) {
|
|
45
|
+
return ["none", "low", "medium", "high"];
|
|
46
|
+
}
|
|
47
|
+
if (id.startsWith("gpt-5")) {
|
|
48
|
+
return ["minimal", "low", "medium", "high"];
|
|
49
|
+
}
|
|
50
|
+
if (id.startsWith("o1") || id.startsWith("o3") || id.startsWith("o4")) {
|
|
51
|
+
return ["low", "medium", "high"];
|
|
52
|
+
}
|
|
53
|
+
return ["low", "medium", "high"];
|
|
54
|
+
}
|
|
55
|
+
function getFallbackOrder(requested) {
|
|
56
|
+
switch (requested) {
|
|
57
|
+
case "none":
|
|
58
|
+
return ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
59
|
+
case "minimal":
|
|
60
|
+
return ["minimal", "low", "medium", "high", "xhigh"];
|
|
61
|
+
case "low":
|
|
62
|
+
return ["low", "medium", "high", "xhigh"];
|
|
63
|
+
case "medium":
|
|
64
|
+
return ["medium", "high", "xhigh"];
|
|
65
|
+
case "high":
|
|
66
|
+
return ["high", "xhigh"];
|
|
67
|
+
case "xhigh":
|
|
68
|
+
return ["xhigh", "high", "medium", "low", "minimal", "none"];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function coerceOpenAIReasoningEffort(model, requested) {
|
|
72
|
+
const supported = getSupportedOpenAIReasoningEfforts(model);
|
|
73
|
+
for (const candidate of getFallbackOrder(requested)) {
|
|
74
|
+
if (supported.includes(candidate)) return candidate;
|
|
75
|
+
}
|
|
76
|
+
return void 0;
|
|
77
|
+
}
|
|
78
|
+
function supportsOpenAIReasoningEffort(model, effort) {
|
|
79
|
+
return getSupportedOpenAIReasoningEfforts(model).includes(effort);
|
|
80
|
+
}
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
coerceOpenAIReasoningEffort,
|
|
84
|
+
getSupportedOpenAIReasoningEfforts,
|
|
85
|
+
supportsOpenAIReasoningEffort
|
|
86
|
+
});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type OpenAIReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
2
|
+
export declare function getSupportedOpenAIReasoningEfforts(model: string): OpenAIReasoningEffort[];
|
|
3
|
+
export declare function coerceOpenAIReasoningEffort(model: string, requested: OpenAIReasoningEffort): OpenAIReasoningEffort | undefined;
|
|
4
|
+
export declare function supportsOpenAIReasoningEffort(model: string, effort: OpenAIReasoningEffort): boolean;
|
|
5
|
+
//# sourceMappingURL=openai-reasoning-effort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai-reasoning-effort.d.ts","sourceRoot":"","sources":["../../../src/llm/reasoning/openai-reasoning-effort.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAO7F,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAoCzF;AAmBD,wBAAgB,2BAA2B,CACvC,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,qBAAqB,GACjC,qBAAqB,GAAG,SAAS,CAMnC;AAED,wBAAgB,6BAA6B,CACzC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,qBAAqB,GAC9B,OAAO,CAET"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "../../chunk-PTJYTZNU.js";
|
|
2
|
+
function normalizeOpenAIModelId(model) {
|
|
3
|
+
const id = model.split("/").pop() ?? model;
|
|
4
|
+
return id.toLowerCase();
|
|
5
|
+
}
|
|
6
|
+
function getSupportedOpenAIReasoningEfforts(model) {
|
|
7
|
+
const id = normalizeOpenAIModelId(model);
|
|
8
|
+
if (id.includes("gpt-5-pro")) {
|
|
9
|
+
return ["high"];
|
|
10
|
+
}
|
|
11
|
+
if (id.startsWith("gpt-5.3")) {
|
|
12
|
+
return ["low", "medium", "high", "xhigh"];
|
|
13
|
+
}
|
|
14
|
+
if (id.startsWith("gpt-5.2")) {
|
|
15
|
+
return ["low", "medium", "high", "xhigh"];
|
|
16
|
+
}
|
|
17
|
+
if (id.includes("gpt-5.1-codex-max")) {
|
|
18
|
+
return ["none", "low", "medium", "high", "xhigh"];
|
|
19
|
+
}
|
|
20
|
+
if (id.startsWith("gpt-5.1")) {
|
|
21
|
+
return ["none", "low", "medium", "high"];
|
|
22
|
+
}
|
|
23
|
+
if (id.startsWith("gpt-5")) {
|
|
24
|
+
return ["minimal", "low", "medium", "high"];
|
|
25
|
+
}
|
|
26
|
+
if (id.startsWith("o1") || id.startsWith("o3") || id.startsWith("o4")) {
|
|
27
|
+
return ["low", "medium", "high"];
|
|
28
|
+
}
|
|
29
|
+
return ["low", "medium", "high"];
|
|
30
|
+
}
|
|
31
|
+
function getFallbackOrder(requested) {
|
|
32
|
+
switch (requested) {
|
|
33
|
+
case "none":
|
|
34
|
+
return ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
35
|
+
case "minimal":
|
|
36
|
+
return ["minimal", "low", "medium", "high", "xhigh"];
|
|
37
|
+
case "low":
|
|
38
|
+
return ["low", "medium", "high", "xhigh"];
|
|
39
|
+
case "medium":
|
|
40
|
+
return ["medium", "high", "xhigh"];
|
|
41
|
+
case "high":
|
|
42
|
+
return ["high", "xhigh"];
|
|
43
|
+
case "xhigh":
|
|
44
|
+
return ["xhigh", "high", "medium", "low", "minimal", "none"];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function coerceOpenAIReasoningEffort(model, requested) {
|
|
48
|
+
const supported = getSupportedOpenAIReasoningEfforts(model);
|
|
49
|
+
for (const candidate of getFallbackOrder(requested)) {
|
|
50
|
+
if (supported.includes(candidate)) return candidate;
|
|
51
|
+
}
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
function supportsOpenAIReasoningEffort(model, effort) {
|
|
55
|
+
return getSupportedOpenAIReasoningEfforts(model).includes(effort);
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
coerceOpenAIReasoningEffort,
|
|
59
|
+
getSupportedOpenAIReasoningEfforts,
|
|
60
|
+
supportsOpenAIReasoningEffort
|
|
61
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var profile_exports = {};
|
|
20
|
+
__export(profile_exports, {
|
|
21
|
+
getReasoningProfile: () => getReasoningProfile,
|
|
22
|
+
supportsReasoningVariant: () => supportsReasoningVariant
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(profile_exports);
|
|
25
|
+
var import_registry = require("../registry/index.js");
|
|
26
|
+
var import_anthropic_thinking = require("./anthropic-thinking.js");
|
|
27
|
+
var import_anthropic = require("./profiles/anthropic.js");
|
|
28
|
+
var import_bedrock = require("./profiles/bedrock.js");
|
|
29
|
+
var import_google = require("./profiles/google.js");
|
|
30
|
+
var import_openai_compatible = require("./profiles/openai-compatible.js");
|
|
31
|
+
var import_openai = require("./profiles/openai.js");
|
|
32
|
+
var import_openrouter = require("./profiles/openrouter.js");
|
|
33
|
+
var import_vertex = require("./profiles/vertex.js");
|
|
34
|
+
var import_shared = require("./profiles/shared.js");
|
|
35
|
+
const ANTHROPIC_PROFILE_CONFIG = {
|
|
36
|
+
includeDisabled: true,
|
|
37
|
+
supportsBudgetTokensForBudgetParadigm: true,
|
|
38
|
+
supportsBudgetTokensForAdaptiveParadigm: false
|
|
39
|
+
};
|
|
40
|
+
const GOOGLE_PROFILE_CONFIG = {
|
|
41
|
+
includeDisabled: true,
|
|
42
|
+
supportsBudgetTokensForBudgetParadigm: true,
|
|
43
|
+
supportsBudgetTokensForThinkingLevelParadigm: false
|
|
44
|
+
};
|
|
45
|
+
function isAnthropicStyleReasoningCapable(provider, model) {
|
|
46
|
+
return (0, import_registry.isReasoningCapableModel)(model, provider) || (0, import_anthropic_thinking.parseClaudeVersion)(model) !== null || (0, import_anthropic_thinking.isAnthropicAdaptiveThinkingModel)(model);
|
|
47
|
+
}
|
|
48
|
+
function getNativeReasoningProfile(provider, model) {
|
|
49
|
+
switch (provider) {
|
|
50
|
+
case "openai":
|
|
51
|
+
if (!(0, import_registry.isReasoningCapableModel)(model, "openai")) {
|
|
52
|
+
return (0, import_shared.nonCapableProfile)();
|
|
53
|
+
}
|
|
54
|
+
return (0, import_openai.buildOpenAIReasoningProfile)(model);
|
|
55
|
+
case "anthropic":
|
|
56
|
+
if (!isAnthropicStyleReasoningCapable("anthropic", model)) {
|
|
57
|
+
return (0, import_shared.nonCapableProfile)();
|
|
58
|
+
}
|
|
59
|
+
return (0, import_anthropic.buildAnthropicReasoningProfile)({ model, ...ANTHROPIC_PROFILE_CONFIG });
|
|
60
|
+
case "bedrock":
|
|
61
|
+
if (!(0, import_registry.isReasoningCapableModel)(model, "bedrock")) {
|
|
62
|
+
return (0, import_shared.nonCapableProfile)();
|
|
63
|
+
}
|
|
64
|
+
return (0, import_bedrock.buildBedrockReasoningProfile)(model);
|
|
65
|
+
case "google":
|
|
66
|
+
if (!(0, import_registry.isReasoningCapableModel)(model, "google")) {
|
|
67
|
+
return (0, import_shared.nonCapableProfile)();
|
|
68
|
+
}
|
|
69
|
+
return (0, import_google.buildGoogleReasoningProfile)({ model, ...GOOGLE_PROFILE_CONFIG });
|
|
70
|
+
case "vertex":
|
|
71
|
+
if (!isAnthropicStyleReasoningCapable("vertex", model)) {
|
|
72
|
+
return (0, import_shared.nonCapableProfile)();
|
|
73
|
+
}
|
|
74
|
+
return (0, import_vertex.buildVertexReasoningProfile)(model);
|
|
75
|
+
case "openai-compatible":
|
|
76
|
+
if (!(0, import_registry.isReasoningCapableModel)(model, "openai-compatible")) {
|
|
77
|
+
return (0, import_shared.nonCapableProfile)();
|
|
78
|
+
}
|
|
79
|
+
return (0, import_openai_compatible.buildOpenAICompatibleReasoningProfile)();
|
|
80
|
+
default:
|
|
81
|
+
return (0, import_shared.nonCapableProfile)();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
function toGatewayReasoningProfile(nativeProfile) {
|
|
85
|
+
if (!nativeProfile.capable) {
|
|
86
|
+
return (0, import_shared.nonCapableProfile)();
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
...nativeProfile,
|
|
90
|
+
variants: nativeProfile.variants.map((variant) => ({ ...variant })),
|
|
91
|
+
supportedVariants: [...nativeProfile.supportedVariants],
|
|
92
|
+
supportsBudgetTokens: true
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function getReasoningProfile(provider, model) {
|
|
96
|
+
if ((0, import_openrouter.isOpenRouterGatewayProvider)(provider)) {
|
|
97
|
+
const target = (0, import_openrouter.getOpenRouterReasoningTarget)(model);
|
|
98
|
+
if (!target) {
|
|
99
|
+
return (0, import_shared.nonCapableProfile)();
|
|
100
|
+
}
|
|
101
|
+
const nativeProfile = getNativeReasoningProfile(target.upstreamProvider, target.modelId);
|
|
102
|
+
return toGatewayReasoningProfile(nativeProfile);
|
|
103
|
+
}
|
|
104
|
+
return getNativeReasoningProfile(provider, model);
|
|
105
|
+
}
|
|
106
|
+
function supportsReasoningVariant(profile, variant) {
|
|
107
|
+
return profile.variants.some((entry) => entry.id === variant);
|
|
108
|
+
}
|
|
109
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
110
|
+
0 && (module.exports = {
|
|
111
|
+
getReasoningProfile,
|
|
112
|
+
supportsReasoningVariant
|
|
113
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { LLMProvider } from '../types.js';
|
|
2
|
+
import { type ReasoningProfile } from './profiles/shared.js';
|
|
3
|
+
export type { ReasoningParadigm, ReasoningProfile, ReasoningVariantOption, } from './profiles/shared.js';
|
|
4
|
+
/**
|
|
5
|
+
* Returns exact, model/provider-native reasoning controls available for this model.
|
|
6
|
+
*
|
|
7
|
+
* This is intentionally strict:
|
|
8
|
+
* - No generic preset abstraction at this layer
|
|
9
|
+
* - No guessed variants for unknown paradigms
|
|
10
|
+
*/
|
|
11
|
+
export declare function getReasoningProfile(provider: LLMProvider, model: string): ReasoningProfile;
|
|
12
|
+
export declare function supportsReasoningVariant(profile: ReasoningProfile, variant: string): boolean;
|
|
13
|
+
//# sourceMappingURL=profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../../src/llm/reasoning/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAa/C,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAEhF,YAAY,EACR,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,GACzB,MAAM,sBAAsB,CAAC;AAiF9B;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAY1F;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAE5F"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "../../chunk-PTJYTZNU.js";
|
|
2
|
+
import { isReasoningCapableModel } from "../registry/index.js";
|
|
3
|
+
import { isAnthropicAdaptiveThinkingModel, parseClaudeVersion } from "./anthropic-thinking.js";
|
|
4
|
+
import { buildAnthropicReasoningProfile } from "./profiles/anthropic.js";
|
|
5
|
+
import { buildBedrockReasoningProfile } from "./profiles/bedrock.js";
|
|
6
|
+
import { buildGoogleReasoningProfile } from "./profiles/google.js";
|
|
7
|
+
import { buildOpenAICompatibleReasoningProfile } from "./profiles/openai-compatible.js";
|
|
8
|
+
import { buildOpenAIReasoningProfile } from "./profiles/openai.js";
|
|
9
|
+
import {
|
|
10
|
+
getOpenRouterReasoningTarget,
|
|
11
|
+
isOpenRouterGatewayProvider
|
|
12
|
+
} from "./profiles/openrouter.js";
|
|
13
|
+
import { buildVertexReasoningProfile } from "./profiles/vertex.js";
|
|
14
|
+
import { nonCapableProfile } from "./profiles/shared.js";
|
|
15
|
+
const ANTHROPIC_PROFILE_CONFIG = {
|
|
16
|
+
includeDisabled: true,
|
|
17
|
+
supportsBudgetTokensForBudgetParadigm: true,
|
|
18
|
+
supportsBudgetTokensForAdaptiveParadigm: false
|
|
19
|
+
};
|
|
20
|
+
const GOOGLE_PROFILE_CONFIG = {
|
|
21
|
+
includeDisabled: true,
|
|
22
|
+
supportsBudgetTokensForBudgetParadigm: true,
|
|
23
|
+
supportsBudgetTokensForThinkingLevelParadigm: false
|
|
24
|
+
};
|
|
25
|
+
function isAnthropicStyleReasoningCapable(provider, model) {
|
|
26
|
+
return isReasoningCapableModel(model, provider) || parseClaudeVersion(model) !== null || isAnthropicAdaptiveThinkingModel(model);
|
|
27
|
+
}
|
|
28
|
+
function getNativeReasoningProfile(provider, model) {
|
|
29
|
+
switch (provider) {
|
|
30
|
+
case "openai":
|
|
31
|
+
if (!isReasoningCapableModel(model, "openai")) {
|
|
32
|
+
return nonCapableProfile();
|
|
33
|
+
}
|
|
34
|
+
return buildOpenAIReasoningProfile(model);
|
|
35
|
+
case "anthropic":
|
|
36
|
+
if (!isAnthropicStyleReasoningCapable("anthropic", model)) {
|
|
37
|
+
return nonCapableProfile();
|
|
38
|
+
}
|
|
39
|
+
return buildAnthropicReasoningProfile({ model, ...ANTHROPIC_PROFILE_CONFIG });
|
|
40
|
+
case "bedrock":
|
|
41
|
+
if (!isReasoningCapableModel(model, "bedrock")) {
|
|
42
|
+
return nonCapableProfile();
|
|
43
|
+
}
|
|
44
|
+
return buildBedrockReasoningProfile(model);
|
|
45
|
+
case "google":
|
|
46
|
+
if (!isReasoningCapableModel(model, "google")) {
|
|
47
|
+
return nonCapableProfile();
|
|
48
|
+
}
|
|
49
|
+
return buildGoogleReasoningProfile({ model, ...GOOGLE_PROFILE_CONFIG });
|
|
50
|
+
case "vertex":
|
|
51
|
+
if (!isAnthropicStyleReasoningCapable("vertex", model)) {
|
|
52
|
+
return nonCapableProfile();
|
|
53
|
+
}
|
|
54
|
+
return buildVertexReasoningProfile(model);
|
|
55
|
+
case "openai-compatible":
|
|
56
|
+
if (!isReasoningCapableModel(model, "openai-compatible")) {
|
|
57
|
+
return nonCapableProfile();
|
|
58
|
+
}
|
|
59
|
+
return buildOpenAICompatibleReasoningProfile();
|
|
60
|
+
default:
|
|
61
|
+
return nonCapableProfile();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
function toGatewayReasoningProfile(nativeProfile) {
|
|
65
|
+
if (!nativeProfile.capable) {
|
|
66
|
+
return nonCapableProfile();
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
...nativeProfile,
|
|
70
|
+
variants: nativeProfile.variants.map((variant) => ({ ...variant })),
|
|
71
|
+
supportedVariants: [...nativeProfile.supportedVariants],
|
|
72
|
+
supportsBudgetTokens: true
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function getReasoningProfile(provider, model) {
|
|
76
|
+
if (isOpenRouterGatewayProvider(provider)) {
|
|
77
|
+
const target = getOpenRouterReasoningTarget(model);
|
|
78
|
+
if (!target) {
|
|
79
|
+
return nonCapableProfile();
|
|
80
|
+
}
|
|
81
|
+
const nativeProfile = getNativeReasoningProfile(target.upstreamProvider, target.modelId);
|
|
82
|
+
return toGatewayReasoningProfile(nativeProfile);
|
|
83
|
+
}
|
|
84
|
+
return getNativeReasoningProfile(provider, model);
|
|
85
|
+
}
|
|
86
|
+
function supportsReasoningVariant(profile, variant) {
|
|
87
|
+
return profile.variants.some((entry) => entry.id === variant);
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
getReasoningProfile,
|
|
91
|
+
supportsReasoningVariant
|
|
92
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var anthropic_exports = {};
|
|
20
|
+
__export(anthropic_exports, {
|
|
21
|
+
buildAnthropicReasoningProfile: () => buildAnthropicReasoningProfile
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(anthropic_exports);
|
|
24
|
+
var import_anthropic_thinking = require("../anthropic-thinking.js");
|
|
25
|
+
var import_shared = require("./shared.js");
|
|
26
|
+
function buildAnthropicAdaptiveProfile(config) {
|
|
27
|
+
const variants = [];
|
|
28
|
+
if (config.includeDisabled) {
|
|
29
|
+
variants.push((0, import_shared.option)("disabled"));
|
|
30
|
+
}
|
|
31
|
+
variants.push((0, import_shared.option)("low"), (0, import_shared.option)("medium"), (0, import_shared.option)("high"));
|
|
32
|
+
if ((0, import_anthropic_thinking.isAnthropicOpusAdaptiveThinkingModel)(config.model)) {
|
|
33
|
+
variants.push((0, import_shared.option)("max"));
|
|
34
|
+
}
|
|
35
|
+
return (0, import_shared.withDefault)(
|
|
36
|
+
{
|
|
37
|
+
capable: true,
|
|
38
|
+
paradigm: "adaptive-effort",
|
|
39
|
+
variants,
|
|
40
|
+
supportsBudgetTokens: config.supportsBudgetTokens
|
|
41
|
+
},
|
|
42
|
+
"medium"
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function buildAnthropicReasoningProfile(config) {
|
|
46
|
+
if ((0, import_anthropic_thinking.isAnthropicAdaptiveThinkingModel)(config.model)) {
|
|
47
|
+
return buildAnthropicAdaptiveProfile({
|
|
48
|
+
model: config.model,
|
|
49
|
+
includeDisabled: config.includeDisabled,
|
|
50
|
+
supportsBudgetTokens: config.supportsBudgetTokensForAdaptiveParadigm
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return (0, import_shared.buildBudgetProfile)({
|
|
54
|
+
includeDisabled: config.includeDisabled,
|
|
55
|
+
supportsBudgetTokens: config.supportsBudgetTokensForBudgetParadigm
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
buildAnthropicReasoningProfile
|
|
61
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ReasoningProfile } from './shared.js';
|
|
2
|
+
export declare function buildAnthropicReasoningProfile(config: {
|
|
3
|
+
model: string;
|
|
4
|
+
includeDisabled: boolean;
|
|
5
|
+
supportsBudgetTokensForBudgetParadigm: boolean;
|
|
6
|
+
supportsBudgetTokensForAdaptiveParadigm: boolean;
|
|
7
|
+
}): ReasoningProfile;
|
|
8
|
+
//# sourceMappingURL=anthropic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anthropic.d.ts","sourceRoot":"","sources":["../../../../src/llm/reasoning/profiles/anthropic.ts"],"names":[],"mappings":"AAIA,OAAO,EAGH,KAAK,gBAAgB,EAGxB,MAAM,aAAa,CAAC;AA4BrB,wBAAgB,8BAA8B,CAAC,MAAM,EAAE;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,qCAAqC,EAAE,OAAO,CAAC;IAC/C,uCAAuC,EAAE,OAAO,CAAC;CACpD,GAAG,gBAAgB,CAanB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "../../../chunk-PTJYTZNU.js";
|
|
2
|
+
import {
|
|
3
|
+
isAnthropicAdaptiveThinkingModel,
|
|
4
|
+
isAnthropicOpusAdaptiveThinkingModel
|
|
5
|
+
} from "../anthropic-thinking.js";
|
|
6
|
+
import {
|
|
7
|
+
buildBudgetProfile,
|
|
8
|
+
option,
|
|
9
|
+
withDefault
|
|
10
|
+
} from "./shared.js";
|
|
11
|
+
function buildAnthropicAdaptiveProfile(config) {
|
|
12
|
+
const variants = [];
|
|
13
|
+
if (config.includeDisabled) {
|
|
14
|
+
variants.push(option("disabled"));
|
|
15
|
+
}
|
|
16
|
+
variants.push(option("low"), option("medium"), option("high"));
|
|
17
|
+
if (isAnthropicOpusAdaptiveThinkingModel(config.model)) {
|
|
18
|
+
variants.push(option("max"));
|
|
19
|
+
}
|
|
20
|
+
return withDefault(
|
|
21
|
+
{
|
|
22
|
+
capable: true,
|
|
23
|
+
paradigm: "adaptive-effort",
|
|
24
|
+
variants,
|
|
25
|
+
supportsBudgetTokens: config.supportsBudgetTokens
|
|
26
|
+
},
|
|
27
|
+
"medium"
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function buildAnthropicReasoningProfile(config) {
|
|
31
|
+
if (isAnthropicAdaptiveThinkingModel(config.model)) {
|
|
32
|
+
return buildAnthropicAdaptiveProfile({
|
|
33
|
+
model: config.model,
|
|
34
|
+
includeDisabled: config.includeDisabled,
|
|
35
|
+
supportsBudgetTokens: config.supportsBudgetTokensForAdaptiveParadigm
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return buildBudgetProfile({
|
|
39
|
+
includeDisabled: config.includeDisabled,
|
|
40
|
+
supportsBudgetTokens: config.supportsBudgetTokensForBudgetParadigm
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
buildAnthropicReasoningProfile
|
|
45
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var bedrock_exports = {};
|
|
20
|
+
__export(bedrock_exports, {
|
|
21
|
+
buildBedrockReasoningProfile: () => buildBedrockReasoningProfile
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(bedrock_exports);
|
|
24
|
+
var import_shared = require("./shared.js");
|
|
25
|
+
function isBedrockAnthropicModel(model) {
|
|
26
|
+
return model.toLowerCase().includes("anthropic");
|
|
27
|
+
}
|
|
28
|
+
function isBedrockNovaModel(model) {
|
|
29
|
+
return model.toLowerCase().includes("nova");
|
|
30
|
+
}
|
|
31
|
+
function buildBedrockReasoningProfile(model) {
|
|
32
|
+
if (isBedrockAnthropicModel(model)) {
|
|
33
|
+
return (0, import_shared.buildBudgetProfile)({
|
|
34
|
+
includeDisabled: true,
|
|
35
|
+
supportsBudgetTokens: true
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (isBedrockNovaModel(model)) {
|
|
39
|
+
return (0, import_shared.withDefault)(
|
|
40
|
+
{
|
|
41
|
+
capable: true,
|
|
42
|
+
paradigm: "effort",
|
|
43
|
+
variants: [(0, import_shared.option)("disabled"), (0, import_shared.option)("low"), (0, import_shared.option)("medium"), (0, import_shared.option)("high")],
|
|
44
|
+
supportsBudgetTokens: false
|
|
45
|
+
},
|
|
46
|
+
"medium"
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return (0, import_shared.nonCapableProfile)();
|
|
50
|
+
}
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
buildBedrockReasoningProfile
|
|
54
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bedrock.d.ts","sourceRoot":"","sources":["../../../../src/llm/reasoning/profiles/bedrock.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,gBAAgB,EAExB,MAAM,aAAa,CAAC;AAUrB,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAqB5E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "../../../chunk-PTJYTZNU.js";
|
|
2
|
+
import {
|
|
3
|
+
buildBudgetProfile,
|
|
4
|
+
nonCapableProfile,
|
|
5
|
+
option,
|
|
6
|
+
withDefault
|
|
7
|
+
} from "./shared.js";
|
|
8
|
+
function isBedrockAnthropicModel(model) {
|
|
9
|
+
return model.toLowerCase().includes("anthropic");
|
|
10
|
+
}
|
|
11
|
+
function isBedrockNovaModel(model) {
|
|
12
|
+
return model.toLowerCase().includes("nova");
|
|
13
|
+
}
|
|
14
|
+
function buildBedrockReasoningProfile(model) {
|
|
15
|
+
if (isBedrockAnthropicModel(model)) {
|
|
16
|
+
return buildBudgetProfile({
|
|
17
|
+
includeDisabled: true,
|
|
18
|
+
supportsBudgetTokens: true
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
if (isBedrockNovaModel(model)) {
|
|
22
|
+
return withDefault(
|
|
23
|
+
{
|
|
24
|
+
capable: true,
|
|
25
|
+
paradigm: "effort",
|
|
26
|
+
variants: [option("disabled"), option("low"), option("medium"), option("high")],
|
|
27
|
+
supportsBudgetTokens: false
|
|
28
|
+
},
|
|
29
|
+
"medium"
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
return nonCapableProfile();
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
buildBedrockReasoningProfile
|
|
36
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var google_exports = {};
|
|
20
|
+
__export(google_exports, {
|
|
21
|
+
buildGoogleReasoningProfile: () => buildGoogleReasoningProfile,
|
|
22
|
+
isGemini3Model: () => isGemini3Model
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(google_exports);
|
|
25
|
+
var import_shared = require("./shared.js");
|
|
26
|
+
function isGemini3Model(model) {
|
|
27
|
+
return model.toLowerCase().includes("gemini-3");
|
|
28
|
+
}
|
|
29
|
+
function buildGoogleReasoningProfile(config) {
|
|
30
|
+
if (isGemini3Model(config.model)) {
|
|
31
|
+
return (0, import_shared.buildThinkingLevelProfile)({
|
|
32
|
+
includeDisabled: config.includeDisabled,
|
|
33
|
+
supportsBudgetTokens: config.supportsBudgetTokensForThinkingLevelParadigm
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
return (0, import_shared.buildBudgetProfile)({
|
|
37
|
+
includeDisabled: config.includeDisabled,
|
|
38
|
+
supportsBudgetTokens: config.supportsBudgetTokensForBudgetParadigm
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
buildGoogleReasoningProfile,
|
|
44
|
+
isGemini3Model
|
|
45
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReasoningProfile } from './shared.js';
|
|
2
|
+
export declare function isGemini3Model(model: string): boolean;
|
|
3
|
+
export declare function buildGoogleReasoningProfile(config: {
|
|
4
|
+
model: string;
|
|
5
|
+
includeDisabled: boolean;
|
|
6
|
+
supportsBudgetTokensForBudgetParadigm: boolean;
|
|
7
|
+
supportsBudgetTokensForThinkingLevelParadigm: boolean;
|
|
8
|
+
}): ReasoningProfile;
|
|
9
|
+
//# sourceMappingURL=google.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../../src/llm/reasoning/profiles/google.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiD,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEnG,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAErD;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,qCAAqC,EAAE,OAAO,CAAC;IAC/C,4CAA4C,EAAE,OAAO,CAAC;CACzD,GAAG,gBAAgB,CAYnB"}
|