@nemesis-oss/ollama-sdk 1.18.0 → 1.19.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +1 -1
  3. package/dist/{anthropic-BvHOsidk.d.cts → anthropic-CAvwqIjx.d.ts} +3 -3
  4. package/dist/{anthropic-CvGVSoVP.d.ts → anthropic-DIPnBwlf.d.cts} +3 -3
  5. package/dist/{compose-CeFbHJeO.d.ts → compose-75UFDzOO.d.ts} +1 -1
  6. package/dist/{compose-DFkmtUOP.d.cts → compose-C4QxEZOS.d.cts} +1 -1
  7. package/dist/generated-api.cjs +5 -3
  8. package/dist/generated-api.cjs.map +1 -1
  9. package/dist/generated-api.d.cts +9 -9
  10. package/dist/generated-api.d.ts +9 -9
  11. package/dist/generated-api.js +5 -3
  12. package/dist/generated-api.js.map +1 -1
  13. package/dist/generated-runtime.cjs +22 -4
  14. package/dist/generated-runtime.cjs.map +1 -1
  15. package/dist/generated-runtime.d.cts +2 -2
  16. package/dist/generated-runtime.d.ts +2 -2
  17. package/dist/generated-runtime.js +22 -4
  18. package/dist/generated-runtime.js.map +1 -1
  19. package/dist/index.cjs +48 -14
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +76 -36
  22. package/dist/index.d.ts +76 -36
  23. package/dist/index.js +48 -15
  24. package/dist/index.js.map +1 -1
  25. package/dist/mcp/tools.json +3 -3
  26. package/dist/mcp-generated.cjs +5 -3
  27. package/dist/mcp-generated.cjs.map +1 -1
  28. package/dist/mcp-generated.d.cts +2 -2
  29. package/dist/mcp-generated.d.ts +2 -2
  30. package/dist/mcp-generated.js +5 -3
  31. package/dist/mcp-generated.js.map +1 -1
  32. package/dist/{runtime-CdZP-N7j.d.cts → runtime-C28YEAHC.d.cts} +28 -5
  33. package/dist/{runtime-CFuv7Ifh.d.ts → runtime-DYCxYGG-.d.ts} +28 -5
  34. package/dist/skills.cjs.map +1 -1
  35. package/dist/skills.d.cts +3 -3
  36. package/dist/skills.d.ts +3 -3
  37. package/dist/skills.js.map +1 -1
  38. package/dist/{types-DbPnfVh-.d.cts → types-Y3u0FtdN.d.cts} +10 -0
  39. package/dist/{types-DbPnfVh-.d.ts → types-Y3u0FtdN.d.ts} +10 -0
  40. package/package.json +2 -1
package/dist/index.d.cts CHANGED
@@ -1,12 +1,12 @@
1
- import { T as ThinkingMetadata, M as ModelResponse, R as RequestCancellationOptions, S as ShowRequestOptions, a as ShowResponse, P as PullRequestOptions, b as ProgressResponse, c as PushRequestOptions, C as CreateRequestOptions, D as DeleteRequestOptions, d as StatusResponse, e as CopyRequestOptions, f as PsResponse, V as VersionResponse, g as ToolParameters, h as ThinkValue, i as ToolCall, j as ChatRequestOptions, k as ModelOptions, l as ToolDefinition, F as FormatOption, m as ChatResponse, n as Message, G as GenerateRequestOptions, o as GenerateResponse, E as EmbedRequestOptions, p as EmbedResponse, q as EmbeddingsRequestOptions, r as EmbeddingsResponse, W as WebSearchRequestOptions, s as WebSearchResponse, t as WebFetchRequestOptions, u as WebFetchResponse, U as UsageRequestOptions, B as BalanceRequestOptions, v as PingResult, w as VisionInput } from './types-DbPnfVh-.cjs';
2
- export { L as ListResponse, x as Logprob, y as LogprobToken, z as ModelDetails, A as Role, H as ToolCallFunction, I as ToolFunctionDefinition, J as ToolProperty, K as UsageRange, N as UsageScope, O as WebSearchResult, Q as imageStringNeedsResolution, X as resolveImageInput } from './types-DbPnfVh-.cjs';
3
- import { H as HttpClient, F as FetchLike, M as Middleware, L as Logger, R as RequestLifecycleHook, c as OllamaStreamEvent, A as AbortableAsyncIterable, d as OllamaStreamEventType, P as ProgressStreamResult, B as BinaryBody, O as OllamaRuntime, C as ChatStreamResult, G as GenerateStreamResult, e as RawUsageSource, T as TokenUsage } from './runtime-CdZP-N7j.cjs';
4
- export { D as DoneEvent, E as ErrorEvent, f as HttpBody, g as HttpClientOptions, h as HttpRequestOptions, i as LifecycleErrorEvent, j as LifecycleRetryEvent, k as LifecycleStartEvent, l as LifecycleSuccessEvent, m as LogFn, n as MessageEvent, o as MiddlewareContext, N as NANOS_PER_MS, p as NANOS_PER_SECOND, q as NETWORK_ERROR_CODES, r as NOOP_LOGGER, s as NextFunction, t as OllamaAbortError, u as OllamaAgentMaxIterationsError, v as OllamaAgentMaxToolCallsError, w as OllamaAgentToolLoopError, x as OllamaAuthError, y as OllamaBadGatewayError, z as OllamaClientError, J as OllamaClientErrorOptions, K as OllamaErrorRequestContext, Q as OllamaErrorResponseContext, U as OllamaGenericClientError, V as OllamaIncompatibleModelError, W as OllamaMcpError, X as OllamaModelRoutingError, Y as OllamaNetworkError, Z as OllamaNotFoundError, _ as OllamaOverloadedError, $ as OllamaQuotaExceededError, a0 as OllamaRateLimitError, a1 as OllamaRequestTooLargeError, a2 as OllamaRequestValidationError, a3 as OllamaResponseValidationError, a4 as OllamaServerError, a5 as OllamaServerVersionUnknownError, a6 as OllamaSkillInvalidError, a7 as OllamaSkillNotFoundError, a8 as OllamaStreamError, a9 as OllamaTimeoutError, aa as OllamaToolTimeoutError, ab as OllamaToolValidationError, ac as OllamaUnsupportedCapabilityError, ad as RequestContext, ae as RequestLifecycleEvent, af as ResponseContext, ag as SseEvent, ah as ThinkingEvent, ai as TokenEvent, aj as ToolCallEvent, ak as composeMiddleware, al as createConsoleLogger, am as extractUsage, an as isNetworkLevelError, ao as mapError, ap as parseSseStream } from './runtime-CdZP-N7j.cjs';
1
+ import { T as ThinkingMetadata, M as ModelResponse, R as RequestCancellationOptions, S as ShowRequestOptions, a as ShowResponse, P as PullRequestOptions, b as ProgressResponse, c as PushRequestOptions, C as CreateRequestOptions, D as DeleteRequestOptions, d as StatusResponse, e as CopyRequestOptions, f as PsResponse, V as VersionResponse, g as ToolParameters, h as ThinkValue, i as ToolCall, j as ChatRequestOptions, k as ModelOptions, l as ToolDefinition, F as FormatOption, m as ChatResponse, n as Message, G as GenerateRequestOptions, o as GenerateResponse, E as EmbedRequestOptions, p as EmbedResponse, q as EmbeddingsRequestOptions, r as EmbeddingsResponse, W as WebSearchRequestOptions, s as WebSearchResponse, t as WebFetchRequestOptions, u as WebFetchResponse, U as UsageRequestOptions, B as BalanceRequestOptions, v as PingResult, w as VisionInput } from './types-Y3u0FtdN.cjs';
2
+ export { L as ListResponse, x as Logprob, y as LogprobToken, z as ModelDetails, A as Role, H as ToolCallFunction, I as ToolFunctionDefinition, J as ToolProperty, K as UsageRange, N as UsageScope, O as WebSearchResult, Q as imageStringNeedsResolution, X as resolveImageInput } from './types-Y3u0FtdN.cjs';
3
+ import { H as HttpClient, F as FetchLike, M as Middleware, L as Logger, R as RequestLifecycleHook, c as OllamaStreamEvent, A as AbortableAsyncIterable, d as OllamaStreamEventType, P as ProgressStreamResult, B as BinaryBody, O as OllamaRuntime, C as ChatStreamResult, G as GenerateStreamResult, e as RawUsageSource, T as TokenUsage } from './runtime-C28YEAHC.cjs';
4
+ export { D as DoneEvent, E as ErrorEvent, f as HttpBody, g as HttpClientOptions, h as HttpRequestOptions, i as LifecycleErrorEvent, j as LifecycleRetryEvent, k as LifecycleStartEvent, l as LifecycleSuccessEvent, m as LogFn, n as MessageEvent, o as MiddlewareContext, N as NANOS_PER_MS, p as NANOS_PER_SECOND, q as NETWORK_ERROR_CODES, r as NOOP_LOGGER, s as NextFunction, t as OllamaAbortError, u as OllamaAgentMaxIterationsError, v as OllamaAgentMaxToolCallsError, w as OllamaAgentToolLoopError, x as OllamaAuthError, y as OllamaBadGatewayError, z as OllamaClientError, J as OllamaClientErrorOptions, K as OllamaErrorRequestContext, Q as OllamaErrorResponseContext, U as OllamaGenericClientError, V as OllamaIncompatibleModelError, W as OllamaMcpError, X as OllamaModelRoutingError, Y as OllamaNetworkError, Z as OllamaNotFoundError, _ as OllamaOverloadedError, $ as OllamaPaymentRequiredError, a0 as OllamaQuotaExceededError, a1 as OllamaRateLimitError, a2 as OllamaRequestTooLargeError, a3 as OllamaRequestValidationError, a4 as OllamaResponseValidationError, a5 as OllamaServerError, a6 as OllamaServerVersionUnknownError, a7 as OllamaSkillInvalidError, a8 as OllamaSkillNotFoundError, a9 as OllamaStreamError, aa as OllamaTimeoutError, ab as OllamaToolTimeoutError, ac as OllamaToolValidationError, ad as OllamaUnsupportedCapabilityError, ae as RequestContext, af as RequestLifecycleEvent, ag as ResponseContext, ah as SseEvent, ai as ThinkingEvent, aj as TokenEvent, ak as ToolCallEvent, al as composeMiddleware, am as createConsoleLogger, an as extractUsage, ao as isNetworkLevelError, ap as mapError, aq as parseSseStream } from './runtime-C28YEAHC.cjs';
5
5
  import { z } from 'zod';
6
- import { R as RequestRunner, S as SystemOneChoiceAnswer, o as SystemOneNoulAnswer, p as SystemOneScoreAnswer, q as SystemOneChoiceQuestion, r as SystemOneNoulQuestion, s as SystemOneScoreQuestion, t as SystemOneRequest$1, u as SystemOneResponse$1, v as SystemOneContent, N as NativeApi, w as OpenAICompatClient, x as AnthropicCompatClient } from './anthropic-BvHOsidk.cjs';
7
- export { y as AnthropicCacheControl, z as AnthropicContentBlock, B as AnthropicImageContentBlock, C as AnthropicMessage, n as AnthropicMessageStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, D as AnthropicMessagesStream, E as AnthropicMetadata, F as AnthropicOutputConfig, G as AnthropicRedactedThinkingContentBlock, H as AnthropicSystem, I as AnthropicSystemTextBlock, J as AnthropicTextContentBlock, K as AnthropicThinkingConfig, L as AnthropicThinkingContentBlock, M as AnthropicTool, P as AnthropicToolChoice, Q as AnthropicToolResultContentBlock, T as AnthropicToolUseContentBlock, U as AnthropicUnknownStreamEvent, V as OllamaAnthropicContentBlock, W as OllamaAnthropicMessage, X as OllamaAnthropicMessagesRequest, Y as OllamaAnthropicSystem, Z as OllamaAnthropicSystemTextBlock, _ as OllamaAnthropicTextContentBlock, $ as OllamaAnthropicThinkingConfig, a0 as OllamaAnthropicTool, a1 as OllamaAnthropicToolResultContentBlock, a2 as OllamaOpenAIChatCompletionRequest, a3 as OllamaOpenAIChatContentPart, a4 as OllamaOpenAIChatMessage, a5 as OllamaOpenAICompletionRequest, a6 as OllamaOpenAIEmbeddingRequest, a7 as OllamaOpenAIImageDataUrl, a8 as OllamaOpenAIReasoningEffort, a9 as OllamaOpenAIResponsesRequest, aa as OpenAIChatCompletionChoice, b as OpenAIChatCompletionChunk, ab as OpenAIChatCompletionChunkChoice, ac as OpenAIChatCompletionDelta, O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, ad as OpenAIChatCompletionStream, ae as OpenAICompletionChoice, e as OpenAICompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, af as OpenAICompletionStream, ag as OpenAIContentPart, ah as OpenAIEmbeddingInput, ai as OpenAIEmbeddingItem, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, aj as OpenAIFunctionDefinition, ak as OpenAIImageUrlContentPart, h as OpenAIListModelsResponse, al as OpenAIMessage, i as OpenAIModelItem, am as OpenAIReasoningEffort, an as OpenAIResponseFormat, ao as OpenAIResponsesCompletedEvent, ap as OpenAIResponsesContentPartAddedEvent, aq as OpenAIResponsesContentPartDoneEvent, ar as OpenAIResponsesCreatedEvent, as as OpenAIResponsesError, at as OpenAIResponsesEventBase, au as OpenAIResponsesFailedEvent, av as OpenAIResponsesFunctionCallArgumentsDeltaEvent, aw as OpenAIResponsesFunctionCallArgumentsDoneEvent, ax as OpenAIResponsesInProgressEvent, ay as OpenAIResponsesIncompleteDetails, az as OpenAIResponsesIncompleteEvent, aA as OpenAIResponsesOutputContent, aB as OpenAIResponsesOutputFunctionCall, aC as OpenAIResponsesOutputItem, aD as OpenAIResponsesOutputItemAddedEvent, aE as OpenAIResponsesOutputItemDoneEvent, aF as OpenAIResponsesOutputMessage, aG as OpenAIResponsesOutputReasoning, aH as OpenAIResponsesOutputRefusal, aI as OpenAIResponsesOutputTextContent, aJ as OpenAIResponsesOutputTextDeltaEvent, aK as OpenAIResponsesOutputTextDoneEvent, aL as OpenAIResponsesQueuedEvent, aM as OpenAIResponsesReasoningSummaryPartAddedEvent, aN as OpenAIResponsesReasoningSummaryPartDoneEvent, aO as OpenAIResponsesReasoningSummaryTextDeltaEvent, aP as OpenAIResponsesReasoningSummaryTextDoneEvent, aQ as OpenAIResponsesReasoningTextDeltaEvent, aR as OpenAIResponsesReasoningTextDoneEvent, aS as OpenAIResponsesRefusalDeltaEvent, aT as OpenAIResponsesRefusalDoneEvent, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, aU as OpenAIResponsesStatus, aV as OpenAIResponsesStream, aW as OpenAIResponsesStreamError, l as OpenAIResponsesStreamEvent, aX as OpenAIResponsesUsage, aY as OpenAIStreamOptions, aZ as OpenAITextContentPart, a_ as OpenAITool, a$ as OpenAIToolCall, b0 as OpenAIToolCallDelta, b1 as OpenAIUsage, b2 as SystemOneConfidence, b3 as SystemOneProbabilities } from './anthropic-BvHOsidk.cjs';
8
- import { T as ToolHandler, a as Tool, A as AnyTool, b as ToolRegistry, c as ToolExecutionResult } from './compose-DFkmtUOP.cjs';
9
- export { d as AppliedSkillResult, e as ApplySkillOptions, P as ParsedFrontmatter, S as Skill, f as SkillFrontmatter, g as SkillSummary, h as ToolExecutionContext, i as ToolExecutionFailure, j as ToolExecutionSuccess, k as ToolRegistryOptions, l as applySkill, p as parseFrontmatter } from './compose-DFkmtUOP.cjs';
6
+ import { R as RequestRunner, S as SystemOneChoiceAnswer, o as SystemOneNoulAnswer, p as SystemOneScoreAnswer, q as SystemOneChoiceQuestion, r as SystemOneNoulQuestion, s as SystemOneScoreQuestion, t as SystemOneRequest$1, u as SystemOneResponse$1, v as SystemOneContent, N as NativeApi, w as OpenAICompatClient, x as AnthropicCompatClient } from './anthropic-DIPnBwlf.cjs';
7
+ export { y as AnthropicCacheControl, z as AnthropicContentBlock, B as AnthropicImageContentBlock, C as AnthropicMessage, n as AnthropicMessageStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, D as AnthropicMessagesStream, E as AnthropicMetadata, F as AnthropicOutputConfig, G as AnthropicRedactedThinkingContentBlock, H as AnthropicSystem, I as AnthropicSystemTextBlock, J as AnthropicTextContentBlock, K as AnthropicThinkingConfig, L as AnthropicThinkingContentBlock, M as AnthropicTool, P as AnthropicToolChoice, Q as AnthropicToolResultContentBlock, T as AnthropicToolUseContentBlock, U as AnthropicUnknownStreamEvent, V as OllamaAnthropicContentBlock, W as OllamaAnthropicMessage, X as OllamaAnthropicMessagesRequest, Y as OllamaAnthropicSystem, Z as OllamaAnthropicSystemTextBlock, _ as OllamaAnthropicTextContentBlock, $ as OllamaAnthropicThinkingConfig, a0 as OllamaAnthropicTool, a1 as OllamaAnthropicToolResultContentBlock, a2 as OllamaOpenAIChatCompletionRequest, a3 as OllamaOpenAIChatContentPart, a4 as OllamaOpenAIChatMessage, a5 as OllamaOpenAICompletionRequest, a6 as OllamaOpenAIEmbeddingRequest, a7 as OllamaOpenAIImageDataUrl, a8 as OllamaOpenAIReasoningEffort, a9 as OllamaOpenAIResponsesRequest, aa as OpenAIChatCompletionChoice, b as OpenAIChatCompletionChunk, ab as OpenAIChatCompletionChunkChoice, ac as OpenAIChatCompletionDelta, O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, ad as OpenAIChatCompletionStream, ae as OpenAICompletionChoice, e as OpenAICompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, af as OpenAICompletionStream, ag as OpenAIContentPart, ah as OpenAIEmbeddingInput, ai as OpenAIEmbeddingItem, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, aj as OpenAIFunctionDefinition, ak as OpenAIImageUrlContentPart, h as OpenAIListModelsResponse, al as OpenAIMessage, i as OpenAIModelItem, am as OpenAIReasoningEffort, an as OpenAIResponseFormat, ao as OpenAIResponsesCompletedEvent, ap as OpenAIResponsesContentPartAddedEvent, aq as OpenAIResponsesContentPartDoneEvent, ar as OpenAIResponsesCreatedEvent, as as OpenAIResponsesError, at as OpenAIResponsesEventBase, au as OpenAIResponsesFailedEvent, av as OpenAIResponsesFunctionCallArgumentsDeltaEvent, aw as OpenAIResponsesFunctionCallArgumentsDoneEvent, ax as OpenAIResponsesInProgressEvent, ay as OpenAIResponsesIncompleteDetails, az as OpenAIResponsesIncompleteEvent, aA as OpenAIResponsesOutputContent, aB as OpenAIResponsesOutputFunctionCall, aC as OpenAIResponsesOutputItem, aD as OpenAIResponsesOutputItemAddedEvent, aE as OpenAIResponsesOutputItemDoneEvent, aF as OpenAIResponsesOutputMessage, aG as OpenAIResponsesOutputReasoning, aH as OpenAIResponsesOutputRefusal, aI as OpenAIResponsesOutputTextContent, aJ as OpenAIResponsesOutputTextDeltaEvent, aK as OpenAIResponsesOutputTextDoneEvent, aL as OpenAIResponsesQueuedEvent, aM as OpenAIResponsesReasoningSummaryPartAddedEvent, aN as OpenAIResponsesReasoningSummaryPartDoneEvent, aO as OpenAIResponsesReasoningSummaryTextDeltaEvent, aP as OpenAIResponsesReasoningSummaryTextDoneEvent, aQ as OpenAIResponsesReasoningTextDeltaEvent, aR as OpenAIResponsesReasoningTextDoneEvent, aS as OpenAIResponsesRefusalDeltaEvent, aT as OpenAIResponsesRefusalDoneEvent, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, aU as OpenAIResponsesStatus, aV as OpenAIResponsesStream, aW as OpenAIResponsesStreamError, l as OpenAIResponsesStreamEvent, aX as OpenAIResponsesUsage, aY as OpenAIStreamOptions, aZ as OpenAITextContentPart, a_ as OpenAITool, a$ as OpenAIToolCall, b0 as OpenAIToolCallDelta, b1 as OpenAIUsage, b2 as SystemOneConfidence, b3 as SystemOneProbabilities } from './anthropic-DIPnBwlf.cjs';
8
+ import { T as ToolHandler, a as Tool, A as AnyTool, b as ToolRegistry, c as ToolExecutionResult } from './compose-C4QxEZOS.cjs';
9
+ export { d as AppliedSkillResult, e as ApplySkillOptions, P as ParsedFrontmatter, S as Skill, f as SkillFrontmatter, g as SkillSummary, h as ToolExecutionContext, i as ToolExecutionFailure, j as ToolExecutionSuccess, k as ToolRegistryOptions, l as applySkill, p as parseFrontmatter } from './compose-C4QxEZOS.cjs';
10
10
  import { M as McpClientLike, a as McpToolDescriptor, b as McpTask, c as McpCallToolResult } from './types-CI-gM2u5.cjs';
11
11
  export { d as McpContentBlock, e as McpCreateTaskResult, f as McpElicitationFormRequest, g as McpElicitationHandlers, h as McpElicitationRequest, i as McpElicitationResult, j as McpElicitationUrlRequest, k as McpIcon, l as McpInputRequiredResult, m as McpListToolsParams, n as McpListToolsResult, o as McpRequestOptions, p as McpServerCapabilities, q as McpTaskMethod, r as McpTaskRequest, s as McpTaskStatus, t as McpToolAnnotations, u as McpToolCallResult, v as McpToolExecution } from './types-CI-gM2u5.cjs';
12
12
  import * as Otel from '@opentelemetry/api';
@@ -1655,25 +1655,34 @@ declare function batchEmbed(client: OllamaClient, options: EmbedBatchOptions): P
1655
1655
  */
1656
1656
 
1657
1657
  /**
1658
- * Maximum total request size, in bytes, accepted by `/v1/systemone`
1659
- * when the request body carries a non-empty `images` array.
1658
+ * Whole-request size cap, in bytes, for `/v1/systemone` — the maximum
1659
+ * serialized size of the complete request, base64 image bytes included.
1660
1660
  *
1661
- * The Ollama server enforces this limit server-side and rejects
1661
+ * Part of the dual cap clarified upstream on 2026-10-16: every request
1662
+ * must satisfy BOTH bounds simultaneously — this whole-request cap AND
1663
+ * the text-and-schema cap of {@link MAX_SYSTEM_ONE_REQUEST_BYTES}
1664
+ * (64 KiB, images excluded). The bumped whole-request cap exists
1665
+ * specifically to accommodate base64-encoded image bytes shared across
1666
+ * all questions in a single System One call; the text and schema
1667
+ * portion may never exceed 64 KiB regardless of whether images are
1668
+ * attached.
1669
+ *
1670
+ * The Ollama server enforces both bounds server-side and rejects
1662
1671
  * oversized payloads with HTTP 413. The SDK's runtime also enforces
1663
- * it client-side (see `OllamaRuntime`'s `maxRequestBytesWithImages`
1672
+ * them client-side (see `OllamaRuntime`'s `maxRequestBytesWithImages`
1664
1673
  * handling) so the round-trip is avoided.
1665
- *
1666
- * Without images, the limit is the much smaller
1667
- * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB) — the bumped
1668
- * images-cap exists specifically to accommodate base64-encoded image
1669
- * bytes shared across all questions in a single System One call.
1670
1674
  */
1671
1675
  declare const MAX_SYSTEM_ONE_IMAGES_BYTES: number;
1672
1676
  /**
1673
- * Maximum total request size, in bytes, for `/v1/systemone` when no
1674
- * images are attached. The Ollama server caps the JSON-only payload
1675
- * at 64 KiB; the runtime enforces this client-side (see
1676
- * `OllamaRuntime`'s `maxRequestBytes`).
1677
+ * Text-and-schema size cap, in bytes, for `/v1/systemone` — the maximum
1678
+ * serialized size of the request with its `images` array excluded.
1679
+ *
1680
+ * Part of the dual cap clarified upstream on 2026-10-16: this bound
1681
+ * applies to EVERY request, images or not — attaching images raises
1682
+ * the whole-request ceiling to {@link MAX_SYSTEM_ONE_IMAGES_BYTES}
1683
+ * (32 MiB) but never relaxes this 64 KiB text-and-schema ceiling. The
1684
+ * runtime enforces both bounds client-side (see `OllamaRuntime`'s
1685
+ * `maxRequestBytes` handling).
1677
1686
  */
1678
1687
  declare const MAX_SYSTEM_ONE_REQUEST_BYTES: number;
1679
1688
  /**
@@ -1740,16 +1749,33 @@ type SystemOneAnswers<Q extends SystemOneQuestions = SystemOneQuestions> = {
1740
1749
  * ## Image support
1741
1750
  *
1742
1751
  * The `images` field accepts up to N base64-encoded images shared by
1743
- * all questions in the request. Total request payload (JSON + images)
1744
- * must remain within {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB);
1745
- * requests without images are capped at
1746
- * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB).
1752
+ * all questions in the request. The dual cap (2026-10-16 upstream
1753
+ * clarification) applies to every request simultaneously: the text and
1754
+ * schema portion (images excluded) must stay within
1755
+ * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB), and the whole payload
1756
+ * (JSON + images) within {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB).
1747
1757
  *
1748
1758
  * Use {@link estimateSystemOneRequestBytes} for a client-side pre-flight
1749
1759
  * check before sending a large multi-image batch — the runtime also
1750
- * enforces the limit, but the early check avoids the round-trip when
1760
+ * enforces both caps, but the early check avoids the round-trip when
1751
1761
  * the caller already knows the payload is too large.
1752
1762
  *
1763
+ * ## Context window
1764
+ *
1765
+ * Beyond the byte caps, upstream requires the complete input (state,
1766
+ * questions, and images) to fit the model's loaded context window, and
1767
+ * System One never truncates input — oversized prompts are rejected by
1768
+ * the server with HTTP 400 locally ("a rendered prompt that exceeds the
1769
+ * loaded context"), not 413 (which is reserved for the byte caps
1770
+ * above); for cloud requests, upstream documents 413 for input that
1771
+ * exceeds the model's context window (65,536 tokens) as well as for
1772
+ * requests over 13 MiB.
1773
+ * Decision models (Nimble, Tev) additionally reserve two token
1774
+ * positions at the end of the window for scoring. The SDK deliberately
1775
+ * does not estimate this client-side (upstream documents no
1776
+ * tokenization formula); callers who need the real limit can use
1777
+ * `client.models.getContextLength()`.
1778
+ *
1753
1779
  * Requires Clef or Clef Flash with vision weights. URLs and data URLs
1754
1780
  * are NOT supported — pre-encode the bytes to base64 before adding to
1755
1781
  * the array.
@@ -1768,8 +1794,12 @@ interface SystemOneResponse<Q extends SystemOneQuestions = SystemOneQuestions> e
1768
1794
  }
1769
1795
  /**
1770
1796
  * Estimate the on-the-wire byte size of a System One request body, for
1771
- * pre-flight size validation against {@link MAX_SYSTEM_ONE_REQUEST_BYTES}
1772
- * (no images) or {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (with images).
1797
+ * pre-flight validation against the dual cap (2026-10-16 upstream
1798
+ * clarification): the whole body against
1799
+ * {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB) and, when `images` is
1800
+ * attached, the images-excluded portion against
1801
+ * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB) — pass
1802
+ * `{ excludeImages: true }` to measure the text-and-schema portion.
1773
1803
  *
1774
1804
  * The estimate is conservative: it uses `JSON.stringify` length and
1775
1805
  * assumes UTF-8 encoding. The actual wire size may differ slightly due
@@ -1781,12 +1811,18 @@ interface SystemOneResponse<Q extends SystemOneQuestions = SystemOneQuestions> e
1781
1811
  * ```ts
1782
1812
  * const request: SystemOneRequest = { ... };
1783
1813
  * const bytes = estimateSystemOneRequestBytes(request);
1784
- * const cap = request.images?.length ? MAX_SYSTEM_ONE_IMAGES_BYTES : MAX_SYSTEM_ONE_REQUEST_BYTES;
1785
- * if (bytes > cap) throw new Error(`payload ${bytes}B exceeds cap ${cap}B`);
1814
+ * const textBytes = request.images?.length
1815
+ * ? estimateSystemOneRequestBytes(request, { excludeImages: true })
1816
+ * : bytes;
1817
+ * if (textBytes > MAX_SYSTEM_ONE_REQUEST_BYTES || bytes > MAX_SYSTEM_ONE_IMAGES_BYTES) {
1818
+ * throw new Error(`payload ${bytes}B (text ${textBytes}B) exceeds the dual cap`);
1819
+ * }
1786
1820
  * await client.systemOne(request);
1787
1821
  * ```
1788
1822
  */
1789
- declare function estimateSystemOneRequestBytes(request: SystemOneRequest | SystemOneRequest$1): number;
1823
+ declare function estimateSystemOneRequestBytes(request: SystemOneRequest | SystemOneRequest$1, options?: {
1824
+ readonly excludeImages?: boolean;
1825
+ }): number;
1790
1826
 
1791
1827
  /**
1792
1828
  * Higher-level System One decision helpers.
@@ -2363,11 +2399,15 @@ declare class OllamaClient {
2363
2399
  * 1–64 typed questions (choice, noul, or score) against a provided state
2364
2400
  * and returns typed answers with probabilities and confidence.
2365
2401
  *
2366
- * Local-only; requires Ollama >= 0.35.0. The runtime enforces the
2367
- * version constraint automatically (lazily fetching `/api/version` when
2368
- * `enforceVersion` is `'auto'` or `'strict'`) and rejects cloud-mode
2369
- * calls. Request size is checked client-side: 64 KiB without images,
2370
- * 32 MiB with images.
2402
+ * Local and cloud (since the 2026-10-16 upstream System One cloud
2403
+ * launch): `model` also accepts cloud models such as `clef:cloud` —
2404
+ * cloud models require Ollama >= 0.40.5 or the hosted
2405
+ * `https://ollama.com` endpoint. Requires Ollama >= 0.35.0 locally.
2406
+ * The runtime enforces the version constraint automatically (lazily
2407
+ * fetching `/api/version` when `enforceVersion` is `'auto'` or
2408
+ * `'strict'`). Request size is checked client-side as a dual cap:
2409
+ * text and schema (images excluded) within 64 KiB AND the whole
2410
+ * request within 32 MiB.
2371
2411
  *
2372
2412
  * The generic `Q` parameter captures the caller's question map at
2373
2413
  * compile time, giving key-safe answer access:
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { T as ThinkingMetadata, M as ModelResponse, R as RequestCancellationOptions, S as ShowRequestOptions, a as ShowResponse, P as PullRequestOptions, b as ProgressResponse, c as PushRequestOptions, C as CreateRequestOptions, D as DeleteRequestOptions, d as StatusResponse, e as CopyRequestOptions, f as PsResponse, V as VersionResponse, g as ToolParameters, h as ThinkValue, i as ToolCall, j as ChatRequestOptions, k as ModelOptions, l as ToolDefinition, F as FormatOption, m as ChatResponse, n as Message, G as GenerateRequestOptions, o as GenerateResponse, E as EmbedRequestOptions, p as EmbedResponse, q as EmbeddingsRequestOptions, r as EmbeddingsResponse, W as WebSearchRequestOptions, s as WebSearchResponse, t as WebFetchRequestOptions, u as WebFetchResponse, U as UsageRequestOptions, B as BalanceRequestOptions, v as PingResult, w as VisionInput } from './types-DbPnfVh-.js';
2
- export { L as ListResponse, x as Logprob, y as LogprobToken, z as ModelDetails, A as Role, H as ToolCallFunction, I as ToolFunctionDefinition, J as ToolProperty, K as UsageRange, N as UsageScope, O as WebSearchResult, Q as imageStringNeedsResolution, X as resolveImageInput } from './types-DbPnfVh-.js';
3
- import { H as HttpClient, F as FetchLike, M as Middleware, L as Logger, R as RequestLifecycleHook, c as OllamaStreamEvent, A as AbortableAsyncIterable, d as OllamaStreamEventType, P as ProgressStreamResult, B as BinaryBody, O as OllamaRuntime, C as ChatStreamResult, G as GenerateStreamResult, e as RawUsageSource, T as TokenUsage } from './runtime-CFuv7Ifh.js';
4
- export { D as DoneEvent, E as ErrorEvent, f as HttpBody, g as HttpClientOptions, h as HttpRequestOptions, i as LifecycleErrorEvent, j as LifecycleRetryEvent, k as LifecycleStartEvent, l as LifecycleSuccessEvent, m as LogFn, n as MessageEvent, o as MiddlewareContext, N as NANOS_PER_MS, p as NANOS_PER_SECOND, q as NETWORK_ERROR_CODES, r as NOOP_LOGGER, s as NextFunction, t as OllamaAbortError, u as OllamaAgentMaxIterationsError, v as OllamaAgentMaxToolCallsError, w as OllamaAgentToolLoopError, x as OllamaAuthError, y as OllamaBadGatewayError, z as OllamaClientError, J as OllamaClientErrorOptions, K as OllamaErrorRequestContext, Q as OllamaErrorResponseContext, U as OllamaGenericClientError, V as OllamaIncompatibleModelError, W as OllamaMcpError, X as OllamaModelRoutingError, Y as OllamaNetworkError, Z as OllamaNotFoundError, _ as OllamaOverloadedError, $ as OllamaQuotaExceededError, a0 as OllamaRateLimitError, a1 as OllamaRequestTooLargeError, a2 as OllamaRequestValidationError, a3 as OllamaResponseValidationError, a4 as OllamaServerError, a5 as OllamaServerVersionUnknownError, a6 as OllamaSkillInvalidError, a7 as OllamaSkillNotFoundError, a8 as OllamaStreamError, a9 as OllamaTimeoutError, aa as OllamaToolTimeoutError, ab as OllamaToolValidationError, ac as OllamaUnsupportedCapabilityError, ad as RequestContext, ae as RequestLifecycleEvent, af as ResponseContext, ag as SseEvent, ah as ThinkingEvent, ai as TokenEvent, aj as ToolCallEvent, ak as composeMiddleware, al as createConsoleLogger, am as extractUsage, an as isNetworkLevelError, ao as mapError, ap as parseSseStream } from './runtime-CFuv7Ifh.js';
1
+ import { T as ThinkingMetadata, M as ModelResponse, R as RequestCancellationOptions, S as ShowRequestOptions, a as ShowResponse, P as PullRequestOptions, b as ProgressResponse, c as PushRequestOptions, C as CreateRequestOptions, D as DeleteRequestOptions, d as StatusResponse, e as CopyRequestOptions, f as PsResponse, V as VersionResponse, g as ToolParameters, h as ThinkValue, i as ToolCall, j as ChatRequestOptions, k as ModelOptions, l as ToolDefinition, F as FormatOption, m as ChatResponse, n as Message, G as GenerateRequestOptions, o as GenerateResponse, E as EmbedRequestOptions, p as EmbedResponse, q as EmbeddingsRequestOptions, r as EmbeddingsResponse, W as WebSearchRequestOptions, s as WebSearchResponse, t as WebFetchRequestOptions, u as WebFetchResponse, U as UsageRequestOptions, B as BalanceRequestOptions, v as PingResult, w as VisionInput } from './types-Y3u0FtdN.js';
2
+ export { L as ListResponse, x as Logprob, y as LogprobToken, z as ModelDetails, A as Role, H as ToolCallFunction, I as ToolFunctionDefinition, J as ToolProperty, K as UsageRange, N as UsageScope, O as WebSearchResult, Q as imageStringNeedsResolution, X as resolveImageInput } from './types-Y3u0FtdN.js';
3
+ import { H as HttpClient, F as FetchLike, M as Middleware, L as Logger, R as RequestLifecycleHook, c as OllamaStreamEvent, A as AbortableAsyncIterable, d as OllamaStreamEventType, P as ProgressStreamResult, B as BinaryBody, O as OllamaRuntime, C as ChatStreamResult, G as GenerateStreamResult, e as RawUsageSource, T as TokenUsage } from './runtime-DYCxYGG-.js';
4
+ export { D as DoneEvent, E as ErrorEvent, f as HttpBody, g as HttpClientOptions, h as HttpRequestOptions, i as LifecycleErrorEvent, j as LifecycleRetryEvent, k as LifecycleStartEvent, l as LifecycleSuccessEvent, m as LogFn, n as MessageEvent, o as MiddlewareContext, N as NANOS_PER_MS, p as NANOS_PER_SECOND, q as NETWORK_ERROR_CODES, r as NOOP_LOGGER, s as NextFunction, t as OllamaAbortError, u as OllamaAgentMaxIterationsError, v as OllamaAgentMaxToolCallsError, w as OllamaAgentToolLoopError, x as OllamaAuthError, y as OllamaBadGatewayError, z as OllamaClientError, J as OllamaClientErrorOptions, K as OllamaErrorRequestContext, Q as OllamaErrorResponseContext, U as OllamaGenericClientError, V as OllamaIncompatibleModelError, W as OllamaMcpError, X as OllamaModelRoutingError, Y as OllamaNetworkError, Z as OllamaNotFoundError, _ as OllamaOverloadedError, $ as OllamaPaymentRequiredError, a0 as OllamaQuotaExceededError, a1 as OllamaRateLimitError, a2 as OllamaRequestTooLargeError, a3 as OllamaRequestValidationError, a4 as OllamaResponseValidationError, a5 as OllamaServerError, a6 as OllamaServerVersionUnknownError, a7 as OllamaSkillInvalidError, a8 as OllamaSkillNotFoundError, a9 as OllamaStreamError, aa as OllamaTimeoutError, ab as OllamaToolTimeoutError, ac as OllamaToolValidationError, ad as OllamaUnsupportedCapabilityError, ae as RequestContext, af as RequestLifecycleEvent, ag as ResponseContext, ah as SseEvent, ai as ThinkingEvent, aj as TokenEvent, ak as ToolCallEvent, al as composeMiddleware, am as createConsoleLogger, an as extractUsage, ao as isNetworkLevelError, ap as mapError, aq as parseSseStream } from './runtime-DYCxYGG-.js';
5
5
  import { z } from 'zod';
6
- import { R as RequestRunner, S as SystemOneChoiceAnswer, o as SystemOneNoulAnswer, p as SystemOneScoreAnswer, q as SystemOneChoiceQuestion, r as SystemOneNoulQuestion, s as SystemOneScoreQuestion, t as SystemOneRequest$1, u as SystemOneResponse$1, v as SystemOneContent, N as NativeApi, w as OpenAICompatClient, x as AnthropicCompatClient } from './anthropic-CvGVSoVP.js';
7
- export { y as AnthropicCacheControl, z as AnthropicContentBlock, B as AnthropicImageContentBlock, C as AnthropicMessage, n as AnthropicMessageStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, D as AnthropicMessagesStream, E as AnthropicMetadata, F as AnthropicOutputConfig, G as AnthropicRedactedThinkingContentBlock, H as AnthropicSystem, I as AnthropicSystemTextBlock, J as AnthropicTextContentBlock, K as AnthropicThinkingConfig, L as AnthropicThinkingContentBlock, M as AnthropicTool, P as AnthropicToolChoice, Q as AnthropicToolResultContentBlock, T as AnthropicToolUseContentBlock, U as AnthropicUnknownStreamEvent, V as OllamaAnthropicContentBlock, W as OllamaAnthropicMessage, X as OllamaAnthropicMessagesRequest, Y as OllamaAnthropicSystem, Z as OllamaAnthropicSystemTextBlock, _ as OllamaAnthropicTextContentBlock, $ as OllamaAnthropicThinkingConfig, a0 as OllamaAnthropicTool, a1 as OllamaAnthropicToolResultContentBlock, a2 as OllamaOpenAIChatCompletionRequest, a3 as OllamaOpenAIChatContentPart, a4 as OllamaOpenAIChatMessage, a5 as OllamaOpenAICompletionRequest, a6 as OllamaOpenAIEmbeddingRequest, a7 as OllamaOpenAIImageDataUrl, a8 as OllamaOpenAIReasoningEffort, a9 as OllamaOpenAIResponsesRequest, aa as OpenAIChatCompletionChoice, b as OpenAIChatCompletionChunk, ab as OpenAIChatCompletionChunkChoice, ac as OpenAIChatCompletionDelta, O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, ad as OpenAIChatCompletionStream, ae as OpenAICompletionChoice, e as OpenAICompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, af as OpenAICompletionStream, ag as OpenAIContentPart, ah as OpenAIEmbeddingInput, ai as OpenAIEmbeddingItem, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, aj as OpenAIFunctionDefinition, ak as OpenAIImageUrlContentPart, h as OpenAIListModelsResponse, al as OpenAIMessage, i as OpenAIModelItem, am as OpenAIReasoningEffort, an as OpenAIResponseFormat, ao as OpenAIResponsesCompletedEvent, ap as OpenAIResponsesContentPartAddedEvent, aq as OpenAIResponsesContentPartDoneEvent, ar as OpenAIResponsesCreatedEvent, as as OpenAIResponsesError, at as OpenAIResponsesEventBase, au as OpenAIResponsesFailedEvent, av as OpenAIResponsesFunctionCallArgumentsDeltaEvent, aw as OpenAIResponsesFunctionCallArgumentsDoneEvent, ax as OpenAIResponsesInProgressEvent, ay as OpenAIResponsesIncompleteDetails, az as OpenAIResponsesIncompleteEvent, aA as OpenAIResponsesOutputContent, aB as OpenAIResponsesOutputFunctionCall, aC as OpenAIResponsesOutputItem, aD as OpenAIResponsesOutputItemAddedEvent, aE as OpenAIResponsesOutputItemDoneEvent, aF as OpenAIResponsesOutputMessage, aG as OpenAIResponsesOutputReasoning, aH as OpenAIResponsesOutputRefusal, aI as OpenAIResponsesOutputTextContent, aJ as OpenAIResponsesOutputTextDeltaEvent, aK as OpenAIResponsesOutputTextDoneEvent, aL as OpenAIResponsesQueuedEvent, aM as OpenAIResponsesReasoningSummaryPartAddedEvent, aN as OpenAIResponsesReasoningSummaryPartDoneEvent, aO as OpenAIResponsesReasoningSummaryTextDeltaEvent, aP as OpenAIResponsesReasoningSummaryTextDoneEvent, aQ as OpenAIResponsesReasoningTextDeltaEvent, aR as OpenAIResponsesReasoningTextDoneEvent, aS as OpenAIResponsesRefusalDeltaEvent, aT as OpenAIResponsesRefusalDoneEvent, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, aU as OpenAIResponsesStatus, aV as OpenAIResponsesStream, aW as OpenAIResponsesStreamError, l as OpenAIResponsesStreamEvent, aX as OpenAIResponsesUsage, aY as OpenAIStreamOptions, aZ as OpenAITextContentPart, a_ as OpenAITool, a$ as OpenAIToolCall, b0 as OpenAIToolCallDelta, b1 as OpenAIUsage, b2 as SystemOneConfidence, b3 as SystemOneProbabilities } from './anthropic-CvGVSoVP.js';
8
- import { T as ToolHandler, a as Tool, A as AnyTool, b as ToolRegistry, c as ToolExecutionResult } from './compose-CeFbHJeO.js';
9
- export { d as AppliedSkillResult, e as ApplySkillOptions, P as ParsedFrontmatter, S as Skill, f as SkillFrontmatter, g as SkillSummary, h as ToolExecutionContext, i as ToolExecutionFailure, j as ToolExecutionSuccess, k as ToolRegistryOptions, l as applySkill, p as parseFrontmatter } from './compose-CeFbHJeO.js';
6
+ import { R as RequestRunner, S as SystemOneChoiceAnswer, o as SystemOneNoulAnswer, p as SystemOneScoreAnswer, q as SystemOneChoiceQuestion, r as SystemOneNoulQuestion, s as SystemOneScoreQuestion, t as SystemOneRequest$1, u as SystemOneResponse$1, v as SystemOneContent, N as NativeApi, w as OpenAICompatClient, x as AnthropicCompatClient } from './anthropic-CAvwqIjx.js';
7
+ export { y as AnthropicCacheControl, z as AnthropicContentBlock, B as AnthropicImageContentBlock, C as AnthropicMessage, n as AnthropicMessageStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, D as AnthropicMessagesStream, E as AnthropicMetadata, F as AnthropicOutputConfig, G as AnthropicRedactedThinkingContentBlock, H as AnthropicSystem, I as AnthropicSystemTextBlock, J as AnthropicTextContentBlock, K as AnthropicThinkingConfig, L as AnthropicThinkingContentBlock, M as AnthropicTool, P as AnthropicToolChoice, Q as AnthropicToolResultContentBlock, T as AnthropicToolUseContentBlock, U as AnthropicUnknownStreamEvent, V as OllamaAnthropicContentBlock, W as OllamaAnthropicMessage, X as OllamaAnthropicMessagesRequest, Y as OllamaAnthropicSystem, Z as OllamaAnthropicSystemTextBlock, _ as OllamaAnthropicTextContentBlock, $ as OllamaAnthropicThinkingConfig, a0 as OllamaAnthropicTool, a1 as OllamaAnthropicToolResultContentBlock, a2 as OllamaOpenAIChatCompletionRequest, a3 as OllamaOpenAIChatContentPart, a4 as OllamaOpenAIChatMessage, a5 as OllamaOpenAICompletionRequest, a6 as OllamaOpenAIEmbeddingRequest, a7 as OllamaOpenAIImageDataUrl, a8 as OllamaOpenAIReasoningEffort, a9 as OllamaOpenAIResponsesRequest, aa as OpenAIChatCompletionChoice, b as OpenAIChatCompletionChunk, ab as OpenAIChatCompletionChunkChoice, ac as OpenAIChatCompletionDelta, O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, ad as OpenAIChatCompletionStream, ae as OpenAICompletionChoice, e as OpenAICompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, af as OpenAICompletionStream, ag as OpenAIContentPart, ah as OpenAIEmbeddingInput, ai as OpenAIEmbeddingItem, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, aj as OpenAIFunctionDefinition, ak as OpenAIImageUrlContentPart, h as OpenAIListModelsResponse, al as OpenAIMessage, i as OpenAIModelItem, am as OpenAIReasoningEffort, an as OpenAIResponseFormat, ao as OpenAIResponsesCompletedEvent, ap as OpenAIResponsesContentPartAddedEvent, aq as OpenAIResponsesContentPartDoneEvent, ar as OpenAIResponsesCreatedEvent, as as OpenAIResponsesError, at as OpenAIResponsesEventBase, au as OpenAIResponsesFailedEvent, av as OpenAIResponsesFunctionCallArgumentsDeltaEvent, aw as OpenAIResponsesFunctionCallArgumentsDoneEvent, ax as OpenAIResponsesInProgressEvent, ay as OpenAIResponsesIncompleteDetails, az as OpenAIResponsesIncompleteEvent, aA as OpenAIResponsesOutputContent, aB as OpenAIResponsesOutputFunctionCall, aC as OpenAIResponsesOutputItem, aD as OpenAIResponsesOutputItemAddedEvent, aE as OpenAIResponsesOutputItemDoneEvent, aF as OpenAIResponsesOutputMessage, aG as OpenAIResponsesOutputReasoning, aH as OpenAIResponsesOutputRefusal, aI as OpenAIResponsesOutputTextContent, aJ as OpenAIResponsesOutputTextDeltaEvent, aK as OpenAIResponsesOutputTextDoneEvent, aL as OpenAIResponsesQueuedEvent, aM as OpenAIResponsesReasoningSummaryPartAddedEvent, aN as OpenAIResponsesReasoningSummaryPartDoneEvent, aO as OpenAIResponsesReasoningSummaryTextDeltaEvent, aP as OpenAIResponsesReasoningSummaryTextDoneEvent, aQ as OpenAIResponsesReasoningTextDeltaEvent, aR as OpenAIResponsesReasoningTextDoneEvent, aS as OpenAIResponsesRefusalDeltaEvent, aT as OpenAIResponsesRefusalDoneEvent, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, aU as OpenAIResponsesStatus, aV as OpenAIResponsesStream, aW as OpenAIResponsesStreamError, l as OpenAIResponsesStreamEvent, aX as OpenAIResponsesUsage, aY as OpenAIStreamOptions, aZ as OpenAITextContentPart, a_ as OpenAITool, a$ as OpenAIToolCall, b0 as OpenAIToolCallDelta, b1 as OpenAIUsage, b2 as SystemOneConfidence, b3 as SystemOneProbabilities } from './anthropic-CAvwqIjx.js';
8
+ import { T as ToolHandler, a as Tool, A as AnyTool, b as ToolRegistry, c as ToolExecutionResult } from './compose-75UFDzOO.js';
9
+ export { d as AppliedSkillResult, e as ApplySkillOptions, P as ParsedFrontmatter, S as Skill, f as SkillFrontmatter, g as SkillSummary, h as ToolExecutionContext, i as ToolExecutionFailure, j as ToolExecutionSuccess, k as ToolRegistryOptions, l as applySkill, p as parseFrontmatter } from './compose-75UFDzOO.js';
10
10
  import { M as McpClientLike, a as McpToolDescriptor, b as McpTask, c as McpCallToolResult } from './types-CI-gM2u5.js';
11
11
  export { d as McpContentBlock, e as McpCreateTaskResult, f as McpElicitationFormRequest, g as McpElicitationHandlers, h as McpElicitationRequest, i as McpElicitationResult, j as McpElicitationUrlRequest, k as McpIcon, l as McpInputRequiredResult, m as McpListToolsParams, n as McpListToolsResult, o as McpRequestOptions, p as McpServerCapabilities, q as McpTaskMethod, r as McpTaskRequest, s as McpTaskStatus, t as McpToolAnnotations, u as McpToolCallResult, v as McpToolExecution } from './types-CI-gM2u5.js';
12
12
  import * as Otel from '@opentelemetry/api';
@@ -1655,25 +1655,34 @@ declare function batchEmbed(client: OllamaClient, options: EmbedBatchOptions): P
1655
1655
  */
1656
1656
 
1657
1657
  /**
1658
- * Maximum total request size, in bytes, accepted by `/v1/systemone`
1659
- * when the request body carries a non-empty `images` array.
1658
+ * Whole-request size cap, in bytes, for `/v1/systemone` — the maximum
1659
+ * serialized size of the complete request, base64 image bytes included.
1660
1660
  *
1661
- * The Ollama server enforces this limit server-side and rejects
1661
+ * Part of the dual cap clarified upstream on 2026-10-16: every request
1662
+ * must satisfy BOTH bounds simultaneously — this whole-request cap AND
1663
+ * the text-and-schema cap of {@link MAX_SYSTEM_ONE_REQUEST_BYTES}
1664
+ * (64 KiB, images excluded). The bumped whole-request cap exists
1665
+ * specifically to accommodate base64-encoded image bytes shared across
1666
+ * all questions in a single System One call; the text and schema
1667
+ * portion may never exceed 64 KiB regardless of whether images are
1668
+ * attached.
1669
+ *
1670
+ * The Ollama server enforces both bounds server-side and rejects
1662
1671
  * oversized payloads with HTTP 413. The SDK's runtime also enforces
1663
- * it client-side (see `OllamaRuntime`'s `maxRequestBytesWithImages`
1672
+ * them client-side (see `OllamaRuntime`'s `maxRequestBytesWithImages`
1664
1673
  * handling) so the round-trip is avoided.
1665
- *
1666
- * Without images, the limit is the much smaller
1667
- * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB) — the bumped
1668
- * images-cap exists specifically to accommodate base64-encoded image
1669
- * bytes shared across all questions in a single System One call.
1670
1674
  */
1671
1675
  declare const MAX_SYSTEM_ONE_IMAGES_BYTES: number;
1672
1676
  /**
1673
- * Maximum total request size, in bytes, for `/v1/systemone` when no
1674
- * images are attached. The Ollama server caps the JSON-only payload
1675
- * at 64 KiB; the runtime enforces this client-side (see
1676
- * `OllamaRuntime`'s `maxRequestBytes`).
1677
+ * Text-and-schema size cap, in bytes, for `/v1/systemone` — the maximum
1678
+ * serialized size of the request with its `images` array excluded.
1679
+ *
1680
+ * Part of the dual cap clarified upstream on 2026-10-16: this bound
1681
+ * applies to EVERY request, images or not — attaching images raises
1682
+ * the whole-request ceiling to {@link MAX_SYSTEM_ONE_IMAGES_BYTES}
1683
+ * (32 MiB) but never relaxes this 64 KiB text-and-schema ceiling. The
1684
+ * runtime enforces both bounds client-side (see `OllamaRuntime`'s
1685
+ * `maxRequestBytes` handling).
1677
1686
  */
1678
1687
  declare const MAX_SYSTEM_ONE_REQUEST_BYTES: number;
1679
1688
  /**
@@ -1740,16 +1749,33 @@ type SystemOneAnswers<Q extends SystemOneQuestions = SystemOneQuestions> = {
1740
1749
  * ## Image support
1741
1750
  *
1742
1751
  * The `images` field accepts up to N base64-encoded images shared by
1743
- * all questions in the request. Total request payload (JSON + images)
1744
- * must remain within {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB);
1745
- * requests without images are capped at
1746
- * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB).
1752
+ * all questions in the request. The dual cap (2026-10-16 upstream
1753
+ * clarification) applies to every request simultaneously: the text and
1754
+ * schema portion (images excluded) must stay within
1755
+ * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB), and the whole payload
1756
+ * (JSON + images) within {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB).
1747
1757
  *
1748
1758
  * Use {@link estimateSystemOneRequestBytes} for a client-side pre-flight
1749
1759
  * check before sending a large multi-image batch — the runtime also
1750
- * enforces the limit, but the early check avoids the round-trip when
1760
+ * enforces both caps, but the early check avoids the round-trip when
1751
1761
  * the caller already knows the payload is too large.
1752
1762
  *
1763
+ * ## Context window
1764
+ *
1765
+ * Beyond the byte caps, upstream requires the complete input (state,
1766
+ * questions, and images) to fit the model's loaded context window, and
1767
+ * System One never truncates input — oversized prompts are rejected by
1768
+ * the server with HTTP 400 locally ("a rendered prompt that exceeds the
1769
+ * loaded context"), not 413 (which is reserved for the byte caps
1770
+ * above); for cloud requests, upstream documents 413 for input that
1771
+ * exceeds the model's context window (65,536 tokens) as well as for
1772
+ * requests over 13 MiB.
1773
+ * Decision models (Nimble, Tev) additionally reserve two token
1774
+ * positions at the end of the window for scoring. The SDK deliberately
1775
+ * does not estimate this client-side (upstream documents no
1776
+ * tokenization formula); callers who need the real limit can use
1777
+ * `client.models.getContextLength()`.
1778
+ *
1753
1779
  * Requires Clef or Clef Flash with vision weights. URLs and data URLs
1754
1780
  * are NOT supported — pre-encode the bytes to base64 before adding to
1755
1781
  * the array.
@@ -1768,8 +1794,12 @@ interface SystemOneResponse<Q extends SystemOneQuestions = SystemOneQuestions> e
1768
1794
  }
1769
1795
  /**
1770
1796
  * Estimate the on-the-wire byte size of a System One request body, for
1771
- * pre-flight size validation against {@link MAX_SYSTEM_ONE_REQUEST_BYTES}
1772
- * (no images) or {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (with images).
1797
+ * pre-flight validation against the dual cap (2026-10-16 upstream
1798
+ * clarification): the whole body against
1799
+ * {@link MAX_SYSTEM_ONE_IMAGES_BYTES} (32 MiB) and, when `images` is
1800
+ * attached, the images-excluded portion against
1801
+ * {@link MAX_SYSTEM_ONE_REQUEST_BYTES} (64 KiB) — pass
1802
+ * `{ excludeImages: true }` to measure the text-and-schema portion.
1773
1803
  *
1774
1804
  * The estimate is conservative: it uses `JSON.stringify` length and
1775
1805
  * assumes UTF-8 encoding. The actual wire size may differ slightly due
@@ -1781,12 +1811,18 @@ interface SystemOneResponse<Q extends SystemOneQuestions = SystemOneQuestions> e
1781
1811
  * ```ts
1782
1812
  * const request: SystemOneRequest = { ... };
1783
1813
  * const bytes = estimateSystemOneRequestBytes(request);
1784
- * const cap = request.images?.length ? MAX_SYSTEM_ONE_IMAGES_BYTES : MAX_SYSTEM_ONE_REQUEST_BYTES;
1785
- * if (bytes > cap) throw new Error(`payload ${bytes}B exceeds cap ${cap}B`);
1814
+ * const textBytes = request.images?.length
1815
+ * ? estimateSystemOneRequestBytes(request, { excludeImages: true })
1816
+ * : bytes;
1817
+ * if (textBytes > MAX_SYSTEM_ONE_REQUEST_BYTES || bytes > MAX_SYSTEM_ONE_IMAGES_BYTES) {
1818
+ * throw new Error(`payload ${bytes}B (text ${textBytes}B) exceeds the dual cap`);
1819
+ * }
1786
1820
  * await client.systemOne(request);
1787
1821
  * ```
1788
1822
  */
1789
- declare function estimateSystemOneRequestBytes(request: SystemOneRequest | SystemOneRequest$1): number;
1823
+ declare function estimateSystemOneRequestBytes(request: SystemOneRequest | SystemOneRequest$1, options?: {
1824
+ readonly excludeImages?: boolean;
1825
+ }): number;
1790
1826
 
1791
1827
  /**
1792
1828
  * Higher-level System One decision helpers.
@@ -2363,11 +2399,15 @@ declare class OllamaClient {
2363
2399
  * 1–64 typed questions (choice, noul, or score) against a provided state
2364
2400
  * and returns typed answers with probabilities and confidence.
2365
2401
  *
2366
- * Local-only; requires Ollama >= 0.35.0. The runtime enforces the
2367
- * version constraint automatically (lazily fetching `/api/version` when
2368
- * `enforceVersion` is `'auto'` or `'strict'`) and rejects cloud-mode
2369
- * calls. Request size is checked client-side: 64 KiB without images,
2370
- * 32 MiB with images.
2402
+ * Local and cloud (since the 2026-10-16 upstream System One cloud
2403
+ * launch): `model` also accepts cloud models such as `clef:cloud` —
2404
+ * cloud models require Ollama >= 0.40.5 or the hosted
2405
+ * `https://ollama.com` endpoint. Requires Ollama >= 0.35.0 locally.
2406
+ * The runtime enforces the version constraint automatically (lazily
2407
+ * fetching `/api/version` when `enforceVersion` is `'auto'` or
2408
+ * `'strict'`). Request size is checked client-side as a dual cap:
2409
+ * text and schema (images excluded) within 64 KiB AND the whole
2410
+ * request within 32 MiB.
2371
2411
  *
2372
2412
  * The generic `Q` parameter captures the caller's question map at
2373
2413
  * compile time, giving key-safe answer access:
package/dist/index.js CHANGED
@@ -191,6 +191,11 @@ var OllamaAuthError = class extends OllamaClientError {
191
191
  super(message, { ...options, code: "auth_error", retryable: false });
192
192
  }
193
193
  };
194
+ var OllamaPaymentRequiredError = class extends OllamaClientError {
195
+ constructor(message, options) {
196
+ super(message, { ...options, code: "payment_required", retryable: false, status: 402 });
197
+ }
198
+ };
194
199
  var OllamaNotFoundError = class extends OllamaClientError {
195
200
  constructor(message, options) {
196
201
  super(message, { ...options, code: "not_found", retryable: false });
@@ -425,6 +430,9 @@ function statusToError(status, message, options) {
425
430
  if (status === 401 || status === 403) {
426
431
  return new OllamaAuthError(message, { ...options, status });
427
432
  }
433
+ if (status === 402) {
434
+ return new OllamaPaymentRequiredError(message, options);
435
+ }
428
436
  if (status === 404) {
429
437
  return new OllamaNotFoundError(message, { ...options, status });
430
438
  }
@@ -4423,14 +4431,25 @@ var OllamaRuntime = class {
4423
4431
  const hasImages = bodyHasImages(body);
4424
4432
  const maxBytesWithImages = req.operation.constraints?.maxRequestBytesWithImages;
4425
4433
  const maxBytesBase = req.operation.constraints?.maxRequestBytes;
4426
- const applicableLimit = hasImages && maxBytesWithImages !== void 0 ? maxBytesWithImages : maxBytesBase;
4427
- if (applicableLimit !== void 0 && serialized.byteLength > applicableLimit) {
4434
+ const textAndSchemaBytes = hasImages ? serializeWithoutImages(body).byteLength : serialized.byteLength;
4435
+ if (maxBytesBase !== void 0 && textAndSchemaBytes > maxBytesBase) {
4428
4436
  throw new OllamaRequestTooLargeError(
4429
- `Operation ${req.operation.operationId} (${req.operation.method} ${req.operation.path}) request body is ${serialized.byteLength} bytes, exceeding the contract limit of ${applicableLimit} bytes` + (hasImages ? " (images limit)." : "."),
4437
+ `Operation ${req.operation.operationId} (${req.operation.method} ${req.operation.path}) text and schema (images excluded) is ${textAndSchemaBytes} bytes, exceeding the contract limit of ${maxBytesBase} bytes.`,
4438
+ {
4439
+ operationId: req.operation.operationId,
4440
+ actualBytes: textAndSchemaBytes,
4441
+ maxBytes: maxBytesBase,
4442
+ request: { method: req.operation.method, url: req.operation.path }
4443
+ }
4444
+ );
4445
+ }
4446
+ if (maxBytesWithImages !== void 0 && serialized.byteLength > maxBytesWithImages) {
4447
+ throw new OllamaRequestTooLargeError(
4448
+ `Operation ${req.operation.operationId} (${req.operation.method} ${req.operation.path}) request body is ${serialized.byteLength} bytes, exceeding the contract limit of ${maxBytesWithImages} bytes (whole request, images included).`,
4430
4449
  {
4431
4450
  operationId: req.operation.operationId,
4432
4451
  actualBytes: serialized.byteLength,
4433
- maxBytes: applicableLimit,
4452
+ maxBytes: maxBytesWithImages,
4434
4453
  request: { method: req.operation.method, url: req.operation.path }
4435
4454
  }
4436
4455
  );
@@ -4572,6 +4591,13 @@ function bodyHasImages(body) {
4572
4591
  const images = obj.images;
4573
4592
  return Array.isArray(images) && images.length > 0;
4574
4593
  }
4594
+ function serializeWithoutImages(body) {
4595
+ if (typeof body === "object" && body !== null && !Array.isArray(body)) {
4596
+ const { images: _images, ...rest } = body;
4597
+ return serializeForByteCount(rest);
4598
+ }
4599
+ return serializeForByteCount(body);
4600
+ }
4575
4601
  function resolvePathParams(pathTemplate, pathParams) {
4576
4602
  if (!pathTemplate.includes("{")) return pathTemplate;
4577
4603
  const params = pathParams ?? {};
@@ -5324,7 +5350,7 @@ var systemOneOp = {
5324
5350
  path: "/v1/systemone",
5325
5351
  request: { $ref: "#/schemas/SystemOneRequest" },
5326
5352
  response: { $ref: "#/schemas/SystemOneResponse" },
5327
- environment: { local: true, cloud: false },
5353
+ environment: { local: true, cloud: true },
5328
5354
  transport: { mode: "json", streaming: false },
5329
5355
  capabilities: {
5330
5356
  thinking: "unsupported",
@@ -5342,8 +5368,10 @@ var systemOneOp = {
5342
5368
  status: { documented: true, experimental: true },
5343
5369
  domain: "native",
5344
5370
  notes: [
5345
- "Local-only; Ollama Cloud rejects /v1/systemone.",
5346
- "64 KiB request limit without images, 32 MiB with images (includes JSON/base64 overhead).",
5371
+ "Local and cloud: model accepts cloud models (e.g. clef:cloud); cloud models require Ollama >= 0.40.5 or the hosted https://ollama.com endpoint.",
5372
+ "Local dual cap: text and schema (excluding images) within 64 KiB AND the whole request within 32 MiB, including base64 and JSON overhead.",
5373
+ "Cloud requests: paid plan or usage credits required; up to 64 questions named with up to 100 ASCII letters, digits, `_`, `.`, or `-`; up to 4 images of at most 4 MiB and 16 megapixels each (8 MiB total); requests within 13 MiB; input within the model's 65,536-token context window.",
5374
+ "401 when a cloud model is requested without signing in or with an invalid API key (through a local server the response includes a signin_url); 402 when the cloud model is not included in the Free plan or a payment fails.",
5347
5375
  "No tools, no generation controls (temperature, top_p, etc.).",
5348
5376
  "Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.",
5349
5377
  "Experimental: behavioral surface may change between Ollama releases."
@@ -6299,11 +6327,15 @@ var OllamaClient = class _OllamaClient {
6299
6327
  * 1–64 typed questions (choice, noul, or score) against a provided state
6300
6328
  * and returns typed answers with probabilities and confidence.
6301
6329
  *
6302
- * Local-only; requires Ollama >= 0.35.0. The runtime enforces the
6303
- * version constraint automatically (lazily fetching `/api/version` when
6304
- * `enforceVersion` is `'auto'` or `'strict'`) and rejects cloud-mode
6305
- * calls. Request size is checked client-side: 64 KiB without images,
6306
- * 32 MiB with images.
6330
+ * Local and cloud (since the 2026-10-16 upstream System One cloud
6331
+ * launch): `model` also accepts cloud models such as `clef:cloud` —
6332
+ * cloud models require Ollama >= 0.40.5 or the hosted
6333
+ * `https://ollama.com` endpoint. Requires Ollama >= 0.35.0 locally.
6334
+ * The runtime enforces the version constraint automatically (lazily
6335
+ * fetching `/api/version` when `enforceVersion` is `'auto'` or
6336
+ * `'strict'`). Request size is checked client-side as a dual cap:
6337
+ * text and schema (images excluded) within 64 KiB AND the whole
6338
+ * request within 32 MiB.
6307
6339
  *
6308
6340
  * The generic `Q` parameter captures the caller's question map at
6309
6341
  * compile time, giving key-safe answer access:
@@ -8254,10 +8286,11 @@ function createModelAffinityScheduler(client, options) {
8254
8286
  // src/system-one.ts
8255
8287
  var MAX_SYSTEM_ONE_IMAGES_BYTES = 32 * 1024 * 1024;
8256
8288
  var MAX_SYSTEM_ONE_REQUEST_BYTES = 64 * 1024;
8257
- function estimateSystemOneRequestBytes(request) {
8258
- return new TextEncoder().encode(JSON.stringify(request)).byteLength;
8289
+ function estimateSystemOneRequestBytes(request, options) {
8290
+ const body = options?.excludeImages && request.images !== void 0 ? { ...request, images: void 0 } : request;
8291
+ return new TextEncoder().encode(JSON.stringify(body)).byteLength;
8259
8292
  }
8260
8293
 
8261
- export { ATTR_GEN_AI_OPERATION_NAME, ATTR_GEN_AI_REQUEST_MODEL, ATTR_GEN_AI_RESPONSE_MODEL, ATTR_GEN_AI_SYSTEM, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_NAME, ATTR_GEN_AI_USAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_OLLAMA_AGENT_ITERATION, ATTR_OLLAMA_AGENT_MAX_ITERATIONS, ATTR_OLLAMA_ENDPOINT_ATTEMPT, ATTR_OLLAMA_ENDPOINT_NAME, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, Agent, AnthropicCompatClient, AnthropicMessagesStream, ConversationSession, DEFAULT_BACKOFF, DEFAULT_BASE_URL, DEFAULT_CONTEXT_WARNING_THRESHOLD, DEFAULT_EMBED_BATCH_SIZE, DEFAULT_EMBED_CONCURRENCY, DEFAULT_FAILOVER_CODES, DEFAULT_FETCH_BACKOFF_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_TIMEOUT_MS, EndpointRegistry, GEN_AI_SYSTEM_OLLAMA, HttpClient, IMAGE_TOKEN_ESTIMATE, KEEP_ALIVE_INDEFINITE, KEEP_ALIVE_UNLOAD, KNOWN_DONE_REASONS, MAX_SYSTEM_ONE_IMAGES_BYTES, MAX_SYSTEM_ONE_REQUEST_BYTES, MESSAGE_OVERHEAD_TOKENS, McpBridge, ModelAffinityRouter, ModelAffinityScheduler, ModelsClient, NANOS_PER_MS, NANOS_PER_SECOND, NETWORK_ERROR_CODES, NOOP_LOGGER, OLLAMA_CLOUD_BASE_URL, OLLAMA_FALLBACK_CONTEXT_LENGTH, OllamaAbortError, OllamaAgentMaxIterationsError, OllamaAgentMaxToolCallsError, OllamaAgentToolLoopError, OllamaAuthError, OllamaBadGatewayError, OllamaClient, OllamaClientError, OllamaGenericClientError, OllamaIncompatibleModelError, OllamaMcpError, OllamaModelRoutingError, OllamaNetworkError, OllamaNotFoundError, OllamaOverloadedError, OllamaQuotaExceededError, OllamaRateLimitError, OllamaRequestTooLargeError, OllamaRequestValidationError, OllamaResponseValidationError, OllamaServerError, OllamaServerVersionUnknownError, OllamaSkillInvalidError, OllamaSkillNotFoundError, OllamaStream, OllamaStreamError, OllamaTimeoutError, OllamaToolTimeoutError, OllamaToolValidationError, OllamaUnsupportedCapabilityError, OpenAIChatCompletionStream, OpenAICompatClient, OpenAICompletionStream, OpenAIResponsesStream, OpenAIResponsesStreamError, QuotaManager, RETRYABLE_STATUS_CODES, ResponsesModule, ToolCallAccumulator, ToolRegistry, WEB_FETCH_TOOL_NAME, WEB_SEARCH_TOOL_NAME, addSpanEvent, applySkill, batchEmbed, calculateBackoff, canonicalToolCallSignature, checkChatContext, checkEndpointHealth, checkGenerateContext, compactConversationHistory, compareDraftPerformance, composeMiddleware, computeProgressPercent, contextWarningMessage, createConsoleLogger, createDecision, createModelAffinityScheduler, createOllamaCloudFreeTierQuota, createProgressSpeedTracker, createTimeoutSignal, createWebFetchTool, createWebSearchTool, createWebTools, defineTool, detectModelCapabilities, embedBatchOverflowMessage, encodeImage, estimateChatRequestTokens, estimateGenerateRequestTokens, estimateMessageTokens, estimateSystemOneRequestBytes, estimateTokens, extractContextLength as extractNativeContextLength, extractParameterNumCtx, extractUsage, fetchWithBackoff, findOversizedEmbedInputs, findRunningModelContextLength, formatTelemetry, formatWebFetchResult, formatWebSearchResult, imageStringNeedsResolution, inferRuntimeMode, isKeepAliveSugar, isKnownDoneReason, isModelResident, isNetworkLevelError, isSameToolCall, listAllMcpTools, listAvailableModels, loadMcpTools, mapError, mergeToolCall, mergeToolCallArgumentsString, mergeToolCallArrays, normalizeChatStream, normalizeGenerateStream, normalizeKeepAlive, normalizeProgressStream, observeStream, onProgress, parseFrontmatter, parseNdjsonStream, parseSseStream, parseStructuredOutput, recommendContextWindow, registerMcpTools, resolveContextLength, resolveCredentialEndpoints, resolveImageInput, sanitizeHistoryForNextTurn, setSpanError, toDataStream, toPullProgressEvent, toResponse, toTextStream, withRetry, withSpan, zodToJsonSchema };
8294
+ export { ATTR_GEN_AI_OPERATION_NAME, ATTR_GEN_AI_REQUEST_MODEL, ATTR_GEN_AI_RESPONSE_MODEL, ATTR_GEN_AI_SYSTEM, ATTR_GEN_AI_TOOL_CALL_ID, ATTR_GEN_AI_TOOL_NAME, ATTR_GEN_AI_USAGE_INPUT_TOKENS, ATTR_GEN_AI_USAGE_OUTPUT_TOKENS, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_OLLAMA_AGENT_ITERATION, ATTR_OLLAMA_AGENT_MAX_ITERATIONS, ATTR_OLLAMA_ENDPOINT_ATTEMPT, ATTR_OLLAMA_ENDPOINT_NAME, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, Agent, AnthropicCompatClient, AnthropicMessagesStream, ConversationSession, DEFAULT_BACKOFF, DEFAULT_BASE_URL, DEFAULT_CONTEXT_WARNING_THRESHOLD, DEFAULT_EMBED_BATCH_SIZE, DEFAULT_EMBED_CONCURRENCY, DEFAULT_FAILOVER_CODES, DEFAULT_FETCH_BACKOFF_CONFIG, DEFAULT_RETRY_CONFIG, DEFAULT_TIMEOUT_MS, EndpointRegistry, GEN_AI_SYSTEM_OLLAMA, HttpClient, IMAGE_TOKEN_ESTIMATE, KEEP_ALIVE_INDEFINITE, KEEP_ALIVE_UNLOAD, KNOWN_DONE_REASONS, MAX_SYSTEM_ONE_IMAGES_BYTES, MAX_SYSTEM_ONE_REQUEST_BYTES, MESSAGE_OVERHEAD_TOKENS, McpBridge, ModelAffinityRouter, ModelAffinityScheduler, ModelsClient, NANOS_PER_MS, NANOS_PER_SECOND, NETWORK_ERROR_CODES, NOOP_LOGGER, OLLAMA_CLOUD_BASE_URL, OLLAMA_FALLBACK_CONTEXT_LENGTH, OllamaAbortError, OllamaAgentMaxIterationsError, OllamaAgentMaxToolCallsError, OllamaAgentToolLoopError, OllamaAuthError, OllamaBadGatewayError, OllamaClient, OllamaClientError, OllamaGenericClientError, OllamaIncompatibleModelError, OllamaMcpError, OllamaModelRoutingError, OllamaNetworkError, OllamaNotFoundError, OllamaOverloadedError, OllamaPaymentRequiredError, OllamaQuotaExceededError, OllamaRateLimitError, OllamaRequestTooLargeError, OllamaRequestValidationError, OllamaResponseValidationError, OllamaServerError, OllamaServerVersionUnknownError, OllamaSkillInvalidError, OllamaSkillNotFoundError, OllamaStream, OllamaStreamError, OllamaTimeoutError, OllamaToolTimeoutError, OllamaToolValidationError, OllamaUnsupportedCapabilityError, OpenAIChatCompletionStream, OpenAICompatClient, OpenAICompletionStream, OpenAIResponsesStream, OpenAIResponsesStreamError, QuotaManager, RETRYABLE_STATUS_CODES, ResponsesModule, ToolCallAccumulator, ToolRegistry, WEB_FETCH_TOOL_NAME, WEB_SEARCH_TOOL_NAME, addSpanEvent, applySkill, batchEmbed, calculateBackoff, canonicalToolCallSignature, checkChatContext, checkEndpointHealth, checkGenerateContext, compactConversationHistory, compareDraftPerformance, composeMiddleware, computeProgressPercent, contextWarningMessage, createConsoleLogger, createDecision, createModelAffinityScheduler, createOllamaCloudFreeTierQuota, createProgressSpeedTracker, createTimeoutSignal, createWebFetchTool, createWebSearchTool, createWebTools, defineTool, detectModelCapabilities, embedBatchOverflowMessage, encodeImage, estimateChatRequestTokens, estimateGenerateRequestTokens, estimateMessageTokens, estimateSystemOneRequestBytes, estimateTokens, extractContextLength as extractNativeContextLength, extractParameterNumCtx, extractUsage, fetchWithBackoff, findOversizedEmbedInputs, findRunningModelContextLength, formatTelemetry, formatWebFetchResult, formatWebSearchResult, imageStringNeedsResolution, inferRuntimeMode, isKeepAliveSugar, isKnownDoneReason, isModelResident, isNetworkLevelError, isSameToolCall, listAllMcpTools, listAvailableModels, loadMcpTools, mapError, mergeToolCall, mergeToolCallArgumentsString, mergeToolCallArrays, normalizeChatStream, normalizeGenerateStream, normalizeKeepAlive, normalizeProgressStream, observeStream, onProgress, parseFrontmatter, parseNdjsonStream, parseSseStream, parseStructuredOutput, recommendContextWindow, registerMcpTools, resolveContextLength, resolveCredentialEndpoints, resolveImageInput, sanitizeHistoryForNextTurn, setSpanError, toDataStream, toPullProgressEvent, toResponse, toTextStream, withRetry, withSpan, zodToJsonSchema };
8262
8295
  //# sourceMappingURL=index.js.map
8263
8296
  //# sourceMappingURL=index.js.map