@nemesis-oss/ollama-sdk 1.11.0 → 1.12.1

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 CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.12.1] — Fix: model-affinity routing respects priority tiers
4
+
5
+ ### Fixed
6
+
7
+ - **`endpointHealth.modelAffinity` no longer overrides endpoint `priority`.** In 1.12.0, `ModelAffinityRouter.reorder()` moved every host holding the requested model to the front of the _whole_ candidate list, so a lower-priority host with the model in VRAM was tried before a higher-priority host without it. That contradicted the README and ADR 0028, which state that priority tiers keep working. Affinity now reorders only within each priority tier (runs of consecutive equal `priority`, unset = `0`, as in the registry): a higher-priority endpoint is always tried first, and residency only breaks ties inside a tier. The order between tiers, including the registry's fail-open recovery order, is unchanged.
8
+ - **Behavior change for configurations that mix `priority` values with `modelAffinity`:** requests that 1.12.0 sent to a resident lower-priority host now go to the higher-priority host first. Pools where every endpoint has the same priority (the documented fleet-of-workstations setup) are unaffected.
9
+ - 6 new tests: tier isolation, independent per-tier reordering, unset priority as `0`, consecutive-run grouping, an unchanged input returned as-is, and an end-to-end `OllamaClient` routing check.
10
+ - `package-lock.json` root version corrected (it still read `1.8.0`).
11
+
12
+ ## [1.12.0] — Daemon liveness & telemetry standardization: formatTelemetry, dynamic host model-affinity routing, root ping
13
+
14
+ The October 10 documentation digest ("Daemon Liveness & Telemetry Standardization") reviewed the official operational surfaces — the root liveness probe (`HEAD /` → 200, body "Ollama is running"), `GET /api/version`, `GET /api/ps` runner introspection, and the nanosecond duration counters on every generation response. Verified against the codebase first (see [ADR 0028](./docs/adr/0028-telemetry-normalization-host-affinity-root-ping.md)): two of the digest's gap assessments were stale — multi-host pooling with least-connections routing, capacity caps, and 503/`OLLAMA_MAX_QUEUE` saturation failover already exist (`endpoints` + `endpointHealth` + `DEFAULT_FAILOVER_CODES`), so the proposed `LoadBalancedOllamaClient` was **not** added (it would fork the existing routing engine); the real gaps — telemetry math, dynamic multi-host affinity, and the root ping — are implemented, all additive, no breaking changes. 865 pre-existing tests stay green, 33 new tests added.
15
+
16
+ ### Standardized telemetry normalizer (`formatTelemetry`, `src/telemetry/metrics.ts`)
17
+
18
+ - **`formatTelemetry(raw)`** derives the human-scale summary from Ollama's raw nanosecond/token counters: `totalLatencyMs`, `modelLoadMs`, `promptEvalMs`, `generationMs` (ns→ms, 2 decimals), `tokensPerSecond` (`eval_count / (eval_duration / 1e9)` — the official Usage-doc formula), `promptTokensPerSecond`, and `cacheHitRatio` — pure, never throws, missing counters read as `0` (never `NaN`/`Infinity`, so partial payloads like stream final events and older servers format cleanly).
19
+ - The input is **structural**: any response object carrying the optional counters — `ChatResponse`, `GenerateResponse`, the final `GenerateStreamEvent`, `EmbedResponse` — passes as-is, no plucking. Purity and structural acceptance are pinned by tests with real response objects (no casts).
20
+ - **`cacheHitRatio` deliberately deviates from the digest's sketch**: `cached / (cached + evaluated)`, not `cached / prompt_eval_count` — Ollama reports `prompt_eval_count: 0` on a _full_ cache hit, so the digest's formula divides by zero and reads a perfect cache as "no caching". The sum denominator is the SDK's established `ConversationSession.cacheStats.hitRate` semantics; the two surfaces now share documented, tested math.
21
+
22
+ ### Dynamic host model-affinity routing (`endpointHealth.modelAffinity` + `ModelAffinityRouter`)
23
+
24
+ - The digest's "tomorrow's focus" item, shipped: with several interchangeable endpoints, **opt-in** `endpointHealth: { modelAffinity: { ttlMs?, failureRetryMs? } }` reorders each request's candidate endpoints so hosts whose `GET /api/ps` shows the requested model already resident in VRAM are tried first — avoiding the unload/cold-load swap a miss forces on `OLLAMA_MAX_LOADED_MODELS`-bounded daemons. The multi-host counterpart of `ModelAffinityScheduler` (v1.11.0); the two compose.
25
+ - **Zero added request latency**: reordering is synchronous and cache-only — a request never waits for a probe. On a cache miss the request proceeds with the unchanged order while a background refresh (TTL 30s default, deduped, 5s failure backoff) warms the cache. `client.warmModelAffinity()` pre-warms at startup; `client.modelAffinityStatus()` exposes per-endpoint snapshots (loaded models, fetch time, freshness) for observability.
26
+ - **Partial knowledge suppresses the reorder** — if any candidate's snapshot is stale or unknown, the original order stands (routing on partial residency data risks the exact cold-load swap the feature prevents). Probe failures are never cached as data; probes bypass `executeWithFailover` entirely (no reentry, no circuit-breaker pollution, no cross-host failover — the answer is per-host by definition).
27
+ - **Race-free with `'least-connections'`**: no `await` between candidate selection, the reorder, and the endpoint's `acquire()` — the strategy's deterministic one-per-account guarantee is untouched; priority tiers, capacity caps, `models`-scoped credentials, and single-endpoint pinning all keep working.
28
+ - **Matching is shared, not duplicated**: "resident" uses the same matcher as context-window discovery (`isModelResident`, refactored out of `findRunningModelContextLength` — exact `name`/`model` match or tag-less prefix `llama3` ↔ `llama3:latest`, never `llama` → `llama3.1`). Off unless configured: without `modelAffinity` the router isn't constructed and no `/api/ps` probes are ever issued.
29
+
30
+ ### Root liveness probe (`client.ping()`)
31
+
32
+ - The official ultra-lightweight liveness check: `HEAD /` against the current best candidate endpoint, resolving `{ healthy, latencyMs, baseUrl, error? }` — the docs define this exact probe for load-balancer health checks (`GET /` answers the plain-text body "Ollama is running"; HEAD doesn't transfer it).
33
+ - **Single-shot by design** — no retry, no failover: a liveness probe's value is that it answers about _one concrete host_, not "some endpoint eventually answered". Fleet audits remain `healthCheck()`'s job (every endpoint, plus the version via the heavier `GET /api/version`). Resolves rather than throws on connection failure/timeout/error status (monitoring loops treat it as a datapoint); only caller-initiated cancellation (`signal`, `destroy()`) rejects, like any other aborted request. Uses the client's `fetch`/middleware/lifecycle pipeline like every other request.
34
+
35
+ ### Documentation
36
+
37
+ - README: three Key Features bullets; a "Standardized Telemetry" section (before OpenTelemetry, which it complements); a "Model-affinity routing across hosts" subsection in the Multi-Endpoint guide (with the `warmModelAffinity`/`modelAffinityStatus` flow); `ping()` in the health-check intro. ADR 0028 records the audit verdicts, the declined `LoadBalancedOllamaClient` fork, and the `cacheHitRatio` deviation rationale.
38
+ - New examples: `examples/telemetry.ts` and `examples/multi-host-affinity.ts`.
39
+
3
40
  ## [1.11.0] — Documentation digest + production-readiness audit: context discovery, compaction, affinity scheduling, agent cycle detection, URL-join hardening, vision-history hygiene
4
41
 
5
42
  Three real gaps from the follow-up documentation digest on concurrency & memory-scaling mechanics (see [ADR 0026](./docs/adr/0026-context-discovery-history-compaction-model-affinity.md)) and three verified findings from the October 9 production-readiness audit on agent-loop ergonomics, transport hardening, and multi-turn memory retention (see [ADR 0027](./docs/adr/0027-agent-cycle-detection-url-join-history-hygiene.md)) — all additive, no breaking changes; 778 pre-existing tests stay green, 87 new tests added (40 digest + 47 audit). Stale claims in both reports were verified against the codebase and answered with documentation and tests instead of new code (one digest claim, two audit claims).
package/README.md CHANGED
@@ -6,6 +6,16 @@
6
6
 
7
7
  > Production-grade TypeScript SDK for Ollama. Built with native fetch, high availability failover, multi-turn tool calling, structured outputs with Zod, reasoning stream tokens, OpenAI & Anthropic compatibility bridges, MCP integration, and Web Stream adapters.
8
8
 
9
+ ### How this compares
10
+
11
+ | Need | Typical choice |
12
+ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
13
+ | Default Ollama integration in JS/TS | Official [`ollama`](https://www.npmjs.com/package/ollama) client (`ollama/ollama-js`) |
14
+ | Vercel AI SDK (`ai` package) apps | [`ai-sdk-ollama`](https://www.npmjs.com/package/ai-sdk-ollama) |
15
+ | Agent runtime, MCP bridge, HA failover, context safety, structured outputs | **This package** — powers [Nexum](https://github.com/shubhamtaywade82/nexum) |
16
+
17
+ Nexum’s model harness (2026-10-09) exercised this SDK via `gemma4:cloud` and `minicpm5:2b` with 100% pass on `tool-calling`, `output-format`, and `agentic-looping` categories. See [nexum/docs/guide/benchmarks.md](../nexum/docs/guide/benchmarks.md) and [validation.md](../nexum/docs/guide/validation.md).
18
+
9
19
  ---
10
20
 
11
21
  ## Key Features
@@ -29,6 +39,9 @@
29
39
  - 🧠 **Dynamic Context-Window Discovery**: `client.models.getContextLength({ model })` resolves the real window from the server — the allocated window of the running instance (`/api/ps`), the Modelfile `num_ctx` default, and the native GGUF maximum (`model_info`), in precedence order — so applications stop hardcoding 2048/4096 guesses.
30
40
  - 🔁 **Model-Affinity Scheduling**: `ModelAffinityScheduler` runs multi-model workloads through per-model serial queues with a distinct-model cap (default 1), deepening the already-hot model before loading the next — the anti-thrashing order for `OLLAMA_NUM_PARALLEL`/`OLLAMA_MAX_LOADED_MODELS`-bounded daemons — and routes candidate lists to whichever model is already loaded.
31
41
  - 🛡️ **Agent Loop Guardrails**: `Agent` is a boundary-checked runner out of the box — `maxIterations` (default 10), an opt-in `maxToolCalls` budget, and opt-in **cycle detection** (`maxRepeatedToolCalls`) that fails fast with `OllamaAgentToolLoopError` the moment the model re-emits one identical tool call instead of burning the whole iteration budget on it; tool rejections (including unregistered names) are always encapsulated as `role: 'tool'` results, never loop crashes.
42
+ - 📊 **Standardized Telemetry (`formatTelemetry`)**: One pure call turns Ollama's raw nanosecond counters into the summary humans want — ms latencies, `tokensPerSecond`/`promptTokensPerSecond` per the official Usage-doc formulas, and the KV `cacheHitRatio` — accepting any response object structurally (`chat`, `generate`, stream final events, `embed`), with missing counters reading as `0`, never `NaN`.
43
+ - 🧲 **Dynamic Host Model-Affinity Routing**: With several interchangeable endpoints, opt-in `endpointHealth.modelAffinity` reorders each request's candidates so the host already holding the requested model in VRAM (`GET /api/ps`, TTL-cached, zero added request latency) is tried first — no more forced unload/cold-load swaps under `OLLAMA_MAX_LOADED_MODELS`.
44
+ - 🩺 **Root Liveness Probe (`ping`)**: `client.ping()` is the official ultra-lightweight `HEAD /` health check — single-shot (no retry, no failover: the answer is about one concrete host), resolves instead of throwing, reports latency; `healthCheck()` remains the fleet-wide audit.
32
45
  - 🧼 **Vision History Hygiene**: `sanitizeHistoryForNextTurn()` evicts stale base64 image payloads from consumer-managed multi-turn vision histories — every `/api/chat` request re-sends the whole history, so old images silently bloat payload, context, and heap; the helper keeps images only on the trailing window you choose, conversation text fully preserved.
33
46
  - 🌊 **Web Stream Adapters**: Drop-in adapters (`toTextStream`, `toDataStream`, `toResponse`) for Next.js Route Handlers and Vercel AI SDK.
34
47
  - 📈 **OpenTelemetry Instrumentation**: Automatic spans for HTTP requests, endpoint failover, chat/generate calls, and agent runs — zero-cost when OpenTelemetry isn't installed.
@@ -936,6 +949,11 @@ const client = new OllamaClient({
936
949
  // Active health check probe
937
950
  const health = await client.healthCheck();
938
951
  console.log(health);
952
+
953
+ // Ultra-lightweight single-host liveness probe — the official `HEAD /` root
954
+ // ping (no retry, no failover: an answer about one concrete host).
955
+ const { healthy, latencyMs } = await client.ping();
956
+ console.log(healthy, `${latencyMs}ms`);
939
957
  ```
940
958
 
941
959
  Failover applies to inference calls (`chat`, `generate`, `embed`, `embeddings`,
@@ -1164,6 +1182,65 @@ initial HTTP round trip:
1164
1182
  between turns, outside any `chat()` call, so a slow tool never ties up one of your
1165
1183
  scarce concurrent-request accounts.
1166
1184
 
1185
+ #### Model-affinity routing across hosts (prefer the resident host)
1186
+
1187
+ With several _interchangeable_ endpoints serving the same models — the fleet-of-workstations
1188
+ case, not the per-credential Cloud case — sending a request to a host that doesn't currently
1189
+ hold the model forces that host to evict something and cold-load it: the multi-host version
1190
+ of the thrashing `ModelAffinityScheduler` prevents inside one client. Opt in with
1191
+ `endpointHealth.modelAffinity` and each request's candidates are reordered so hosts whose
1192
+ `GET /api/ps` shows the requested model already resident in VRAM are tried first:
1193
+
1194
+ ```typescript
1195
+ const client = new OllamaClient({
1196
+ endpoints: [
1197
+ { name: 'gpu-a', baseUrl: 'http://gpu-a.internal:11434' },
1198
+ { name: 'gpu-b', baseUrl: 'http://gpu-b.internal:11434' },
1199
+ { name: 'gpu-c', baseUrl: 'http://gpu-c.internal:11434' },
1200
+ ],
1201
+ endpointHealth: {
1202
+ strategy: 'least-connections',
1203
+ modelAffinity: { ttlMs: 30_000 }, // /api/ps snapshot freshness (default 30s)
1204
+ },
1205
+ });
1206
+
1207
+ // Optional but recommended at startup: pre-warm the residency cache so even the
1208
+ // first request routes to the host already holding the model.
1209
+ await client.warmModelAffinity();
1210
+
1211
+ await client.chat({ model: 'llama3.2', messages }); // → the host with llama3.2 in VRAM
1212
+
1213
+ // Observability: what each host held, when it was last probed, whether it's fresh.
1214
+ console.log(client.modelAffinityStatus());
1215
+ ```
1216
+
1217
+ The design never trades latency for affinity (see
1218
+ [ADR 0028](./docs/adr/0028-telemetry-normalization-host-affinity-root-ping.md)):
1219
+
1220
+ - **Zero added request latency.** Reordering is synchronous and consults only cached
1221
+ `/api/ps` snapshots. A request never waits for a probe: on a cache miss it proceeds
1222
+ with the unchanged order while a background refresh warms the cache for the next one.
1223
+ - **Partial knowledge suppresses the reorder.** If any candidate's snapshot is stale or
1224
+ unknown (a host was just rebooted, a probe failed), the original order stands —
1225
+ routing on partial residency data risks exactly the cold-load swap this exists to
1226
+ avoid. Probe failures are never cached as data and a 5s backoff keeps a dead host
1227
+ from being re-probed on every request.
1228
+ - **No probes at all unless configured.** Without `modelAffinity`, the router isn't even
1229
+ constructed — zero overhead, and no `/api/ps` traffic.
1230
+ - **Composes with everything above.** Affinity reorders _within each priority tier_ of
1231
+ the runnable set (a higher-priority host is always tried first, resident or not):
1232
+ priority tiers, `least-connections` ordering, capacity caps, and `models`-scoped
1233
+ credentials keep working exactly as before, and single-endpoint-pinned operations
1234
+ (model/blob management, `capabilities()`) are never moved to a different host.
1235
+ Residency matching follows Ollama's own name resolution (`llama3` matches
1236
+ `llama3:latest` but never `llama3.1`), shared with context-window discovery so the
1237
+ two features can't disagree about what "loaded" means.
1238
+
1239
+ For the _single-host_ counterpart — per-model serial queues that deepen the already-hot
1240
+ model before loading the next one — see
1241
+ [Model-Affinity Scheduling](#model-affinity-scheduling-multi-model-anti-thrashing); the
1242
+ two compose: a scheduler per host, affinity routing between hosts.
1243
+
1167
1244
  ### Client Teardown: `destroy()`
1168
1245
 
1169
1246
  Inside `node:worker_threads` tasks, CLI runners, serverless handlers, and other
@@ -1197,6 +1274,60 @@ returns `0`.
1197
1274
 
1198
1275
  ---
1199
1276
 
1277
+ ### Standardized Telemetry (`formatTelemetry`)
1278
+
1279
+ Ollama reports every duration on its generation responses as an **integer in
1280
+ nanoseconds** (`total_duration`, `load_duration`, `prompt_eval_duration`, `eval_duration`)
1281
+ alongside token counters (`prompt_eval_count`, `prompt_eval_cached_count`, `eval_count`).
1282
+ Turning those into the numbers humans actually want — milliseconds, tokens/second, cache
1283
+ hit rate — is the same division-and-rounding math every consumer would otherwise
1284
+ hand-roll (and the easy mistakes are real: `NaN` on missing counters, integer division,
1285
+ a cache ratio that divides by the wrong denominator). `formatTelemetry` is that math,
1286
+ once, with the official Usage-doc formulas:
1287
+
1288
+ ```typescript
1289
+ import { OllamaClient, formatTelemetry } from '@nemesis-oss/ollama-sdk';
1290
+
1291
+ const client = new OllamaClient();
1292
+
1293
+ const res = await client.chat({
1294
+ model: 'llama3.2',
1295
+ messages: [{ role: 'user', content: 'Why is the sky blue?' }],
1296
+ });
1297
+
1298
+ // Any response object works as-is — chat, generate, the final stream event,
1299
+ // embed. No plucking required: the counters are read structurally.
1300
+ const t = formatTelemetry(res);
1301
+ console.log(t);
1302
+ // {
1303
+ // totalLatencyMs: 3712.5, // total_duration / 1e6, 2 decimals
1304
+ // modelLoadMs: 250, // cold-load into VRAM (0 when resident)
1305
+ // promptEvalMs: 1000, // prompt pre-fill
1306
+ // generationMs: 2400, // token generation
1307
+ // tokensPerSecond: 50, // eval_count / (eval_duration / 1e9) — official formula
1308
+ // promptTokensPerSecond: 200, // prompt_eval_count / (prompt_eval_duration / 1e9)
1309
+ // cacheHitRatio: 0.429 // cached / (cached + evaluated), 3 decimals
1310
+ // }
1311
+ ```
1312
+
1313
+ Two behaviors worth knowing:
1314
+
1315
+ - **Missing counters read as `0`** — partial payloads (stream final events, older
1316
+ servers without `prompt_eval_cached_count`, embeddings) format cleanly instead of
1317
+ producing `NaN`/`Infinity`, and zero durations never divide into rates.
1318
+ - **`cacheHitRatio` uses `cached / (cached + evaluated)`**, not
1319
+ `cached / prompt_eval_count`: Ollama reports `prompt_eval_count: 0` on a _full_ cache
1320
+ hit, so dividing by it alone would read a perfect cache as "no caching at all". This
1321
+ is the same semantics as [`ConversationSession`'s
1322
+ `cacheStats.hitRate`](#kv-cache-aware-conversation-sessions), so the two surfaces can
1323
+ never disagree.
1324
+
1325
+ `formatTelemetry` is pure — no fetching, no throwing, no mutation — so it drops
1326
+ straight into log lines, dashboards, and streaming pipelines alike. For span-based
1327
+ instrumentation of requests themselves, see
1328
+ [Observability with OpenTelemetry](#observability-with-opentelemetry) below; the two
1329
+ compose (spans for _where/when_, `formatTelemetry` for _how fast_).
1330
+
1200
1331
  ### Observability with OpenTelemetry
1201
1332
 
1202
1333
  The client automatically emits [OpenTelemetry](https://opentelemetry.io/) spans for HTTP
@@ -1,4 +1,4 @@
1
- import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, af as SseEvent, y as OllamaClientError } from './runtime-CCm4CtU_.js';
1
+ import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, af as SseEvent, y as OllamaClientError } from './runtime-CIQYCRL3.js';
2
2
 
3
3
  /**
4
4
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
@@ -1,4 +1,4 @@
1
- import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, af as SseEvent, y as OllamaClientError } from './runtime-DTtWCxDs.cjs';
1
+ import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, af as SseEvent, y as OllamaClientError } from './runtime-DmI1cOEq.cjs';
2
2
 
3
3
  /**
4
4
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
@@ -1,4 +1,4 @@
1
- import { l as ToolDefinition, i as ToolCall, n as Message } from './types-BtQexFpT.js';
1
+ import { l as ToolDefinition, i as ToolCall, n as Message } from './types-B57ZZfp3.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { l as ToolDefinition, i as ToolCall, n as Message } from './types-BtQexFpT.cjs';
1
+ import { l as ToolDefinition, i as ToolCall, n as Message } from './types-B57ZZfp3.cjs';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -1,8 +1,8 @@
1
- import { O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, b as OpenAIChatCompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, e as OpenAICompletionChunk, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, h as OpenAIListModelsResponse, i as OpenAIModelItem, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, l as OpenAIResponsesStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, n as AnthropicMessageStreamEvent } from './anthropic-DinrABof.cjs';
2
- export { N as NativeApi } from './anthropic-DinrABof.cjs';
3
- import { O as OllamaRuntime } from './runtime-DTtWCxDs.cjs';
4
- export { a as OperationDefinition } from './runtime-DTtWCxDs.cjs';
5
- import './types-BtQexFpT.cjs';
1
+ import { O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, b as OpenAIChatCompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, e as OpenAICompletionChunk, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, h as OpenAIListModelsResponse, i as OpenAIModelItem, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, l as OpenAIResponsesStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, n as AnthropicMessageStreamEvent } from './anthropic-Did0lQxP.cjs';
2
+ export { N as NativeApi } from './anthropic-Did0lQxP.cjs';
3
+ import { O as OllamaRuntime } from './runtime-DmI1cOEq.cjs';
4
+ export { a as OperationDefinition } from './runtime-DmI1cOEq.cjs';
5
+ import './types-B57ZZfp3.cjs';
6
6
  import 'zod';
7
7
 
8
8
  /**
@@ -1,8 +1,8 @@
1
- import { O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, b as OpenAIChatCompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, e as OpenAICompletionChunk, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, h as OpenAIListModelsResponse, i as OpenAIModelItem, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, l as OpenAIResponsesStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, n as AnthropicMessageStreamEvent } from './anthropic-CfricAhK.js';
2
- export { N as NativeApi } from './anthropic-CfricAhK.js';
3
- import { O as OllamaRuntime } from './runtime-CCm4CtU_.js';
4
- export { a as OperationDefinition } from './runtime-CCm4CtU_.js';
5
- import './types-BtQexFpT.js';
1
+ import { O as OpenAIChatCompletionRequest, a as OpenAIChatCompletionResponse, b as OpenAIChatCompletionChunk, c as OpenAICompletionRequest, d as OpenAICompletionResponse, e as OpenAICompletionChunk, f as OpenAIEmbeddingRequest, g as OpenAIEmbeddingResponse, h as OpenAIListModelsResponse, i as OpenAIModelItem, j as OpenAIResponsesRequest, k as OpenAIResponsesResponse, l as OpenAIResponsesStreamEvent, A as AnthropicMessagesRequest, m as AnthropicMessagesResponse, n as AnthropicMessageStreamEvent } from './anthropic-CKp5TmAP.js';
2
+ export { N as NativeApi } from './anthropic-CKp5TmAP.js';
3
+ import { O as OllamaRuntime } from './runtime-CIQYCRL3.js';
4
+ export { a as OperationDefinition } from './runtime-CIQYCRL3.js';
5
+ import './types-B57ZZfp3.js';
6
6
  import 'zod';
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
- export { I as InvokeRequest, O as OllamaRuntime, b as OllamaRuntimeOptions, a as OperationDefinition, S as SchemaRef } from './runtime-DTtWCxDs.cjs';
1
+ export { I as InvokeRequest, O as OllamaRuntime, b as OllamaRuntimeOptions, a as OperationDefinition, S as SchemaRef } from './runtime-DmI1cOEq.cjs';
2
2
  import { z } from 'zod';
3
- import './types-BtQexFpT.cjs';
3
+ import './types-B57ZZfp3.cjs';
4
4
 
5
5
  /**
6
6
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
@@ -1,6 +1,6 @@
1
- export { I as InvokeRequest, O as OllamaRuntime, b as OllamaRuntimeOptions, a as OperationDefinition, S as SchemaRef } from './runtime-CCm4CtU_.js';
1
+ export { I as InvokeRequest, O as OllamaRuntime, b as OllamaRuntimeOptions, a as OperationDefinition, S as SchemaRef } from './runtime-CIQYCRL3.js';
2
2
  import { z } from 'zod';
3
- import './types-BtQexFpT.js';
3
+ import './types-B57ZZfp3.js';
4
4
 
5
5
  /**
6
6
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.