@nemesis-oss/ollama-sdk 1.14.0 → 1.16.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 +42 -0
- package/README.md +131 -6
- package/dist/{anthropic-DrDUfbfQ.d.ts → anthropic-AKbXnWJU.d.cts} +1 -1
- package/dist/{anthropic-UeaVjLeP.d.cts → anthropic-CTv2acbj.d.ts} +1 -1
- package/dist/generated-api.d.cts +4 -4
- package/dist/generated-api.d.ts +4 -4
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.d.cts +1 -1
- package/dist/generated-runtime.d.ts +1 -1
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +217 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +310 -5
- package/dist/index.d.ts +310 -5
- package/dist/index.js +213 -7
- package/dist/index.js.map +1 -1
- package/dist/mcp-generated.d.cts +1 -1
- package/dist/mcp-generated.d.ts +1 -1
- package/dist/{runtime-BIjr5ME4.d.ts → runtime-CFuv7Ifh.d.ts} +29 -1
- package/dist/{runtime-C4RRHqOs.d.cts → runtime-CdZP-N7j.d.cts} +29 -1
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js.map +1 -1
- package/dist/testing.cjs +13 -11
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +48 -8
- package/dist/testing.d.ts +48 -8
- package/dist/testing.js +13 -11
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -393,6 +393,36 @@ var OllamaGenericClientError = class extends OllamaClientError {
|
|
|
393
393
|
function isDomAbortError(error) {
|
|
394
394
|
return typeof DOMException !== "undefined" && error instanceof DOMException && error.name === "AbortError";
|
|
395
395
|
}
|
|
396
|
+
var NETWORK_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
397
|
+
"ECONNRESET",
|
|
398
|
+
"ECONNREFUSED",
|
|
399
|
+
"EPIPE",
|
|
400
|
+
"ETIMEDOUT",
|
|
401
|
+
"ECONNABORTED",
|
|
402
|
+
"EHOSTUNREACH",
|
|
403
|
+
"ENETUNREACH",
|
|
404
|
+
"ENOTFOUND",
|
|
405
|
+
"EAI_AGAIN",
|
|
406
|
+
"UND_ERR_SOCKET",
|
|
407
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
408
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
409
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
410
|
+
"UND_ERR_CLOSED"
|
|
411
|
+
]);
|
|
412
|
+
var MAX_CAUSE_DEPTH = 4;
|
|
413
|
+
function isNetworkLevelError(error) {
|
|
414
|
+
let current = error;
|
|
415
|
+
for (let depth = 0; depth < MAX_CAUSE_DEPTH && current !== void 0 && current !== null; depth += 1) {
|
|
416
|
+
if (typeof current === "object" && "code" in current) {
|
|
417
|
+
const code = current.code;
|
|
418
|
+
if (typeof code === "string" && NETWORK_ERROR_CODES.has(code)) {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
current = current.cause;
|
|
423
|
+
}
|
|
424
|
+
return false;
|
|
425
|
+
}
|
|
396
426
|
function statusToError(status, message, options) {
|
|
397
427
|
if (status === 401 || status === 403) {
|
|
398
428
|
return new OllamaAuthError(message, { ...options, status });
|
|
@@ -424,6 +454,13 @@ function mapError(error, context = {}) {
|
|
|
424
454
|
request: context.request
|
|
425
455
|
});
|
|
426
456
|
}
|
|
457
|
+
if (isNetworkLevelError(error)) {
|
|
458
|
+
const message2 = error instanceof Error && error.message ? error.message : "Network request failed";
|
|
459
|
+
return new OllamaNetworkError(message2, {
|
|
460
|
+
cause: error,
|
|
461
|
+
request: context.request
|
|
462
|
+
});
|
|
463
|
+
}
|
|
427
464
|
if (error instanceof TypeError) {
|
|
428
465
|
return new OllamaNetworkError(error.message || "Network request failed", {
|
|
429
466
|
cause: error,
|
|
@@ -1649,6 +1686,13 @@ function estimateGenerateRequestTokens(req) {
|
|
|
1649
1686
|
if (req.images !== void 0) total += req.images.length * IMAGE_TOKEN_ESTIMATE;
|
|
1650
1687
|
return total;
|
|
1651
1688
|
}
|
|
1689
|
+
function recommendContextWindow(estimatedTokens) {
|
|
1690
|
+
if (!Number.isFinite(estimatedTokens) || estimatedTokens <= 0) return 4096;
|
|
1691
|
+
const target = estimatedTokens * 1.3;
|
|
1692
|
+
let window = 4096;
|
|
1693
|
+
while (window < target) window *= 2;
|
|
1694
|
+
return window;
|
|
1695
|
+
}
|
|
1652
1696
|
function checkChatContext(req, options = {}) {
|
|
1653
1697
|
return check(estimateChatRequestTokens(req), req.options?.num_ctx, options);
|
|
1654
1698
|
}
|
|
@@ -1658,39 +1702,46 @@ function checkGenerateContext(req, options = {}) {
|
|
|
1658
1702
|
function check(estimatedPromptTokens, requestNumCtx, options) {
|
|
1659
1703
|
const threshold = options.threshold ?? DEFAULT_CONTEXT_WARNING_THRESHOLD;
|
|
1660
1704
|
if (requestNumCtx !== void 0) {
|
|
1705
|
+
const exceeds2 = estimatedPromptTokens > requestNumCtx * threshold;
|
|
1661
1706
|
return {
|
|
1662
1707
|
estimatedPromptTokens,
|
|
1663
1708
|
effectiveContextLength: requestNumCtx,
|
|
1664
1709
|
windowSource: "request",
|
|
1665
|
-
exceedsThreshold:
|
|
1710
|
+
exceedsThreshold: exceeds2,
|
|
1711
|
+
...exceeds2 ? { recommendedNumCtx: recommendContextWindow(estimatedPromptTokens) } : {}
|
|
1666
1712
|
};
|
|
1667
1713
|
}
|
|
1668
1714
|
if (options.defaultContextLength !== void 0) {
|
|
1715
|
+
const exceeds2 = estimatedPromptTokens > options.defaultContextLength * threshold;
|
|
1669
1716
|
return {
|
|
1670
1717
|
estimatedPromptTokens,
|
|
1671
1718
|
effectiveContextLength: options.defaultContextLength,
|
|
1672
1719
|
windowSource: "client-default",
|
|
1673
|
-
exceedsThreshold:
|
|
1720
|
+
exceedsThreshold: exceeds2,
|
|
1721
|
+
...exceeds2 ? { recommendedNumCtx: recommendContextWindow(estimatedPromptTokens) } : {}
|
|
1674
1722
|
};
|
|
1675
1723
|
}
|
|
1724
|
+
const exceeds = estimatedPromptTokens > OLLAMA_FALLBACK_CONTEXT_LENGTH;
|
|
1676
1725
|
return {
|
|
1677
1726
|
estimatedPromptTokens,
|
|
1678
1727
|
effectiveContextLength: OLLAMA_FALLBACK_CONTEXT_LENGTH,
|
|
1679
1728
|
windowSource: "server-fallback",
|
|
1680
|
-
exceedsThreshold:
|
|
1729
|
+
exceedsThreshold: exceeds,
|
|
1730
|
+
...exceeds ? { recommendedNumCtx: recommendContextWindow(estimatedPromptTokens) } : {}
|
|
1681
1731
|
};
|
|
1682
1732
|
}
|
|
1683
1733
|
var OLLAMA_FALLBACK_CONTEXT_LENGTH = 2048;
|
|
1684
1734
|
function contextWarningMessage(check2, kind) {
|
|
1685
1735
|
const where = `OllamaClient.${kind}()`;
|
|
1686
1736
|
const estimate = `~${check2.estimatedPromptTokens} tokens`;
|
|
1737
|
+
const suggestion = check2.recommendedNumCtx !== void 0 ? ` A window of at least ${check2.recommendedNumCtx} tokens would fit this prompt with ~30% headroom (see \`recommendContextWindow\`) \u2014 verify the model's native maximum via \`client.models.getContextLength()\` before adopting it.` : "";
|
|
1687
1738
|
if (check2.windowSource === "request") {
|
|
1688
|
-
return `${where}: estimated prompt size ${estimate} is close to or beyond the request's context window (num_ctx=${check2.effectiveContextLength}). The server will likely silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Raise \`options.num_ctx\` or shorten the conversation
|
|
1739
|
+
return `${where}: estimated prompt size ${estimate} is close to or beyond the request's context window (num_ctx=${check2.effectiveContextLength}). The server will likely silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Raise \`options.num_ctx\` or shorten the conversation.${suggestion} Estimates are heuristic (\xB120\u201330%); see \`estimateTokens\`.`;
|
|
1689
1740
|
}
|
|
1690
1741
|
if (check2.windowSource === "client-default") {
|
|
1691
|
-
return `${where}: estimated prompt size ${estimate} is close to or beyond the client's \`defaultContextLength\` (${check2.effectiveContextLength}, injected as \`num_ctx\`). The server will likely silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Raise \`defaultContextLength\`, set \`options.num_ctx\` per request, or shorten the conversation
|
|
1742
|
+
return `${where}: estimated prompt size ${estimate} is close to or beyond the client's \`defaultContextLength\` (${check2.effectiveContextLength}, injected as \`num_ctx\`). The server will likely silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Raise \`defaultContextLength\`, set \`options.num_ctx\` per request, or shorten the conversation.${suggestion} Estimates are heuristic (\xB120\u201330%); see \`estimateTokens\`.`;
|
|
1692
1743
|
}
|
|
1693
|
-
return `${where}: estimated prompt size ${estimate} outright exceeds Ollama's conservative server-default context window (${OLLAMA_FALLBACK_CONTEXT_LENGTH}\u20134096 tokens when \`num_ctx\` is unset \u2014 model-dependent). Unless the model's default is larger, the server will silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Set \`options.num_ctx\` (or the client's \`defaultContextLength\`) to an explicit window to make truncation visible and controllable
|
|
1744
|
+
return `${where}: estimated prompt size ${estimate} outright exceeds Ollama's conservative server-default context window (${OLLAMA_FALLBACK_CONTEXT_LENGTH}\u20134096 tokens when \`num_ctx\` is unset \u2014 model-dependent). Unless the model's default is larger, the server will silently truncate the top of the conversation \u2014 the model loses earlier turns with no error. Set \`options.num_ctx\` (or the client's \`defaultContextLength\`) to an explicit window to make truncation visible and controllable.${suggestion} Estimates are heuristic (\xB120\u201330%); see \`estimateTokens\`.`;
|
|
1694
1745
|
}
|
|
1695
1746
|
|
|
1696
1747
|
// src/context-discovery.ts
|
|
@@ -6666,6 +6717,56 @@ function toResponse(stream, init = {}) {
|
|
|
6666
6717
|
return new Response(body, { ...init, headers });
|
|
6667
6718
|
}
|
|
6668
6719
|
|
|
6720
|
+
// src/streaming/observe.ts
|
|
6721
|
+
async function* observeStream(source, callbacks = {}) {
|
|
6722
|
+
const { onChunk, onError, onDone, onAbandon, onListenerError } = callbacks;
|
|
6723
|
+
const reportListenerFailure = (error, phase) => {
|
|
6724
|
+
try {
|
|
6725
|
+
onListenerError?.(error, phase);
|
|
6726
|
+
} catch {
|
|
6727
|
+
}
|
|
6728
|
+
};
|
|
6729
|
+
let observerChain = Promise.resolve();
|
|
6730
|
+
const dispatch2 = (phase, task) => {
|
|
6731
|
+
observerChain = observerChain.then(task).then(
|
|
6732
|
+
() => void 0,
|
|
6733
|
+
(error) => {
|
|
6734
|
+
reportListenerFailure(error, phase);
|
|
6735
|
+
}
|
|
6736
|
+
);
|
|
6737
|
+
};
|
|
6738
|
+
let state = "running";
|
|
6739
|
+
try {
|
|
6740
|
+
for await (const chunk of source) {
|
|
6741
|
+
if (onChunk !== void 0) {
|
|
6742
|
+
dispatch2("chunk", () => onChunk(chunk));
|
|
6743
|
+
}
|
|
6744
|
+
yield chunk;
|
|
6745
|
+
}
|
|
6746
|
+
state = "done";
|
|
6747
|
+
if (onDone !== void 0) {
|
|
6748
|
+
dispatch2("done", () => onDone());
|
|
6749
|
+
}
|
|
6750
|
+
} catch (error) {
|
|
6751
|
+
state = "error";
|
|
6752
|
+
try {
|
|
6753
|
+
onError?.(error);
|
|
6754
|
+
} catch (listenerError) {
|
|
6755
|
+
reportListenerFailure(listenerError, "error");
|
|
6756
|
+
}
|
|
6757
|
+
throw error;
|
|
6758
|
+
} finally {
|
|
6759
|
+
if (state === "running") {
|
|
6760
|
+
state = "abandoned";
|
|
6761
|
+
try {
|
|
6762
|
+
onAbandon?.();
|
|
6763
|
+
} catch (listenerError) {
|
|
6764
|
+
reportListenerFailure(listenerError, "abandoned");
|
|
6765
|
+
}
|
|
6766
|
+
}
|
|
6767
|
+
}
|
|
6768
|
+
}
|
|
6769
|
+
|
|
6669
6770
|
// src/quota.ts
|
|
6670
6771
|
var QuotaManager = class {
|
|
6671
6772
|
now;
|
|
@@ -7750,6 +7851,111 @@ var Agent = class {
|
|
|
7750
7851
|
}
|
|
7751
7852
|
};
|
|
7752
7853
|
|
|
7854
|
+
// src/draft-benchmark.ts
|
|
7855
|
+
var DEFAULT_DRAFT_TOKENS = 4;
|
|
7856
|
+
var DEFAULT_SAMPLES = 5;
|
|
7857
|
+
var DEFAULT_NUM_PREDICT = 256;
|
|
7858
|
+
var DEFAULT_SEED = 42;
|
|
7859
|
+
var DEFAULT_GAIN_THRESHOLD = 1.05;
|
|
7860
|
+
function median(values) {
|
|
7861
|
+
const sorted = [...values].sort((a, b) => a - b);
|
|
7862
|
+
const mid = Math.floor(sorted.length / 2);
|
|
7863
|
+
return sorted.length % 2 === 1 ? sorted[mid] ?? 0 : ((sorted[mid - 1] ?? 0) + (sorted[mid] ?? 0)) / 2;
|
|
7864
|
+
}
|
|
7865
|
+
function roundTo(value, decimals) {
|
|
7866
|
+
const factor = 10 ** decimals;
|
|
7867
|
+
return Math.round(value * factor) / factor;
|
|
7868
|
+
}
|
|
7869
|
+
function requirePositiveInteger(name, value) {
|
|
7870
|
+
if (!Number.isInteger(value) || value < 1) {
|
|
7871
|
+
throw new RangeError(
|
|
7872
|
+
`compareDraftPerformance: ${name} must be an integer >= 1 (got ${value}).`
|
|
7873
|
+
);
|
|
7874
|
+
}
|
|
7875
|
+
}
|
|
7876
|
+
async function runSide(client, options, draftNumPredict, samples, numPredict, seed) {
|
|
7877
|
+
const samplingOptions = {
|
|
7878
|
+
num_predict: numPredict,
|
|
7879
|
+
temperature: 0,
|
|
7880
|
+
seed,
|
|
7881
|
+
draft_num_predict: draftNumPredict
|
|
7882
|
+
};
|
|
7883
|
+
if (options.warmup ?? true) {
|
|
7884
|
+
await client.generate({
|
|
7885
|
+
model: options.model,
|
|
7886
|
+
prompt: options.prompt,
|
|
7887
|
+
options: { ...samplingOptions, num_predict: 1 },
|
|
7888
|
+
stream: false,
|
|
7889
|
+
signal: options.signal
|
|
7890
|
+
});
|
|
7891
|
+
}
|
|
7892
|
+
const tokensPerSecond = [];
|
|
7893
|
+
const generationMs = [];
|
|
7894
|
+
for (let i = 0; i < samples; i++) {
|
|
7895
|
+
options.signal?.throwIfAborted();
|
|
7896
|
+
const response = await client.generate({
|
|
7897
|
+
model: options.model,
|
|
7898
|
+
prompt: options.prompt,
|
|
7899
|
+
options: samplingOptions,
|
|
7900
|
+
stream: false,
|
|
7901
|
+
signal: options.signal
|
|
7902
|
+
});
|
|
7903
|
+
const telemetry = formatTelemetry(response);
|
|
7904
|
+
if (Number.isFinite(telemetry.tokensPerSecond) && telemetry.tokensPerSecond > 0) {
|
|
7905
|
+
tokensPerSecond.push(telemetry.tokensPerSecond);
|
|
7906
|
+
generationMs.push(telemetry.generationMs);
|
|
7907
|
+
}
|
|
7908
|
+
}
|
|
7909
|
+
if (tokensPerSecond.length === 0) {
|
|
7910
|
+
throw new OllamaClientError(
|
|
7911
|
+
`compareDraftPerformance: every draft_num_predict=${draftNumPredict} sample returned a non-positive tokens/second. The model name is likely wrong, or the server returned empty generations.`,
|
|
7912
|
+
{ code: "draft_benchmark_no_valid_samples" }
|
|
7913
|
+
);
|
|
7914
|
+
}
|
|
7915
|
+
return {
|
|
7916
|
+
draftNumPredict,
|
|
7917
|
+
medianTokensPerSecond: median(tokensPerSecond),
|
|
7918
|
+
sampleTokensPerSecond: tokensPerSecond,
|
|
7919
|
+
medianEvalDurationMs: median(generationMs)
|
|
7920
|
+
};
|
|
7921
|
+
}
|
|
7922
|
+
async function compareDraftPerformance(client, options) {
|
|
7923
|
+
const draftNumPredict = options.draftNumPredict ?? DEFAULT_DRAFT_TOKENS;
|
|
7924
|
+
requirePositiveInteger("draftNumPredict", draftNumPredict);
|
|
7925
|
+
const samples = options.samples ?? DEFAULT_SAMPLES;
|
|
7926
|
+
requirePositiveInteger("samples", samples);
|
|
7927
|
+
const numPredict = options.numPredict ?? DEFAULT_NUM_PREDICT;
|
|
7928
|
+
requirePositiveInteger("numPredict", numPredict);
|
|
7929
|
+
const seed = options.seed ?? DEFAULT_SEED;
|
|
7930
|
+
if (!Number.isInteger(seed)) {
|
|
7931
|
+
throw new RangeError(`compareDraftPerformance: seed must be an integer (got ${seed}).`);
|
|
7932
|
+
}
|
|
7933
|
+
const gainThreshold = options.gainThreshold ?? DEFAULT_GAIN_THRESHOLD;
|
|
7934
|
+
if (!Number.isFinite(gainThreshold) || gainThreshold <= 0) {
|
|
7935
|
+
throw new RangeError(
|
|
7936
|
+
`compareDraftPerformance: gainThreshold must be a positive finite number (got ${gainThreshold}).`
|
|
7937
|
+
);
|
|
7938
|
+
}
|
|
7939
|
+
options.signal?.throwIfAborted();
|
|
7940
|
+
const baseline = await runSide(client, options, 0, samples, numPredict, seed);
|
|
7941
|
+
const speculative = await runSide(client, options, draftNumPredict, samples, numPredict, seed);
|
|
7942
|
+
const baselineTokensPerSec = roundTo(baseline.medianTokensPerSecond, 1);
|
|
7943
|
+
const speculativeTokensPerSec = roundTo(speculative.medianTokensPerSecond, 1);
|
|
7944
|
+
const speedupMultiplier = baselineTokensPerSec > 0 ? roundTo(speculativeTokensPerSec / baselineTokensPerSec, 2) : 0;
|
|
7945
|
+
return {
|
|
7946
|
+
model: options.model,
|
|
7947
|
+
prompt: options.prompt,
|
|
7948
|
+
draftNumPredict,
|
|
7949
|
+
baselineTokensPerSec,
|
|
7950
|
+
speculativeTokensPerSec,
|
|
7951
|
+
speedupMultiplier,
|
|
7952
|
+
effectiveGain: speedupMultiplier > gainThreshold,
|
|
7953
|
+
gainThreshold,
|
|
7954
|
+
baseline,
|
|
7955
|
+
speculative
|
|
7956
|
+
};
|
|
7957
|
+
}
|
|
7958
|
+
|
|
7753
7959
|
// src/affinity.ts
|
|
7754
7960
|
var DEFAULT_CONCURRENT_MODELS = 1;
|
|
7755
7961
|
var DEFAULT_PER_MODEL_CONCURRENCY = 1;
|
|
@@ -7957,6 +8163,7 @@ exports.ModelAffinityScheduler = ModelAffinityScheduler;
|
|
|
7957
8163
|
exports.ModelsClient = ModelsClient;
|
|
7958
8164
|
exports.NANOS_PER_MS = NANOS_PER_MS;
|
|
7959
8165
|
exports.NANOS_PER_SECOND = NANOS_PER_SECOND;
|
|
8166
|
+
exports.NETWORK_ERROR_CODES = NETWORK_ERROR_CODES;
|
|
7960
8167
|
exports.NOOP_LOGGER = NOOP_LOGGER;
|
|
7961
8168
|
exports.OLLAMA_CLOUD_BASE_URL = OLLAMA_CLOUD_BASE_URL;
|
|
7962
8169
|
exports.OLLAMA_FALLBACK_CONTEXT_LENGTH = OLLAMA_FALLBACK_CONTEXT_LENGTH;
|
|
@@ -8011,6 +8218,7 @@ exports.checkChatContext = checkChatContext;
|
|
|
8011
8218
|
exports.checkEndpointHealth = checkEndpointHealth;
|
|
8012
8219
|
exports.checkGenerateContext = checkGenerateContext;
|
|
8013
8220
|
exports.compactConversationHistory = compactConversationHistory;
|
|
8221
|
+
exports.compareDraftPerformance = compareDraftPerformance;
|
|
8014
8222
|
exports.composeMiddleware = composeMiddleware;
|
|
8015
8223
|
exports.contextWarningMessage = contextWarningMessage;
|
|
8016
8224
|
exports.createConsoleLogger = createConsoleLogger;
|
|
@@ -8044,6 +8252,7 @@ exports.inferRuntimeMode = inferRuntimeMode;
|
|
|
8044
8252
|
exports.isKeepAliveSugar = isKeepAliveSugar;
|
|
8045
8253
|
exports.isKnownDoneReason = isKnownDoneReason;
|
|
8046
8254
|
exports.isModelResident = isModelResident;
|
|
8255
|
+
exports.isNetworkLevelError = isNetworkLevelError;
|
|
8047
8256
|
exports.isSameToolCall = isSameToolCall;
|
|
8048
8257
|
exports.listAllMcpTools = listAllMcpTools;
|
|
8049
8258
|
exports.listAvailableModels = listAvailableModels;
|
|
@@ -8056,10 +8265,12 @@ exports.normalizeChatStream = normalizeChatStream;
|
|
|
8056
8265
|
exports.normalizeGenerateStream = normalizeGenerateStream;
|
|
8057
8266
|
exports.normalizeKeepAlive = normalizeKeepAlive;
|
|
8058
8267
|
exports.normalizeProgressStream = normalizeProgressStream;
|
|
8268
|
+
exports.observeStream = observeStream;
|
|
8059
8269
|
exports.parseFrontmatter = parseFrontmatter;
|
|
8060
8270
|
exports.parseNdjsonStream = parseNdjsonStream;
|
|
8061
8271
|
exports.parseSseStream = parseSseStream;
|
|
8062
8272
|
exports.parseStructuredOutput = parseStructuredOutput;
|
|
8273
|
+
exports.recommendContextWindow = recommendContextWindow;
|
|
8063
8274
|
exports.registerMcpTools = registerMcpTools;
|
|
8064
8275
|
exports.resolveContextLength = resolveContextLength;
|
|
8065
8276
|
exports.resolveCredentialEndpoints = resolveCredentialEndpoints;
|