@theokit/sdk 5.13.0 → 5.14.0
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/CHANGELOG.md +34 -0
- package/dist/{agent-iW5kPpfT.d.cts → agent-DExqjqYy.d.cts} +9 -1
- package/dist/{agent-DSMuwADp.d.ts → agent-Dfw3VsIX.d.ts} +9 -1
- package/dist/{agent-5DSDDH7K.js → agent-T34LCGQM.js} +11 -11
- package/dist/{agent-5DSDDH7K.js.map → agent-T34LCGQM.js.map} +1 -1
- package/dist/{agent-WOMRT3KX.cjs → agent-TL4K7BTG.cjs} +12 -12
- package/dist/{agent-WOMRT3KX.cjs.map → agent-TL4K7BTG.cjs.map} +1 -1
- package/dist/auth/index.cjs +17 -16
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +5 -4
- package/dist/auth/index.js.map +1 -1
- package/dist/{chunk-NHOEXFZT.js → chunk-2HXTNVLM.js} +5 -2
- package/dist/chunk-2HXTNVLM.js.map +1 -0
- package/dist/{chunk-KL7ZUMK3.cjs → chunk-2WY2OFSC.cjs} +146 -77
- package/dist/chunk-2WY2OFSC.cjs.map +1 -0
- package/dist/{chunk-3FSBE4PS.js → chunk-3GTN4HOO.js} +10 -6
- package/dist/chunk-3GTN4HOO.js.map +1 -0
- package/dist/{chunk-XOYNB3YN.js → chunk-3ONIVO2I.js} +3 -3
- package/dist/{chunk-XOYNB3YN.js.map → chunk-3ONIVO2I.js.map} +1 -1
- package/dist/{chunk-7WARNHWW.cjs → chunk-3UMPP553.cjs} +5 -2
- package/dist/chunk-3UMPP553.cjs.map +1 -0
- package/dist/{chunk-NWWTYBD3.cjs → chunk-4KBI37F3.cjs} +5 -5
- package/dist/{chunk-NWWTYBD3.cjs.map → chunk-4KBI37F3.cjs.map} +1 -1
- package/dist/{chunk-S46WJTDL.cjs → chunk-4TEGFMSP.cjs} +6 -6
- package/dist/{chunk-S46WJTDL.cjs.map → chunk-4TEGFMSP.cjs.map} +1 -1
- package/dist/{chunk-QISSETTG.cjs → chunk-5645PMVU.cjs} +6 -4
- package/dist/chunk-5645PMVU.cjs.map +1 -0
- package/dist/{chunk-5A4UFBHW.cjs → chunk-A77UMVMD.cjs} +15 -11
- package/dist/chunk-A77UMVMD.cjs.map +1 -0
- package/dist/{chunk-47EACDOC.cjs → chunk-BZK5QL3N.cjs} +4 -4
- package/dist/{chunk-47EACDOC.cjs.map → chunk-BZK5QL3N.cjs.map} +1 -1
- package/dist/{chunk-5HSMH2ZZ.js → chunk-CJN5CEI3.js} +4 -4
- package/dist/{chunk-5HSMH2ZZ.js.map → chunk-CJN5CEI3.js.map} +1 -1
- package/dist/{chunk-JX4LB6XO.js → chunk-GARVAUCU.js} +93 -24
- package/dist/chunk-GARVAUCU.js.map +1 -0
- package/dist/{chunk-DVP3YMDA.cjs → chunk-LXG6VL6R.cjs} +3 -3
- package/dist/{chunk-DVP3YMDA.cjs.map → chunk-LXG6VL6R.cjs.map} +1 -1
- package/dist/{chunk-ZTP6ZACR.js → chunk-NAVUTK6X.js} +3 -3
- package/dist/{chunk-ZTP6ZACR.js.map → chunk-NAVUTK6X.js.map} +1 -1
- package/dist/{chunk-2SFLLOMN.js → chunk-NVQSBRG6.js} +3 -3
- package/dist/{chunk-2SFLLOMN.js.map → chunk-NVQSBRG6.js.map} +1 -1
- package/dist/{chunk-MS3TQSXU.js → chunk-QD6B6W6I.js} +6 -4
- package/dist/chunk-QD6B6W6I.js.map +1 -0
- package/dist/chunk-R5UQL2R5.cjs +18 -0
- package/dist/{chunk-LO6LIUZ6.cjs.map → chunk-R5UQL2R5.cjs.map} +1 -1
- package/dist/{chunk-4UYHP6NF.cjs → chunk-SNVYOX46.cjs} +28 -28
- package/dist/{chunk-4UYHP6NF.cjs.map → chunk-SNVYOX46.cjs.map} +1 -1
- package/dist/{chunk-NKQVLWDF.js → chunk-ULEK4OM4.js} +3 -3
- package/dist/{chunk-NKQVLWDF.js.map → chunk-ULEK4OM4.js.map} +1 -1
- package/dist/{chunk-2PRGRYEQ.js → chunk-ZOL3L4EH.js} +4 -4
- package/dist/{chunk-2PRGRYEQ.js.map → chunk-ZOL3L4EH.js.map} +1 -1
- package/dist/{compact-session-B7P6EU3Z.cjs → compact-session-D2MQDB6G.cjs} +15 -15
- package/dist/{compact-session-B7P6EU3Z.cjs.map → compact-session-D2MQDB6G.cjs.map} +1 -1
- package/dist/{compact-session-5HMX6KYT.js → compact-session-N2PPHQO6.js} +6 -6
- package/dist/{compact-session-5HMX6KYT.js.map → compact-session-N2PPHQO6.js.map} +1 -1
- package/dist/{cron-DdKzwJqK.d.ts → cron-BubDpFJG.d.ts} +2 -2
- package/dist/{cron-BvxrLW5J.d.cts → cron-CK2v0VWA.d.cts} +2 -2
- package/dist/cron.cjs +11 -11
- package/dist/cron.d.cts +3 -3
- package/dist/cron.d.ts +3 -3
- package/dist/cron.js +10 -10
- package/dist/eval.cjs +10 -10
- package/dist/eval.js +9 -9
- package/dist/index.cjs +69 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -6
- package/dist/index.d.ts +9 -6
- package/dist/index.js +38 -22
- package/dist/index.js.map +1 -1
- package/dist/{inject-session-WOH7TPDX.cjs → inject-session-3ICZIJ2N.cjs} +4 -4
- package/dist/{inject-session-WOH7TPDX.cjs.map → inject-session-3ICZIJ2N.cjs.map} +1 -1
- package/dist/{inject-session-75L3NCNL.js → inject-session-J26SHHIO.js} +3 -3
- package/dist/{inject-session-75L3NCNL.js.map → inject-session-J26SHHIO.js.map} +1 -1
- package/dist/internal/agent-loop/prune-tool-results.d.ts +37 -0
- package/dist/internal/auth/credential-store.d.ts +1 -1
- package/dist/internal/auth/types.d.ts +4 -0
- package/dist/internal/runtime/skills/binary-on-path.d.ts +1 -0
- package/dist/internal/runtime/skills/discover-skills.d.ts +2 -0
- package/dist/mcp-auth.cjs +2 -2
- package/dist/mcp-auth.js +1 -1
- package/dist/models.cjs +11 -11
- package/dist/models.js +4 -4
- package/dist/providers.cjs +6 -6
- package/dist/providers.js +4 -4
- package/dist/{sdk-agent-4-dXI2GS.d.cts → sdk-agent-DwzHcuxy.d.cts} +28 -3
- package/dist/{sdk-agent-CTOJlWA_.d.ts → sdk-agent-a3fW1xUK.d.ts} +28 -3
- package/dist/skills.cjs +4 -4
- package/dist/skills.js +1 -1
- package/dist/subagents-loader.d.cts +2 -2
- package/dist/subagents-loader.d.ts +2 -2
- package/dist/types/agent.d.ts +6 -0
- package/dist/types/run.d.ts +27 -2
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/docs/adr/mutation-testing-scope.md +56 -0
- package/docs/error-codes.md +8 -6
- package/docs/harness-capability-map.md +29 -1
- package/package.json +1 -1
- package/dist/chunk-3FSBE4PS.js.map +0 -1
- package/dist/chunk-5A4UFBHW.cjs.map +0 -1
- package/dist/chunk-7WARNHWW.cjs.map +0 -1
- package/dist/chunk-JX4LB6XO.js.map +0 -1
- package/dist/chunk-KL7ZUMK3.cjs.map +0 -1
- package/dist/chunk-LO6LIUZ6.cjs +0 -18
- package/dist/chunk-MS3TQSXU.js.map +0 -1
- package/dist/chunk-NHOEXFZT.js.map +0 -1
- package/dist/chunk-QISSETTG.cjs.map +0 -1
|
@@ -9,9 +9,9 @@ var chunkFRITRLZQ_cjs = require('./chunk-FRITRLZQ.cjs');
|
|
|
9
9
|
var chunk3WKWBYPO_cjs = require('./chunk-3WKWBYPO.cjs');
|
|
10
10
|
var chunkKX5QXLBS_cjs = require('./chunk-KX5QXLBS.cjs');
|
|
11
11
|
var chunk3EE6LVWT_cjs = require('./chunk-3EE6LVWT.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunk4TEGFMSP_cjs = require('./chunk-4TEGFMSP.cjs');
|
|
13
13
|
var chunkNVXXWAU7_cjs = require('./chunk-NVXXWAU7.cjs');
|
|
14
|
-
var
|
|
14
|
+
var chunk5645PMVU_cjs = require('./chunk-5645PMVU.cjs');
|
|
15
15
|
var chunkEHD25JBZ_cjs = require('./chunk-EHD25JBZ.cjs');
|
|
16
16
|
var chunkCEGU5AVD_cjs = require('./chunk-CEGU5AVD.cjs');
|
|
17
17
|
var chunkRNXXYF22_cjs = require('./chunk-RNXXYF22.cjs');
|
|
@@ -116,7 +116,7 @@ async function loadOne(dir, entryName) {
|
|
|
116
116
|
if (plugin !== null && typeof plugin === "object" && plugin.kind === "model-provider") {
|
|
117
117
|
const profile = plugin.profile;
|
|
118
118
|
if (profile !== void 0 && typeof profile === "object") {
|
|
119
|
-
|
|
119
|
+
chunk4TEGFMSP_cjs.registerProvider(profile);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
return;
|
|
@@ -802,7 +802,7 @@ async function resolveBedrockToken(region) {
|
|
|
802
802
|
return cachedToken.value;
|
|
803
803
|
}
|
|
804
804
|
try {
|
|
805
|
-
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
805
|
+
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-SNVYOX46.cjs', document.baseURI).href)));
|
|
806
806
|
const gen = r("@aws/bedrock-token-generator");
|
|
807
807
|
if (typeof gen.getToken !== "function") return void 0;
|
|
808
808
|
const providers = r("@aws-sdk/credential-providers");
|
|
@@ -836,10 +836,10 @@ var BedrockAnthropicClient = class {
|
|
|
836
836
|
);
|
|
837
837
|
}
|
|
838
838
|
async *stream(request, signal) {
|
|
839
|
-
const region =
|
|
839
|
+
const region = chunk4TEGFMSP_cjs.inferRegionFromModelId(request.model) ?? process.env.AWS_REGION ?? "us-east-1";
|
|
840
840
|
const token = await this.resolveTokenOrThrow(region);
|
|
841
|
-
const bareModel =
|
|
842
|
-
const baseUrl = this.options.baseUrl ??
|
|
841
|
+
const bareModel = chunk4TEGFMSP_cjs.stripBedrockPrefix(request.model);
|
|
842
|
+
const baseUrl = this.options.baseUrl ?? chunk4TEGFMSP_cjs.resolveBedrockBaseUrl(request.model);
|
|
843
843
|
const endpoint = `/model/${encodeURIComponent(bareModel)}/invoke`;
|
|
844
844
|
const url = `${baseUrl}${endpoint}`;
|
|
845
845
|
const response = await postAnthropicRequest({
|
|
@@ -2691,7 +2691,7 @@ async function resolveVertexAccessToken() {
|
|
|
2691
2691
|
async function getAuthClientOrThrow() {
|
|
2692
2692
|
let mod;
|
|
2693
2693
|
try {
|
|
2694
|
-
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-
|
|
2694
|
+
const r = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-SNVYOX46.cjs', document.baseURI).href)));
|
|
2695
2695
|
mod = r("google-auth-library");
|
|
2696
2696
|
} catch (err) {
|
|
2697
2697
|
const isModuleMissing = err instanceof Error && (err.message.includes("Cannot find module") || err.code === "MODULE_NOT_FOUND");
|
|
@@ -2752,8 +2752,8 @@ var VertexAnthropicClient = class {
|
|
|
2752
2752
|
const projectId = this.resolveProjectOrThrow();
|
|
2753
2753
|
const location = this.options.location ?? resolveVertexLocation();
|
|
2754
2754
|
const accessToken = await this.resolveTokenOrThrow();
|
|
2755
|
-
const baseUrl =
|
|
2756
|
-
const bareModel =
|
|
2755
|
+
const baseUrl = chunk4TEGFMSP_cjs.resolveVertexBaseUrl({ projectId, location, modelDialect: "anthropic" });
|
|
2756
|
+
const bareModel = chunk4TEGFMSP_cjs.stripVertexPrefix(request.model);
|
|
2757
2757
|
const endpoint = `/models/${encodeURIComponent(bareModel)}:rawPredict`;
|
|
2758
2758
|
const url = `${baseUrl}${endpoint}`;
|
|
2759
2759
|
const response = await postAnthropicRequest({
|
|
@@ -2802,7 +2802,7 @@ var VertexGeminiClient = class {
|
|
|
2802
2802
|
{ code: "auth_failed" }
|
|
2803
2803
|
);
|
|
2804
2804
|
}
|
|
2805
|
-
const baseUrl =
|
|
2805
|
+
const baseUrl = chunk4TEGFMSP_cjs.resolveVertexBaseUrl({ projectId, location, modelDialect: "gemini" });
|
|
2806
2806
|
const url = `${baseUrl}/chat/completions`;
|
|
2807
2807
|
const innerFetch = chunkEHD25JBZ_cjs.boundFetch(this.options.fetch);
|
|
2808
2808
|
const rewriteFetch = (_input, init) => innerFetch(url, init);
|
|
@@ -2824,7 +2824,7 @@ var VertexRouterClient = class {
|
|
|
2824
2824
|
options;
|
|
2825
2825
|
name = "vertex";
|
|
2826
2826
|
async *stream(request, signal) {
|
|
2827
|
-
const dialect =
|
|
2827
|
+
const dialect = chunk4TEGFMSP_cjs.inferModelDialect(request.model);
|
|
2828
2828
|
if (dialect === "anthropic") {
|
|
2829
2829
|
const inner2 = new VertexAnthropicClient(this.options);
|
|
2830
2830
|
return yield* inner2.stream(request, signal);
|
|
@@ -2836,7 +2836,7 @@ var VertexRouterClient = class {
|
|
|
2836
2836
|
|
|
2837
2837
|
// src/internal/llm/router.ts
|
|
2838
2838
|
function resolveProviderChain(options) {
|
|
2839
|
-
|
|
2839
|
+
chunk4TEGFMSP_cjs.registerBuiltins();
|
|
2840
2840
|
return buildChain(options);
|
|
2841
2841
|
}
|
|
2842
2842
|
function buildChain(options) {
|
|
@@ -2853,7 +2853,7 @@ function buildChain(options) {
|
|
|
2853
2853
|
addClient(options.primary, options.baseUrl);
|
|
2854
2854
|
for (const fallback of options.fallback ?? []) addClient(fallback);
|
|
2855
2855
|
if (clients.length === 0) {
|
|
2856
|
-
if (
|
|
2856
|
+
if (chunk4TEGFMSP_cjs.getProviderProfile(normalizeProviderName(options.primary)) === void 0) {
|
|
2857
2857
|
throw new chunkCEGU5AVD_cjs.ConfigurationError(unregisteredProviderMessage(options.primary), {
|
|
2858
2858
|
code: "provider_unresolved"
|
|
2859
2859
|
});
|
|
@@ -2870,7 +2870,7 @@ function normalizeProviderName(name) {
|
|
|
2870
2870
|
}
|
|
2871
2871
|
function unregisteredProviderMessage(name) {
|
|
2872
2872
|
const normalized = normalizeProviderName(name);
|
|
2873
|
-
const caseOnlyMatch =
|
|
2873
|
+
const caseOnlyMatch = chunk4TEGFMSP_cjs.listProviders().find(
|
|
2874
2874
|
(profile) => normalizeProviderName(profile.name) === normalized
|
|
2875
2875
|
);
|
|
2876
2876
|
if (caseOnlyMatch !== void 0) {
|
|
@@ -2878,11 +2878,11 @@ function unregisteredProviderMessage(name) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
const aliasMessage = caseOnlyAliasMessage(name, normalized);
|
|
2880
2880
|
if (aliasMessage !== void 0) return aliasMessage;
|
|
2881
|
-
const registered =
|
|
2881
|
+
const registered = chunk4TEGFMSP_cjs.listProviders().map((profile) => profile.name).sort((a, b) => a.localeCompare(b)).join(", ");
|
|
2882
2882
|
return `No provider client could be resolved: "${name}" is not a known provider. Registered providers: ${registered}.`;
|
|
2883
2883
|
}
|
|
2884
2884
|
function caseOnlyAliasMessage(name, normalized) {
|
|
2885
|
-
for (const profile of
|
|
2885
|
+
for (const profile of chunk4TEGFMSP_cjs.listProviders()) {
|
|
2886
2886
|
const alias = profile.aliases?.find((entry) => normalizeProviderName(entry) === normalized);
|
|
2887
2887
|
if (alias === void 0) continue;
|
|
2888
2888
|
return `No provider client could be resolved: "${name}" matches the alias "${alias}" of the registered provider "${profile.name}" only when case is ignored, and routes look provider names up in lowercase. Register the alias as "${normalized}", or route to "${profile.name}".`;
|
|
@@ -2890,7 +2890,7 @@ function caseOnlyAliasMessage(name, normalized) {
|
|
|
2890
2890
|
return void 0;
|
|
2891
2891
|
}
|
|
2892
2892
|
function buildTransport(name, routerOptions, perCallBaseUrl) {
|
|
2893
|
-
const baseProfile =
|
|
2893
|
+
const baseProfile = chunk4TEGFMSP_cjs.getProviderProfile(name);
|
|
2894
2894
|
if (baseProfile === void 0) return void 0;
|
|
2895
2895
|
const profile = routerOptions.extractToolCallsFromContent === true && baseProfile.extractToolCallsFromContent !== true ? { ...baseProfile, extractToolCallsFromContent: true } : baseProfile;
|
|
2896
2896
|
const resilience = routerOptions.onRateLimit !== void 0 ? { onRateLimit: routerOptions.onRateLimit } : {};
|
|
@@ -2985,7 +2985,7 @@ function warnUnknownProvidersInApiKeys(apiKeys) {
|
|
|
2985
2985
|
if (apiKeys === void 0) return;
|
|
2986
2986
|
for (const name of Object.keys(apiKeys)) {
|
|
2987
2987
|
if (warnedProviders.has(name)) continue;
|
|
2988
|
-
const profile =
|
|
2988
|
+
const profile = chunk4TEGFMSP_cjs.getProviderProfile(name);
|
|
2989
2989
|
if (profile === void 0) {
|
|
2990
2990
|
warnedProviders.add(name);
|
|
2991
2991
|
chunkRNXXYF22_cjs.diag(
|
|
@@ -3160,7 +3160,7 @@ function checkProviderPrefix(key, provider) {
|
|
|
3160
3160
|
function registerPluginProviderProfiles(entries) {
|
|
3161
3161
|
let registered = 0;
|
|
3162
3162
|
for (const entry of entries) {
|
|
3163
|
-
|
|
3163
|
+
chunk4TEGFMSP_cjs.registerProvider(entry.profile);
|
|
3164
3164
|
registered += 1;
|
|
3165
3165
|
}
|
|
3166
3166
|
return registered;
|
|
@@ -3184,7 +3184,7 @@ var AMBIENT_STORE = {
|
|
|
3184
3184
|
};
|
|
3185
3185
|
function isStoredOAuthAvailable(env = process.env) {
|
|
3186
3186
|
try {
|
|
3187
|
-
return
|
|
3187
|
+
return chunk5645PMVU_cjs.readStoredOAuth(AMBIENT_STORE, env) !== void 0;
|
|
3188
3188
|
} catch {
|
|
3189
3189
|
return false;
|
|
3190
3190
|
}
|
|
@@ -3244,7 +3244,7 @@ function shouldUseRealLocalRuntime(apiKey) {
|
|
|
3244
3244
|
function inferProviderFromApiKey(apiKey) {
|
|
3245
3245
|
const provider = chunkFRITRLZQ_cjs.providerFromApiKeyPrefix(apiKey);
|
|
3246
3246
|
if (provider === void 0) return void 0;
|
|
3247
|
-
return
|
|
3247
|
+
return chunk4TEGFMSP_cjs.getProviderProfile(provider) === void 0 ? void 0 : provider;
|
|
3248
3248
|
}
|
|
3249
3249
|
function detectPrimaryProvider() {
|
|
3250
3250
|
if (process.env.ANTHROPIC_API_KEY !== void 0 && process.env.ANTHROPIC_API_KEY.length > 0) {
|
|
@@ -3271,7 +3271,7 @@ function warnProviderPrecedenceOnce(asked, used) {
|
|
|
3271
3271
|
}
|
|
3272
3272
|
var pluginProvidersAnnounced = false;
|
|
3273
3273
|
function resolveRunProvider(options) {
|
|
3274
|
-
|
|
3274
|
+
chunk4TEGFMSP_cjs.registerBuiltins();
|
|
3275
3275
|
const profiles = options.pluginManager?.aggregated.providerProfiles ?? [];
|
|
3276
3276
|
const registered = registerPluginProviderProfiles(profiles);
|
|
3277
3277
|
if (registered > 0 && !pluginProvidersAnnounced) {
|
|
@@ -3281,7 +3281,7 @@ function resolveRunProvider(options) {
|
|
|
3281
3281
|
`);
|
|
3282
3282
|
}
|
|
3283
3283
|
const parsedModel = chunk3EE6LVWT_cjs.parseModelId(options.model?.id);
|
|
3284
|
-
const modelInferredProvider = parsedModel.provider !== void 0 &&
|
|
3284
|
+
const modelInferredProvider = parsedModel.provider !== void 0 && chunk4TEGFMSP_cjs.getProviderProfile(parsedModel.provider) !== void 0 ? parsedModel.provider : void 0;
|
|
3285
3285
|
const keyInferredProvider = inferProviderFromApiKey(options.agentOptions.apiKey);
|
|
3286
3286
|
const primary = options.agentOptions.providers?.routes?.[0]?.provider ?? keyInferredProvider ?? modelInferredProvider ?? detectPrimaryProvider();
|
|
3287
3287
|
warnProviderPrecedenceOnce(modelInferredProvider, primary);
|
|
@@ -3421,9 +3421,9 @@ function resolveSummarizerRoute(opts) {
|
|
|
3421
3421
|
}
|
|
3422
3422
|
function buildDefaultSummarizer(opts) {
|
|
3423
3423
|
return async (messages) => {
|
|
3424
|
-
|
|
3424
|
+
chunk4TEGFMSP_cjs.registerBuiltins();
|
|
3425
3425
|
const modelPrefix = opts.agentModel.includes("/") ? opts.agentModel.slice(0, opts.agentModel.indexOf("/")) : void 0;
|
|
3426
|
-
const prefixProfile = modelPrefix !== void 0 ?
|
|
3426
|
+
const prefixProfile = modelPrefix !== void 0 ? chunk4TEGFMSP_cjs.getProviderProfile(modelPrefix) : void 0;
|
|
3427
3427
|
const prefixUsable = prefixProfile !== void 0 && (prefixProfile.authType !== "api_key" || prefixProfile.envVars.some((v) => (process.env[v] ?? "").length > 0));
|
|
3428
3428
|
const route = resolveSummarizerRoute({
|
|
3429
3429
|
keyProvider: inferProviderFromApiKey(opts.apiKey),
|
|
@@ -3531,5 +3531,5 @@ exports.shouldUseRealLocalRuntime = shouldUseRealLocalRuntime;
|
|
|
3531
3531
|
exports.trustFilePath = trustFilePath;
|
|
3532
3532
|
exports.tryFirstEvent = tryFirstEvent;
|
|
3533
3533
|
exports.validateApiKeyShape = validateApiKeyShape;
|
|
3534
|
-
//# sourceMappingURL=chunk-
|
|
3535
|
-
//# sourceMappingURL=chunk-
|
|
3534
|
+
//# sourceMappingURL=chunk-SNVYOX46.cjs.map
|
|
3535
|
+
//# sourceMappingURL=chunk-SNVYOX46.cjs.map
|