@nemesis-oss/ollama-sdk 1.19.0 → 1.20.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 (46) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +8 -8
  3. package/dist/{anthropic-CAvwqIjx.d.ts → anthropic-BFOC6eI7.d.ts} +7 -1
  4. package/dist/{anthropic-DIPnBwlf.d.cts → anthropic-C2-qaxjI.d.cts} +7 -1
  5. package/dist/{compose-C4QxEZOS.d.cts → compose-BXXgHmrS.d.cts} +1 -1
  6. package/dist/{compose-75UFDzOO.d.ts → compose-DaG83yId.d.ts} +1 -1
  7. package/dist/generated-api.cjs +1 -1
  8. package/dist/generated-api.cjs.map +1 -1
  9. package/dist/generated-api.d.cts +7 -7
  10. package/dist/generated-api.d.ts +7 -7
  11. package/dist/generated-api.js +1 -1
  12. package/dist/generated-api.js.map +1 -1
  13. package/dist/generated-models-schemas.cjs +25 -2
  14. package/dist/generated-models-schemas.cjs.map +1 -1
  15. package/dist/generated-models-schemas.d.cts +97 -5
  16. package/dist/generated-models-schemas.d.ts +97 -5
  17. package/dist/generated-models-schemas.js +24 -3
  18. package/dist/generated-models-schemas.js.map +1 -1
  19. package/dist/generated-runtime.cjs +23 -2
  20. package/dist/generated-runtime.cjs.map +1 -1
  21. package/dist/generated-runtime.d.cts +2 -2
  22. package/dist/generated-runtime.d.ts +2 -2
  23. package/dist/generated-runtime.js +23 -2
  24. package/dist/generated-runtime.js.map +1 -1
  25. package/dist/index.cjs +227 -28
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +169 -46
  28. package/dist/index.d.ts +169 -46
  29. package/dist/index.js +222 -29
  30. package/dist/index.js.map +1 -1
  31. package/dist/mcp/tools.json +1 -1
  32. package/dist/mcp-generated.cjs +1 -1
  33. package/dist/mcp-generated.cjs.map +1 -1
  34. package/dist/mcp-generated.d.cts +2 -2
  35. package/dist/mcp-generated.d.ts +2 -2
  36. package/dist/mcp-generated.js +1 -1
  37. package/dist/mcp-generated.js.map +1 -1
  38. package/dist/{runtime-C28YEAHC.d.cts → runtime-CpO3H6yy.d.cts} +55 -2
  39. package/dist/{runtime-DYCxYGG-.d.ts → runtime-DPSrPwAa.d.ts} +55 -2
  40. package/dist/skills.cjs.map +1 -1
  41. package/dist/skills.d.cts +3 -3
  42. package/dist/skills.d.ts +3 -3
  43. package/dist/skills.js.map +1 -1
  44. package/dist/{types-Y3u0FtdN.d.cts → types-CnsZ24tm.d.cts} +17 -1
  45. package/dist/{types-Y3u0FtdN.d.ts → types-CnsZ24tm.d.ts} +17 -1
  46. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,51 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.20.0] — Post-audit v1.19.1 refresh: re-pin 36a6e99, usage model grouping, ShowResponse prompt provenance, the 0.40.5 cloud-model gate
4
+
5
+ The daily audit against the v1.19.1 baseline claimed "zero upstream drift since d9b8601, no action needed"; independent verification (raw content diff of upstream `docs/openapi.yaml` against the pin — the same discipline that caught the v1.19.0 audit's false row) found the headline false and two repository-internal defects besides. Two upstream commits had landed after the 2026-10-16 pin: `2476d5e` adds model grouping to cloud usage, and `36a6e99` populates `ShowResponse.renderer/parser` and adds `template_source`. Separately: the docs had promised since 1.19.0 that cloud models (`clef:cloud`) require "Ollama >= 0.40.5, enforced automatically" while only the blanket 0.35.0 floor was ever enforced, and `docs-index.json`'s `pinnedSha` silently lagged the pin by one refresh (nothing consumed it, no test covered it). All changes additive or gap-closing; no breaking changes (see [ADR 0036](./docs/adr/0036-post-audit-v1191-refresh-usage-grouping-cloud-gate.md)). 1087 pre-existing tests stay green, 14 net-new tests added.
6
+
7
+ ### Upstream drift (re-pin `d9b8601` → `36a6e99`)
8
+
9
+ - **Usage model grouping (upstream `2476d5e`)**: `GET /api/usage` gains a `group_by=model` query parameter — `client.usage({ groupBy: 'model' })` — and two new schemas, `UsageGroup` (per-model metrics + name) and `UsageSummary` (metrics + up to 10 `groups` ranked by usage or request count, plus a `remainder` roll-up for everything outside the limit). `UsageResponse.totals` widens from `UsageMetrics` to `UsageSummary` (read-compatible — it extends `UsageMetrics`), `UsageBucket` composes the same summary so buckets can carry per-model groups, and the response echoes the selection in a new `group_by` field. Both models and `UsageGroupBy` are root-exported.
10
+ - **ShowResponse prompt provenance (upstream `36a6e99`)**: `ShowResponse` gains `renderer` (effective chat renderer, aliases resolved), `parser` (configured output parser), and `template_source` (where the chat prompt comes from: `renderer_parser` | `renderer` | `parser` | `harmony` | `go_template` | `gguf_chat_template` | `none`) — typed in both the generated surface and `src/types.ts`, and added to the show operation's parity block (the live docs document all three).
11
+ - The pin header documents both commits; the single intentional `families` `[array, null]` deviation is retained unchanged. The "nine corrupted literals" seen during verification were a terminal display artifact (ANSI-like sequence stripping eating `[m` from `[model]`) — the second occurrence of that trap; ADR 0036 records the character-level verification method so it is not "repaired" a third time.
12
+
13
+ ### The 0.40.5 cloud-model gate (docs-vs-runtime gap closed)
14
+
15
+ - `OllamaClient.systemOne` now enforces the documented model-dependent floor before any request is sent: a cloud model (name ending `:cloud`, e.g. `clef:cloud`) through a **local** server probes `/api/version` (through the normal failover machinery, cached per client instance, reset on probe failure) and throws the new typed `OllamaCloudModelVersionError` (code `cloud_model_version`, fields `model`/`serverVersion`/`minRequiredVersion`) when the server is older than 0.40.5 — zero wasted round-trips. Hosted `ollama.com` endpoints never gate; non-cloud models never gate; a failed probe fails open (the runtime's `'auto'` policy), letting the server's own response be the next signal.
16
+ - Version comparison is numeric component-wise (`compareOllamaVersions`, root-exported alongside `isCloudModel`, `CLOUD_MODEL_SUFFIX`, `CLOUD_MODEL_MIN_OLLAMA_VERSION`), mirroring the generated runtime's private comparator — `'0.9.0' < '0.40.5'` ranks correctly, not lexicographically.
17
+ - The blanket operation-level 0.35.0 floor is unchanged (still IR-enforced in the generated runtime). The low-level `client.native.systemOne` path bypasses the gate by design, same as every other wrapper ergonomics; the promise is scoped to where the docs make it.
18
+
19
+ ### Pin provenance unification
20
+
21
+ - `docs-index.json`'s `pinnedSha` now records the upstream main **commit** SHA from the pin header (previously a blob SHA that had silently lagged one refresh), and new `test/contract/pin-consistency.test.ts` asserts header/index agreement, 40-hex formats, on-disk existence of every indexed source path, and that the header documents the current refresh's features — a stale index can no longer hide behind a passing build.
22
+
23
+ ### Docs
24
+
25
+ - New [ADR 0036](./docs/adr/0036-post-audit-v1191-refresh-usage-grouping-cloud-gate.md) recording the refresh, the gate placement reasoning (request-dependent constraints cannot live in the IR), the declined alternatives, and the recurring display-artifact trap. ADR indexes updated (`docs/adr/README.md`, `docs-site/adr/index.md`).
26
+ - `client.ts` JSDoc for `systemOne`/`usage` describes the gate and grouping; the system-one guide's "0.40.5+ for cloud models" warning is now true in code.
27
+ - Watch item carried (not acted on): upstream `efabf6bc` now emits Anthropic error events mid-stream while the docs still call them unsupported — the pinned MDX matches the docs; re-audit the Anthropic bridge when the docs row flips.
28
+
29
+ ## [1.19.1] — Honoring `Retry-After` on 429s: closing the dead-`retryAfterMs` gap (audit v1.19.0 parity)
30
+
31
+ The daily audit against the v1.19.0 baseline (`2d3ec47`) claimed six capability domains all PASS; point-by-point verification found five true and one false — "Native client methods with `OllamaRateLimitError.retryAfterMs` and jittered 429 retries". The field existed and the docs already described it, but nothing populated or consumed it: all three `HttpClient` error-mapping sites discarded response headers when building error contexts, `statusToError`'s 429 branch never parsed `Retry-After`, and `withRetry` slept full-jitter backoff regardless. The pinned upstream contract documents `Retry-After` ("Seconds to wait before retrying", `type: integer`) on the 429 responses of both cloud account endpoints (`/api/usage`, `/api/balance`) — this was contract-required behavior our own `docs-site/api/errors.md` already claimed. All changes live in the handwritten layer; no contract or generated-surface changes (see [ADR 0035](./docs/adr/0035-retry-after-honoring.md)). 1057 pre-existing tests stay green, 30 net-new tests added.
32
+
33
+ ### `OllamaRateLimitError.retryAfterMs` is now real
34
+
35
+ - **`parseRetryAfterMs(headerValue, now?)` — new root-exported parser**: delay-seconds (`"120"` → 120 000 ms) or strict IMF-fixdate HTTP-date (→ milliseconds until that instant, clamped at `0` for past dates). The HTTP-date branch validates the shape **before** `Date.parse` because engine date parsers are dangerously lenient (V8 accepts `"1.5"` as a year-2001 date); malformed or overflow values return `undefined`, which falls back to jitter instead of overriding it with a bogus delay. `lookupHeader` (module-level export) does the case-insensitive header lookup on error-context header records.
36
+ - `statusToError`'s 429 branch injects `retryAfterMs` from the response headers — one mapping chokepoint, one status. No other status mapping parses the header: 503/502 keep jitter, because nothing documents `Retry-After` for them (the same invented-behavior reasoning ADR 0034 § 5 applied to the cloud limits).
37
+
38
+ ### Transport capture and retry pacing
39
+
40
+ - `HttpClient` now captures `retry-after` at all three error-mapping sites (`request()`, `requestStream()`, `requestSseStream()`) and the no-middleware lifecycle error event (the middleware path already reported headers) — deliberately capturing **only that one header**, so sensitive fields like `set-cookie` never leak into thrown error objects that callers log. The capture is defensive by design: mock `Response` shapes without a `Headers` implementation degrade to the pre-1.19.1 error-context shape instead of throwing mid-enrichment.
41
+ - **`withRetry` honors the server's delay verbatim** — no jitter, no clamping to `maxDelayMs` — via the new `retryDelayMs(error, attempt, backoff)`: the server explicitly said when the client may retry, and re-issuing earlier would only compound the rate limiting the 429 exists to prevent. Callers who consider a server value excessive keep three sanctioned exits: `shouldRetry` rejecting the error, the abort signal (live for the whole sleep), or a `maxRetries` budget. Absent/unparseable headers — and every other retryable error — keep the full-jitter exponential backoff, unchanged. `onRetry` reports the delay actually used, either way.
42
+ - `fetchWithBackoff` honors `Retry-After` on 429s identically — its own docs claim "the same retry discipline as the SDK's internal transport", which is kept honest rather than re-worded. The honoring is 429-scoped: 503s keep full jitter even if a header is present.
43
+
44
+ ### Docs
45
+
46
+ - New [ADR 0035](./docs/adr/0035-retry-after-honoring.md) recording the fix and the declined alternatives with reasoning (clamping to `maxDelayMs`, capturing the full header record, extending `Retry-After` parsing to 503/502, jittering the server value). ADR indexes updated: `docs/adr/README.md` and `docs-site/adr/index.md` — the latter also gains its missing 0034 row from the 1.19.0 wave.
47
+ - `docs-site/api/errors.md`'s `OllamaRateLimitError` section now describes the honored-by-`withRetry` semantics and the `parseRetryAfterMs` export; `client.ts`'s cloud-endpoint JSDoc (`webSearch`/`webFetch`/`usage`/`balance`) notes the contract-declared `Retry-After` on 429s.
48
+
3
49
  ## [1.19.0] — System One cloud launch contract refresh: dual request-size cap, 402 taxonomy, re-pin d9b8601
4
50
 
5
51
  The scheduled upstream snapshot freshness check (offered after the Task 24 docs fix, accepted) found upstream `openapi.yaml@main` had moved from `2a9ffe3` to `d9b8601` with the **System One cloud launch** — audited point-by-point against the pinned snapshot before any change, per house discipline (see [ADR 0034](./docs/adr/0034-systemone-cloud-launch-contract-refresh.md)). Upstream now declares `/v1/systemone` with local **and cloud** servers (`https://ollama.com`, optional `bearerAuth`), the `model` field accepts cloud models (`clef:cloud`, requiring Ollama >= 0.40.5 or the hosted endpoint), the local byte caps were **clarified from an either/or reading to a dual bound**, and 401/402 joined the documented response set. A second discovery retired an old deviation: the "corrupted Usage enum literals" the 2026-10-07 pin repaired were our own Bash display artifact eating `[24h`/`[h` CSI-style sequences — upstream serves them clean inline, so the repair deviation is retired. All changes additive or contract-aligning; no breaking API changes. 1047 pre-existing tests stay green, 10 net-new tests added (5 rewritten onto the new semantics).
package/README.md CHANGED
@@ -337,7 +337,7 @@ Ollama implements the Responses API **non-statefully** — `previous_response_id
337
337
 
338
338
  ### Context-Window Safety (silent-truncation guard)
339
339
 
340
- With `num_ctx` unset, Ollama loads the model with a conservative default window (commonly 2048–4096 tokens) and **silently truncates** prompts that don't fit — the model simply loses the top of the conversation with no error. The client estimates the prompt size before every `chat`/`generate` call and surfaces the risk:
340
+ With `num_ctx` unset, Ollama sizes the default window by available VRAM — 4,096 tokens below 24 GiB, 32,768 at 24–48 GiB, 262,144 at 48 GiB and up (daemon-wide override via `OLLAMA_CONTEXT_LENGTH`; cloud models run at their maximum) — and **silently truncates** prompts that don't fit. The client estimates the prompt size before every `chat`/`generate` call and surfaces the risk:
341
341
 
342
342
  ```typescript
343
343
  const client = new OllamaClient({
@@ -359,7 +359,7 @@ The estimators are exported for custom pipelines: `estimateTokens(text)` (CJK-aw
359
359
 
360
360
  ### Discovering the Real Context Window
361
361
 
362
- Guessing context windows ("it's probably 2048… or 4096?") is how silent truncation happens. Ollama advertises the real numbers in two places, and they answer _different questions_: `GET /api/ps` reports the window the **running instance actually allocated** (exact, reflects the Modelfile `num_ctx` default and what fit in memory), while `POST /api/show` exposes the Modelfile's `num_ctx` default _and_ the model's **native GGUF maximum** in `model_info["<architecture>.context_length"]` — the official API examples show a model with a 131072-token native max whose running instance allocated 4096, a 32× gap. `getContextLength()` consults them in precedence order and returns every signal it found:
362
+ Guessing context windows ("it's probably 2048… or 4096?") is how silent truncation happens — worse, current daemons tier the unset-`num_ctx` default by VRAM (4k / 32k / 256k), so a hardcoded guess is now wrong in both directions. Ollama advertises the real numbers in two places, and they answer _different questions_: `GET /api/ps` reports the window the **running instance actually allocated** (exact, reflects the Modelfile `num_ctx` default and what fit in memory), while `POST /api/show` exposes the Modelfile's `num_ctx` default _and_ the model's **native GGUF maximum** in `model_info["<architecture>.context_length"]` — the official API examples show a model with a 131072-token native max whose running instance allocated 4096, a 32× gap. `getContextLength()` consults them in precedence order and returns every signal it found:
363
363
 
364
364
  ```typescript
365
365
  const window = await client.models.getContextLength({ model: 'gemma4' });
@@ -467,12 +467,12 @@ Dispatch is **affinity-sticky, not round-robin**: when a queued model is already
467
467
 
468
468
  The server-side knobs (official FAQ defaults) and the client-side surfaces that map onto them:
469
469
 
470
- | Server knob | Default | Effect | Client-side counterpart |
471
- | ----------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
472
- | `OLLAMA_NUM_PARALLEL` | 1 | Parallel requests **per loaded model**; required memory scales `NUM_PARALLEL × CONTEXT_LENGTH` (a 4K-context model at 4 parallel allocates a 16K KV cache) | `ModelAffinityScheduler({ perModelConcurrency })`, `ToolRegistry({ maxConcurrency })` for agent tool dispatch |
473
- | `OLLAMA_MAX_LOADED_MODELS` | 3× GPUs (3 on CPU) | Concurrently loaded models; beyond it, requests queue until a model goes idle or is evicted — the swap/thrash cycle | `ModelAffinityScheduler({ concurrentModels })` — keep the working set small; `client.models.pin()`/`unload()` for explicit lifecycle |
474
- | `OLLAMA_MAX_QUEUE` | 512 | Queued requests beyond this are rejected immediately with **503** | `endpointHealth.maxConcurrentPerEndpoint` (queue client-side instead of saturating the daemon), `embedBatch({ batchSize, concurrency })` for ingestion, retry/failover on 503 |
475
- | `OLLAMA_CONTEXT_LENGTH` / `num_ctx` | 2048–4096 model-dependent | The window per request — prompts beyond it are **silently truncated** | `models.getContextLength()` for the real number, `defaultContextLength` to make it explicit, pre-flight warnings + `session.compact()` to stay inside it |
470
+ | Server knob | Default | Effect | Client-side counterpart |
471
+ | ----------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
472
+ | `OLLAMA_NUM_PARALLEL` | 1 | Parallel requests **per loaded model**; required memory scales `NUM_PARALLEL × CONTEXT_LENGTH` (a 4K-context model at 4 parallel allocates a 16K KV cache) | `ModelAffinityScheduler({ perModelConcurrency })`, `ToolRegistry({ maxConcurrency })` for agent tool dispatch |
473
+ | `OLLAMA_MAX_LOADED_MODELS` | 3× GPUs (3 on CPU) | Concurrently loaded models; beyond it, requests queue until a model goes idle or is evicted — the swap/thrash cycle | `ModelAffinityScheduler({ concurrentModels })` — keep the working set small; `client.models.pin()`/`unload()` for explicit lifecycle |
474
+ | `OLLAMA_MAX_QUEUE` | 512 | Queued requests beyond this are rejected immediately with **503** | `endpointHealth.maxConcurrentPerEndpoint` (queue client-side instead of saturating the daemon), `embedBatch({ batchSize, concurrency })` for ingestion, retry/failover on 503 |
475
+ | `OLLAMA_CONTEXT_LENGTH` / `num_ctx` | VRAM-tiered: 4k / 32k / 256k | The window per request — prompts beyond it are **silently truncated** | `models.getContextLength()` for the real number, `defaultContextLength` to make it explicit, pre-flight warnings + `session.compact()` to stay inside it |
476
476
 
477
477
  The two failure modes this table prevents: `Promise.all`-style floods (hundreds of simultaneous requests → queue saturation → 503s, VRAM spikes) and model ping-pong (alternating models → repeated unload/reload stalls). The SDK's request path already caps and queues per endpoint via `endpointHealth` — including `strategy: 'least-connections'` for pools — and `embedBatch`/`ModelAffinityScheduler` extend that discipline to ingestion and multi-model workloads. `OLLAMA_KV_CACHE_TYPE` (`f16`/`q8_0`/`q4_0`) trades KV precision for memory headroom at the daemon level; benchmark its latency impact against these client-side levers before relying on it for throughput.
478
478
 
@@ -1,4 +1,4 @@
1
- import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, ah as SseEvent, z as OllamaClientError } from './runtime-DYCxYGG-.js';
1
+ import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, ai as SseEvent, z as OllamaClientError } from './runtime-DPSrPwAa.js';
2
2
 
3
3
  /**
4
4
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
@@ -445,6 +445,12 @@ interface ShowResponse {
445
445
  readonly details?: Record<string, unknown> | undefined;
446
446
  /** The template used by the model to render prompts */
447
447
  readonly template?: string | undefined;
448
+ /** The effective chat renderer of the model (aliases resolved), when one is set */
449
+ readonly renderer?: string | undefined;
450
+ /** The output parser configured on the model, when one is set */
451
+ readonly parser?: string | undefined;
452
+ /** Where the chat prompt actually comes from; one of `renderer_parser`, `renderer`, `parser` (a Go renderer runs and any packaged template is inert), `harmony`, `go_template`, `gguf_chat_template` (the runner renders the GGUF's embedded jinja), or `none` */
453
+ readonly template_source?: string | undefined;
448
454
  /** List of supported features */
449
455
  readonly capabilities?: readonly string[] | undefined;
450
456
  /** Additional model metadata */
@@ -1,4 +1,4 @@
1
- import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, ah as SseEvent, z as OllamaClientError } from './runtime-C28YEAHC.cjs';
1
+ import { O as OllamaRuntime, H as HttpClient, A as AbortableAsyncIterable, ai as SseEvent, z as OllamaClientError } from './runtime-CpO3H6yy.cjs';
2
2
 
3
3
  /**
4
4
  * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
@@ -445,6 +445,12 @@ interface ShowResponse {
445
445
  readonly details?: Record<string, unknown> | undefined;
446
446
  /** The template used by the model to render prompts */
447
447
  readonly template?: string | undefined;
448
+ /** The effective chat renderer of the model (aliases resolved), when one is set */
449
+ readonly renderer?: string | undefined;
450
+ /** The output parser configured on the model, when one is set */
451
+ readonly parser?: string | undefined;
452
+ /** Where the chat prompt actually comes from; one of `renderer_parser`, `renderer`, `parser` (a Go renderer runs and any packaged template is inert), `harmony`, `go_template`, `gguf_chat_template` (the runner renders the GGUF's embedded jinja), or `none` */
453
+ readonly template_source?: string | undefined;
448
454
  /** List of supported features */
449
455
  readonly capabilities?: readonly string[] | undefined;
450
456
  /** Additional model metadata */
@@ -1,4 +1,4 @@
1
- import { l as ToolDefinition, i as ToolCall, n as Message } from './types-Y3u0FtdN.cjs';
1
+ import { l as ToolDefinition, i as ToolCall, n as Message } from './types-CnsZ24tm.cjs';
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-Y3u0FtdN.js';
1
+ import { l as ToolDefinition, i as ToolCall, n as Message } from './types-CnsZ24tm.js';
2
2
  import { z } from 'zod';
3
3
 
4
4
  /**
@@ -244,7 +244,7 @@ var usageOp = {
244
244
  notes: [
245
245
  "Cloud-only account endpoint \u2014 targets https://ollama.com, not the local Ollama server.",
246
246
  "Requires an Ollama Cloud API key (set via OllamaClient credentials).",
247
- "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).",
247
+ "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e \u2014 groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).",
248
248
  "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.",
249
249
  "Use OllamaClient.usage() \u2014 the generated NativeApi class does not expose this operation."
250
250
  ]
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/generated/api/operations.ts","../src/generated/api/native-api.ts","../src/generated/api/openai-api.ts","../src/generated/api/anthropic-api.ts"],"names":[],"mappings":";;;AASO,IAAM,SAAA,GAAY;AAAA,EACvB,WAAA,EAAa,SAAA;AAAA,EACb,MAAA,EAAQ,KAAA;AAAA,EACR,IAAA,EAAM,cAAA;AAAA,EACN,QAAA,EAAU,EAAE,IAAA,EAAM,2BAAA,EAA4B;AAAA,EAC9C,WAAA,EAAa,EAAE,KAAA,EAAO,KAAA,EAAO,OAAO,IAAA,EAAK;AAAA,EACzC,IAAA,EAAM,oBAAA;AAAA,EACN,SAAA,EAAW,EAAE,IAAA,EAAM,MAAA,EAAQ,WAAW,KAAA,EAAM;AAAA,EAC5C,cAAc,EAAC;AAAA,EACf,MAAA,EAAQ,EAAE,UAAA,EAAY,IAAA,EAAK;AAAA,EAC3B,MAAA,EAAQ,QAAA;AAAA,EACR,KAAA,EAAO;AAAA,IACL,6FAAA;AAAA,IACA,sEAAA;AAAA,IACA,iEAAA;AAAA,IACA,wFAAA;AAAA,IACA;AAAA;AAEJ;AAEO,IAAM,OAAA,GAAU;AAAA,EACrB,WAAA,EAAa,OAAA;AAAA,EACb,MAAA,EAAQ,MAAA;AAAA,EACR,IAAA,EAAM,qBAAA;AAAA,EACN,WAAA,EAAa,EAAE,KAAA,EAAO,IAAA,EAAM,OAAO,KAAA,EAAM;AAAA,EACzC,UAAA,EAAY,CAAC,EAAE,IAAA,EAAM,UAAU,EAAA,EAAI,MAAA,EAAQ,QAAA,EAAU,IAAA,EAAM,MAAA,EAAQ,EAAE,IAAA,EAAM,QAAA,IAAY,CAAA;AAAA,EACvF,SA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,EAAW,cAAA;AAAA,MACX,IAAA,EAAM,MAAA;AAAA,MACN,GAAI,SAAS,MAAA,KAAW,MAAA,GAAY,EAAE,MAAA,EAAQ,OAAA,CAAQ,MAAA,EAAO,GAAI;AAAC,KACnE,CAAA;AAAA,EACH;AAAA,EAEA,kBAAA,CAAmB,OAAe,OAAA,EAA8D;AAC9F,IAAA,OAAO,IAAA,CAAK,QAAQ,MAAA,CAAO;AAAA,MACzB,SAAA,EAAW,oBAAA;AAAA,MACX,IAAA,EAAM,MAAA;AAAA,MACN,UAAA,EAAY,EAAE,KAAA,EAAM;AAAA,MACpB,GAAI,SAAS,MAAA,KAAW,MAAA,GAAY,EAAE,MAAA,EAAQ,OAAA,CAAQ,MAAA,EAAO,GAAI;AAAC,KACnE,CAAA;AAAA,EACH;AAAA,EAQA,gBACE,OAAA,EAGA;AACA,IAAA,OAAO,IAAA,CAAK,QAAQ,MAAA,CAAO;AAAA,MACzB,SAAA,EAAW,iBAAA;AAAA,MACX,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AACF;;;AC5FO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,OAAA,EAAwB;AAAxB,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAAA,EAAyB;AAAA,EAQtD,kBACE,OAAA,EAGA;AACA,IAAA,OAAO,IAAA,CAAK,QAAQ,MAAA,CAAO;AAAA,MACzB,SAAA,EAAW,mBAAA;AAAA,MACX,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AACF","file":"generated-api.cjs","sourcesContent":["/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each OperationDefinition captures what Ollama exposes; the runtime\n * in src/generated/runtime/runtime.ts captures how the SDK behaves.\n */\n\nimport type { OperationDefinition } from '../runtime/operation-definition.js';\n\nexport const balanceOp = {\n operationId: 'balance',\n method: 'GET',\n path: '/api/balance',\n response: { $ref: '#/schemas/BalanceResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Takes no parameters. For usage history see the usage operation.',\n 'Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.',\n 'Use OllamaClient.balance() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const blobsOp = {\n operationId: 'blobs',\n method: 'HEAD',\n path: '/api/blobs/{digest}',\n environment: { local: true, cloud: false },\n parameters: [{ name: 'digest', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'HEAD-only endpoint for blob existence checks; declared in OpenAPI but not in the legacy parity manifest.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const chatOp = {\n operationId: 'chat',\n method: 'POST',\n path: '/api/chat',\n request: { $ref: '#/schemas/ChatRequest' },\n response: { $ref: '#/schemas/ChatResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {\n thinking: 'model-dependent',\n tools: 'model-dependent',\n vision: 'model-dependent',\n structuredOutput: 'supported',\n logprobs: 'supported',\n },\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Use /api/show to discover model-specific thinking values and defaults.',\n 'Structured output (format field) is rejected by Ollama Cloud.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const copyOp = {\n operationId: 'copy',\n method: 'POST',\n path: '/api/copy',\n request: { $ref: '#/schemas/CopyRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const createOp = {\n operationId: 'create',\n method: 'POST',\n path: '/api/create',\n request: { $ref: '#/schemas/CreateRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: { thinking: 'unsupported', tools: 'unsupported' },\n status: { documented: true },\n domain: 'native',\n notes: ['Model creation is local-only; Ollama Cloud does not support it.'],\n} as const satisfies OperationDefinition;\n\nexport const createBlobOp = {\n operationId: 'createBlob',\n method: 'POST',\n path: '/api/blobs/{digest}',\n environment: { local: true, cloud: false },\n parameters: [{ name: 'digest', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'POST endpoint for blob creation; takes a binary body (application/octet-stream).',\n 'Handled by OllamaClient.createBlob() — the generated NativeApi does not expose this operation because the runtime JSON-encodes request bodies.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const deleteOp = {\n operationId: 'delete',\n method: 'DELETE',\n path: '/api/delete',\n request: { $ref: '#/schemas/DeleteRequest' },\n environment: { local: true, cloud: false },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const embedOp = {\n operationId: 'embed',\n method: 'POST',\n path: '/api/embed',\n request: { $ref: '#/schemas/EmbedRequest' },\n response: { $ref: '#/schemas/EmbedResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: { embeddings: 'supported' },\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const generateOp = {\n operationId: 'generate',\n method: 'POST',\n path: '/api/generate',\n request: { $ref: '#/schemas/GenerateRequest' },\n response: { $ref: '#/schemas/GenerateResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {\n thinking: 'model-dependent',\n vision: 'supported',\n structuredOutput: 'supported',\n logprobs: 'supported',\n },\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const psOp = {\n operationId: 'ps',\n method: 'GET',\n path: '/api/ps',\n response: { $ref: '#/schemas/PsResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const pullOp = {\n operationId: 'pull',\n method: 'POST',\n path: '/api/pull',\n request: { $ref: '#/schemas/PullRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const pushOp = {\n operationId: 'push',\n method: 'POST',\n path: '/api/push',\n request: { $ref: '#/schemas/PushRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const showOp = {\n operationId: 'show',\n method: 'POST',\n path: '/api/show',\n request: { $ref: '#/schemas/ShowRequest' },\n response: { $ref: '#/schemas/ShowResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Capabilities source: /api/show is the runtime source of truth for model-dependent capability values (tools, vision, thinking, embeddings).',\n ],\n} as const satisfies OperationDefinition;\n\nexport const systemOneOp = {\n operationId: 'systemOne',\n method: 'POST',\n path: '/v1/systemone',\n request: { $ref: '#/schemas/SystemOneRequest' },\n response: { $ref: '#/schemas/SystemOneResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {\n thinking: 'unsupported',\n tools: 'unsupported',\n vision: 'model-dependent',\n structuredOutput: 'unsupported',\n logprobs: 'unsupported',\n embeddings: 'unsupported',\n },\n constraints: {\n minOllamaVersion: '0.35.0',\n maxRequestBytes: 65536,\n maxRequestBytesWithImages: 33554432,\n },\n status: { documented: true, experimental: true },\n domain: 'native',\n notes: [\n '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.',\n 'Local dual cap: text and schema (excluding images) within 64 KiB AND the whole request within 32 MiB, including base64 and JSON overhead.',\n \"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.\",\n '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.',\n 'No tools, no generation controls (temperature, top_p, etc.).',\n 'Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.',\n 'Experimental: behavioral surface may change between Ollama releases.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const tagsOp = {\n operationId: 'tags',\n method: 'GET',\n path: '/api/tags',\n response: { $ref: '#/schemas/ListResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const usageOp = {\n operationId: 'usage',\n method: 'GET',\n path: '/api/usage',\n response: { $ref: '#/schemas/UsageResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).',\n 'Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.',\n 'Use OllamaClient.usage() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const versionOp = {\n operationId: 'version',\n method: 'GET',\n path: '/api/version',\n response: { $ref: '#/schemas/VersionResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const webFetchOp = {\n operationId: 'webFetch',\n method: 'POST',\n path: '/api/web_fetch',\n request: { $ref: '#/schemas/WebFetchRequest' },\n response: { $ref: '#/schemas/WebFetchResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Use OllamaClient.webFetch() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const webSearchOp = {\n operationId: 'webSearch',\n method: 'POST',\n path: '/api/web_search',\n request: { $ref: '#/schemas/WebSearchRequest' },\n response: { $ref: '#/schemas/WebSearchResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Use OllamaClient.webSearch() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const openaiChatCompletionsOp = {\n operationId: 'openaiChatCompletions',\n method: 'POST',\n path: '/v1/chat/completions',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: {\n thinking: 'model-dependent',\n tools: 'model-dependent',\n vision: 'model-dependent',\n structuredOutput: 'supported',\n logprobs: 'unsupported',\n },\n status: { documented: true },\n domain: 'openai',\n notes: [\n 'Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const openaiCompletionsOp = {\n operationId: 'openaiCompletions',\n method: 'POST',\n path: '/v1/completions',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { logprobs: 'unsupported' },\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiEmbeddingsOp = {\n operationId: 'openaiEmbeddings',\n method: 'POST',\n path: '/v1/embeddings',\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: { embeddings: 'supported' },\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiModelsOp = {\n operationId: 'openaiModels',\n method: 'GET',\n path: '/v1/models',\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiModelsGetOneOp = {\n operationId: 'openaiModelsGetOne',\n method: 'GET',\n path: '/v1/models/{model}',\n environment: { local: true, cloud: true },\n parameters: [{ name: 'model', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'openai',\n notes: ['Returns metadata for a single OpenAI-compat model by id.'],\n} as const satisfies OperationDefinition;\n\nexport const openaiResponsesOp = {\n operationId: 'openaiResponses',\n method: 'POST',\n path: '/v1/responses',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { thinking: 'model-dependent', tools: 'model-dependent' },\n status: { documented: true },\n domain: 'openai',\n notes: [\n 'Ollama implements a subset of the OpenAI Responses API; previous_response_id and conversation are explicitly unsupported.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const anthropicMessagesOp = {\n operationId: 'anthropicMessages',\n method: 'POST',\n path: '/v1/messages',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { thinking: 'model-dependent', tools: 'model-dependent' },\n status: { documented: true },\n domain: 'anthropic',\n notes: [\n \"tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.\",\n 'Nested cache_control fields under messages[].content[].cache_control are unsupported.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const allOperations = [\n balanceOp,\n blobsOp,\n chatOp,\n copyOp,\n createOp,\n createBlobOp,\n deleteOp,\n embedOp,\n generateOp,\n psOp,\n pullOp,\n pushOp,\n showOp,\n systemOneOp,\n tagsOp,\n usageOp,\n versionOp,\n webFetchOp,\n webSearchOp,\n openaiChatCompletionsOp,\n openaiCompletionsOp,\n openaiEmbeddingsOp,\n openaiModelsOp,\n openaiModelsGetOneOp,\n openaiResponsesOp,\n anthropicMessagesOp,\n] as const;\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\nimport type {\n ChatRequest,\n ChatResponse,\n CopyRequest,\n CreateRequest,\n DeleteRequest,\n EmbedRequest,\n EmbedResponse,\n GenerateRequest,\n GenerateResponse,\n ListResponse,\n PsResponse,\n PullRequest,\n PushRequest,\n ShowRequest,\n ShowResponse,\n StatusResponse,\n SystemOneRequest,\n SystemOneResponse,\n VersionResponse,\n} from '../models/index.js';\nimport {\n blobsOp,\n chatOp,\n copyOp,\n createOp,\n deleteOp,\n embedOp,\n generateOp,\n psOp,\n pullOp,\n pushOp,\n showOp,\n systemOneOp,\n tagsOp,\n versionOp,\n} from './operations.js';\n\n/**\n * Generated API surface for Ollama's native domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class NativeApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n blobs(digest: string, options?: { signal?: AbortSignal }): Promise<unknown> {\n return this.runtime.invoke({\n operation: blobsOp,\n body: undefined,\n pathParams: { digest },\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n chat(request: ChatRequest & { stream?: false }): Promise<ChatResponse>;\n chat(\n request: ChatRequest & { stream: true },\n ): Promise<AsyncGenerator<ChatResponse, void, undefined>>;\n chat(\n request: ChatRequest,\n ): Promise<ChatResponse | AsyncGenerator<ChatResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: chatOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n copy(request: CopyRequest): Promise<StatusResponse> {\n return this.runtime.invoke({\n operation: copyOp,\n body: request,\n });\n }\n\n create(request: CreateRequest & { stream?: false }): Promise<StatusResponse>;\n create(\n request: CreateRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n create(\n request: CreateRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: createOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n delete(request: DeleteRequest): Promise<unknown> {\n return this.runtime.invoke({\n operation: deleteOp,\n body: request,\n });\n }\n\n embed(request: EmbedRequest): Promise<EmbedResponse> {\n return this.runtime.invoke({\n operation: embedOp,\n body: request,\n });\n }\n\n generate(request: GenerateRequest & { stream?: false }): Promise<GenerateResponse>;\n generate(\n request: GenerateRequest & { stream: true },\n ): Promise<AsyncGenerator<GenerateResponse, void, undefined>>;\n generate(\n request: GenerateRequest,\n ): Promise<GenerateResponse | AsyncGenerator<GenerateResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: generateOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n ps(options?: { signal?: AbortSignal }): Promise<PsResponse> {\n return this.runtime.invoke({\n operation: psOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n pull(request: PullRequest & { stream?: false }): Promise<StatusResponse>;\n pull(\n request: PullRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n pull(\n request: PullRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: pullOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n push(request: PushRequest & { stream?: false }): Promise<StatusResponse>;\n push(\n request: PushRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n push(\n request: PushRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: pushOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n show(request: ShowRequest): Promise<ShowResponse> {\n return this.runtime.invoke({\n operation: showOp,\n body: request,\n });\n }\n\n systemOne(request: SystemOneRequest): Promise<SystemOneResponse> {\n return this.runtime.invoke({\n operation: systemOneOp,\n body: request,\n });\n }\n\n tags(options?: { signal?: AbortSignal }): Promise<ListResponse> {\n return this.runtime.invoke({\n operation: tagsOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n version(options?: { signal?: AbortSignal }): Promise<VersionResponse> {\n return this.runtime.invoke({\n operation: versionOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n}\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\n// No model types referenced.\nimport type {\n OpenAIChatCompletionChunk,\n OpenAIChatCompletionRequest,\n OpenAIChatCompletionResponse,\n OpenAICompletionChunk,\n OpenAICompletionRequest,\n OpenAICompletionResponse,\n OpenAIEmbeddingRequest,\n OpenAIEmbeddingResponse,\n OpenAIListModelsResponse,\n OpenAIModelItem,\n OpenAIResponsesRequest,\n OpenAIResponsesResponse,\n OpenAIResponsesStreamEvent,\n} from '../../integrations/index.js';\nimport {\n openaiChatCompletionsOp,\n openaiCompletionsOp,\n openaiEmbeddingsOp,\n openaiModelsOp,\n openaiModelsGetOneOp,\n openaiResponsesOp,\n} from './operations.js';\n\n/**\n * Generated API surface for Ollama's openai domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class OpenAIApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest & { stream?: false },\n ): Promise<OpenAIChatCompletionResponse>;\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAIChatCompletionChunk, void, undefined>>;\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest,\n ): Promise<\n OpenAIChatCompletionResponse | AsyncGenerator<OpenAIChatCompletionChunk, void, undefined>\n > {\n return this.runtime.invoke({\n operation: openaiChatCompletionsOp,\n body: request,\n });\n }\n\n openaiCompletions(\n request: OpenAICompletionRequest & { stream?: false },\n ): Promise<OpenAICompletionResponse>;\n openaiCompletions(\n request: OpenAICompletionRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAICompletionChunk, void, undefined>>;\n openaiCompletions(\n request: OpenAICompletionRequest,\n ): Promise<OpenAICompletionResponse | AsyncGenerator<OpenAICompletionChunk, void, undefined>> {\n return this.runtime.invoke({\n operation: openaiCompletionsOp,\n body: request,\n });\n }\n\n openaiEmbeddings(request: OpenAIEmbeddingRequest): Promise<OpenAIEmbeddingResponse> {\n return this.runtime.invoke({\n operation: openaiEmbeddingsOp,\n body: request,\n });\n }\n\n openaiModels(options?: { signal?: AbortSignal }): Promise<OpenAIListModelsResponse> {\n return this.runtime.invoke({\n operation: openaiModelsOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n openaiModelsGetOne(model: string, options?: { signal?: AbortSignal }): Promise<OpenAIModelItem> {\n return this.runtime.invoke({\n operation: openaiModelsGetOneOp,\n body: undefined,\n pathParams: { model },\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n openaiResponses(\n request: OpenAIResponsesRequest & { stream?: false },\n ): Promise<OpenAIResponsesResponse>;\n openaiResponses(\n request: OpenAIResponsesRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAIResponsesStreamEvent, void, undefined>>;\n openaiResponses(\n request: OpenAIResponsesRequest,\n ): Promise<\n OpenAIResponsesResponse | AsyncGenerator<OpenAIResponsesStreamEvent, void, undefined>\n > {\n return this.runtime.invoke({\n operation: openaiResponsesOp,\n body: request,\n });\n }\n}\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\n// No model types referenced.\nimport type {\n AnthropicMessageStreamEvent,\n AnthropicMessagesRequest,\n AnthropicMessagesResponse,\n} from '../../integrations/index.js';\nimport { anthropicMessagesOp } from './operations.js';\n\n/**\n * Generated API surface for Ollama's anthropic domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class AnthropicApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n anthropicMessages(\n request: AnthropicMessagesRequest & { stream?: false },\n ): Promise<AnthropicMessagesResponse>;\n anthropicMessages(\n request: AnthropicMessagesRequest & { stream: true },\n ): Promise<AsyncGenerator<AnthropicMessageStreamEvent, void, undefined>>;\n anthropicMessages(\n request: AnthropicMessagesRequest,\n ): Promise<\n AnthropicMessagesResponse | AsyncGenerator<AnthropicMessageStreamEvent, void, undefined>\n > {\n return this.runtime.invoke({\n operation: anthropicMessagesOp,\n body: request,\n });\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/generated/api/operations.ts","../src/generated/api/native-api.ts","../src/generated/api/openai-api.ts","../src/generated/api/anthropic-api.ts"],"names":[],"mappings":";;;AASO,IAAM,SAAA,GAAY;AAAA,EACvB,WAAA,EAAa,SAAA;AAAA,EACb,MAAA,EAAQ,KAAA;AAAA,EACR,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AW,MAAA,GAAY,EAAE,MAAA,EAAQ,OAAA,CAAQ,MAAA,EAAO,GAAI;AAAC,KACnE,CAAA;AAAA,EACH;AAAA,EAQA,gBACE,OAAA,EAGA;AACA,IAAA,OAAO,IAAA,CAAK,QAAQ,MAAA,CAAO;AAAA,MACzB,SAAA,EAAW,iBAAA;AAAA,MACX,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AACF;;;AC5FO,IAAM,eAAN,MAAmB;AAAA,EACxB,YAA6B,OAAA,EAAwB;AAAxB,IAAA,IAAA,CAAA,OAAA,GAAA,OAAA;AAAA,EAAyB;AAAA,EAQtD,kBACE,OAAA,EAGA;AACA,IAAA,OAAO,IAAA,CAAK,QAAQ,MAAA,CAAO;AAAA,MACzB,SAAA,EAAW,mBAAA;AAAA,MACX,IAAA,EAAM;AAAA,KACP,CAAA;AAAA,EACH;AACF","file":"generated-api.cjs","sourcesContent":["/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each OperationDefinition captures what Ollama exposes; the runtime\n * in src/generated/runtime/runtime.ts captures how the SDK behaves.\n */\n\nimport type { OperationDefinition } from '../runtime/operation-definition.js';\n\nexport const balanceOp = {\n operationId: 'balance',\n method: 'GET',\n path: '/api/balance',\n response: { $ref: '#/schemas/BalanceResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Takes no parameters. For usage history see the usage operation.',\n 'Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.',\n 'Use OllamaClient.balance() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const blobsOp = {\n operationId: 'blobs',\n method: 'HEAD',\n path: '/api/blobs/{digest}',\n environment: { local: true, cloud: false },\n parameters: [{ name: 'digest', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'HEAD-only endpoint for blob existence checks; declared in OpenAPI but not in the legacy parity manifest.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const chatOp = {\n operationId: 'chat',\n method: 'POST',\n path: '/api/chat',\n request: { $ref: '#/schemas/ChatRequest' },\n response: { $ref: '#/schemas/ChatResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {\n thinking: 'model-dependent',\n tools: 'model-dependent',\n vision: 'model-dependent',\n structuredOutput: 'supported',\n logprobs: 'supported',\n },\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Use /api/show to discover model-specific thinking values and defaults.',\n 'Structured output (format field) is rejected by Ollama Cloud.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const copyOp = {\n operationId: 'copy',\n method: 'POST',\n path: '/api/copy',\n request: { $ref: '#/schemas/CopyRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const createOp = {\n operationId: 'create',\n method: 'POST',\n path: '/api/create',\n request: { $ref: '#/schemas/CreateRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: { thinking: 'unsupported', tools: 'unsupported' },\n status: { documented: true },\n domain: 'native',\n notes: ['Model creation is local-only; Ollama Cloud does not support it.'],\n} as const satisfies OperationDefinition;\n\nexport const createBlobOp = {\n operationId: 'createBlob',\n method: 'POST',\n path: '/api/blobs/{digest}',\n environment: { local: true, cloud: false },\n parameters: [{ name: 'digest', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'POST endpoint for blob creation; takes a binary body (application/octet-stream).',\n 'Handled by OllamaClient.createBlob() — the generated NativeApi does not expose this operation because the runtime JSON-encodes request bodies.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const deleteOp = {\n operationId: 'delete',\n method: 'DELETE',\n path: '/api/delete',\n request: { $ref: '#/schemas/DeleteRequest' },\n environment: { local: true, cloud: false },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const embedOp = {\n operationId: 'embed',\n method: 'POST',\n path: '/api/embed',\n request: { $ref: '#/schemas/EmbedRequest' },\n response: { $ref: '#/schemas/EmbedResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: { embeddings: 'supported' },\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const generateOp = {\n operationId: 'generate',\n method: 'POST',\n path: '/api/generate',\n request: { $ref: '#/schemas/GenerateRequest' },\n response: { $ref: '#/schemas/GenerateResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {\n thinking: 'model-dependent',\n vision: 'supported',\n structuredOutput: 'supported',\n logprobs: 'supported',\n },\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const psOp = {\n operationId: 'ps',\n method: 'GET',\n path: '/api/ps',\n response: { $ref: '#/schemas/PsResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const pullOp = {\n operationId: 'pull',\n method: 'POST',\n path: '/api/pull',\n request: { $ref: '#/schemas/PullRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const pushOp = {\n operationId: 'push',\n method: 'POST',\n path: '/api/push',\n request: { $ref: '#/schemas/PushRequest' },\n response: { $ref: '#/schemas/StatusResponse' },\n environment: { local: true, cloud: false },\n transport: { mode: 'ndjson', streaming: true, streamingDefault: true },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const showOp = {\n operationId: 'show',\n method: 'POST',\n path: '/api/show',\n request: { $ref: '#/schemas/ShowRequest' },\n response: { $ref: '#/schemas/ShowResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Capabilities source: /api/show is the runtime source of truth for model-dependent capability values (tools, vision, thinking, embeddings).',\n ],\n} as const satisfies OperationDefinition;\n\nexport const systemOneOp = {\n operationId: 'systemOne',\n method: 'POST',\n path: '/v1/systemone',\n request: { $ref: '#/schemas/SystemOneRequest' },\n response: { $ref: '#/schemas/SystemOneResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {\n thinking: 'unsupported',\n tools: 'unsupported',\n vision: 'model-dependent',\n structuredOutput: 'unsupported',\n logprobs: 'unsupported',\n embeddings: 'unsupported',\n },\n constraints: {\n minOllamaVersion: '0.35.0',\n maxRequestBytes: 65536,\n maxRequestBytesWithImages: 33554432,\n },\n status: { documented: true, experimental: true },\n domain: 'native',\n notes: [\n '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.',\n 'Local dual cap: text and schema (excluding images) within 64 KiB AND the whole request within 32 MiB, including base64 and JSON overhead.',\n \"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.\",\n '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.',\n 'No tools, no generation controls (temperature, top_p, etc.).',\n 'Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.',\n 'Experimental: behavioral surface may change between Ollama releases.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const tagsOp = {\n operationId: 'tags',\n method: 'GET',\n path: '/api/tags',\n response: { $ref: '#/schemas/ListResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const usageOp = {\n operationId: 'usage',\n method: 'GET',\n path: '/api/usage',\n response: { $ref: '#/schemas/UsageResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e — groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).',\n 'Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.',\n 'Use OllamaClient.usage() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const versionOp = {\n operationId: 'version',\n method: 'GET',\n path: '/api/version',\n response: { $ref: '#/schemas/VersionResponse' },\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n} as const satisfies OperationDefinition;\n\nexport const webFetchOp = {\n operationId: 'webFetch',\n method: 'POST',\n path: '/api/web_fetch',\n request: { $ref: '#/schemas/WebFetchRequest' },\n response: { $ref: '#/schemas/WebFetchResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Use OllamaClient.webFetch() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const webSearchOp = {\n operationId: 'webSearch',\n method: 'POST',\n path: '/api/web_search',\n request: { $ref: '#/schemas/WebSearchRequest' },\n response: { $ref: '#/schemas/WebSearchResponse' },\n environment: { local: false, cloud: true },\n host: 'https://ollama.com',\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'native',\n notes: [\n 'Cloud-only capability endpoint — targets https://ollama.com, not the local Ollama server.',\n 'Requires an Ollama Cloud API key (set via OllamaClient credentials).',\n 'Use OllamaClient.webSearch() — the generated NativeApi class does not expose this operation.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const openaiChatCompletionsOp = {\n operationId: 'openaiChatCompletions',\n method: 'POST',\n path: '/v1/chat/completions',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: {\n thinking: 'model-dependent',\n tools: 'model-dependent',\n vision: 'model-dependent',\n structuredOutput: 'supported',\n logprobs: 'unsupported',\n },\n status: { documented: true },\n domain: 'openai',\n notes: [\n 'Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const openaiCompletionsOp = {\n operationId: 'openaiCompletions',\n method: 'POST',\n path: '/v1/completions',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { logprobs: 'unsupported' },\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiEmbeddingsOp = {\n operationId: 'openaiEmbeddings',\n method: 'POST',\n path: '/v1/embeddings',\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: { embeddings: 'supported' },\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiModelsOp = {\n operationId: 'openaiModels',\n method: 'GET',\n path: '/v1/models',\n environment: { local: true, cloud: true },\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'openai',\n} as const satisfies OperationDefinition;\n\nexport const openaiModelsGetOneOp = {\n operationId: 'openaiModelsGetOne',\n method: 'GET',\n path: '/v1/models/{model}',\n environment: { local: true, cloud: true },\n parameters: [{ name: 'model', in: 'path', required: true, schema: { type: 'string' } }],\n transport: { mode: 'json', streaming: false },\n capabilities: {},\n status: { documented: true },\n domain: 'openai',\n notes: ['Returns metadata for a single OpenAI-compat model by id.'],\n} as const satisfies OperationDefinition;\n\nexport const openaiResponsesOp = {\n operationId: 'openaiResponses',\n method: 'POST',\n path: '/v1/responses',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { thinking: 'model-dependent', tools: 'model-dependent' },\n status: { documented: true },\n domain: 'openai',\n notes: [\n 'Ollama implements a subset of the OpenAI Responses API; previous_response_id and conversation are explicitly unsupported.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const anthropicMessagesOp = {\n operationId: 'anthropicMessages',\n method: 'POST',\n path: '/v1/messages',\n environment: { local: true, cloud: true },\n transport: { mode: 'sse', streaming: true, streamingDefault: false },\n capabilities: { thinking: 'model-dependent', tools: 'model-dependent' },\n status: { documented: true },\n domain: 'anthropic',\n notes: [\n \"tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.\",\n 'Nested cache_control fields under messages[].content[].cache_control are unsupported.',\n ],\n} as const satisfies OperationDefinition;\n\nexport const allOperations = [\n balanceOp,\n blobsOp,\n chatOp,\n copyOp,\n createOp,\n createBlobOp,\n deleteOp,\n embedOp,\n generateOp,\n psOp,\n pullOp,\n pushOp,\n showOp,\n systemOneOp,\n tagsOp,\n usageOp,\n versionOp,\n webFetchOp,\n webSearchOp,\n openaiChatCompletionsOp,\n openaiCompletionsOp,\n openaiEmbeddingsOp,\n openaiModelsOp,\n openaiModelsGetOneOp,\n openaiResponsesOp,\n anthropicMessagesOp,\n] as const;\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\nimport type {\n ChatRequest,\n ChatResponse,\n CopyRequest,\n CreateRequest,\n DeleteRequest,\n EmbedRequest,\n EmbedResponse,\n GenerateRequest,\n GenerateResponse,\n ListResponse,\n PsResponse,\n PullRequest,\n PushRequest,\n ShowRequest,\n ShowResponse,\n StatusResponse,\n SystemOneRequest,\n SystemOneResponse,\n VersionResponse,\n} from '../models/index.js';\nimport {\n blobsOp,\n chatOp,\n copyOp,\n createOp,\n deleteOp,\n embedOp,\n generateOp,\n psOp,\n pullOp,\n pushOp,\n showOp,\n systemOneOp,\n tagsOp,\n versionOp,\n} from './operations.js';\n\n/**\n * Generated API surface for Ollama's native domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class NativeApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n blobs(digest: string, options?: { signal?: AbortSignal }): Promise<unknown> {\n return this.runtime.invoke({\n operation: blobsOp,\n body: undefined,\n pathParams: { digest },\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n chat(request: ChatRequest & { stream?: false }): Promise<ChatResponse>;\n chat(\n request: ChatRequest & { stream: true },\n ): Promise<AsyncGenerator<ChatResponse, void, undefined>>;\n chat(\n request: ChatRequest,\n ): Promise<ChatResponse | AsyncGenerator<ChatResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: chatOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n copy(request: CopyRequest): Promise<StatusResponse> {\n return this.runtime.invoke({\n operation: copyOp,\n body: request,\n });\n }\n\n create(request: CreateRequest & { stream?: false }): Promise<StatusResponse>;\n create(\n request: CreateRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n create(\n request: CreateRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: createOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n delete(request: DeleteRequest): Promise<unknown> {\n return this.runtime.invoke({\n operation: deleteOp,\n body: request,\n });\n }\n\n embed(request: EmbedRequest): Promise<EmbedResponse> {\n return this.runtime.invoke({\n operation: embedOp,\n body: request,\n });\n }\n\n generate(request: GenerateRequest & { stream?: false }): Promise<GenerateResponse>;\n generate(\n request: GenerateRequest & { stream: true },\n ): Promise<AsyncGenerator<GenerateResponse, void, undefined>>;\n generate(\n request: GenerateRequest,\n ): Promise<GenerateResponse | AsyncGenerator<GenerateResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: generateOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n ps(options?: { signal?: AbortSignal }): Promise<PsResponse> {\n return this.runtime.invoke({\n operation: psOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n pull(request: PullRequest & { stream?: false }): Promise<StatusResponse>;\n pull(\n request: PullRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n pull(\n request: PullRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: pullOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n push(request: PushRequest & { stream?: false }): Promise<StatusResponse>;\n push(\n request: PushRequest & { stream: true },\n ): Promise<AsyncGenerator<StatusResponse, void, undefined>>;\n push(\n request: PushRequest,\n ): Promise<StatusResponse | AsyncGenerator<StatusResponse, void, undefined>> {\n return this.runtime.invoke({\n operation: pushOp,\n body: request,\n streamingDefault: true,\n });\n }\n\n show(request: ShowRequest): Promise<ShowResponse> {\n return this.runtime.invoke({\n operation: showOp,\n body: request,\n });\n }\n\n systemOne(request: SystemOneRequest): Promise<SystemOneResponse> {\n return this.runtime.invoke({\n operation: systemOneOp,\n body: request,\n });\n }\n\n tags(options?: { signal?: AbortSignal }): Promise<ListResponse> {\n return this.runtime.invoke({\n operation: tagsOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n version(options?: { signal?: AbortSignal }): Promise<VersionResponse> {\n return this.runtime.invoke({\n operation: versionOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n}\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\n// No model types referenced.\nimport type {\n OpenAIChatCompletionChunk,\n OpenAIChatCompletionRequest,\n OpenAIChatCompletionResponse,\n OpenAICompletionChunk,\n OpenAICompletionRequest,\n OpenAICompletionResponse,\n OpenAIEmbeddingRequest,\n OpenAIEmbeddingResponse,\n OpenAIListModelsResponse,\n OpenAIModelItem,\n OpenAIResponsesRequest,\n OpenAIResponsesResponse,\n OpenAIResponsesStreamEvent,\n} from '../../integrations/index.js';\nimport {\n openaiChatCompletionsOp,\n openaiCompletionsOp,\n openaiEmbeddingsOp,\n openaiModelsOp,\n openaiModelsGetOneOp,\n openaiResponsesOp,\n} from './operations.js';\n\n/**\n * Generated API surface for Ollama's openai domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class OpenAIApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest & { stream?: false },\n ): Promise<OpenAIChatCompletionResponse>;\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAIChatCompletionChunk, void, undefined>>;\n openaiChatCompletions(\n request: OpenAIChatCompletionRequest,\n ): Promise<\n OpenAIChatCompletionResponse | AsyncGenerator<OpenAIChatCompletionChunk, void, undefined>\n > {\n return this.runtime.invoke({\n operation: openaiChatCompletionsOp,\n body: request,\n });\n }\n\n openaiCompletions(\n request: OpenAICompletionRequest & { stream?: false },\n ): Promise<OpenAICompletionResponse>;\n openaiCompletions(\n request: OpenAICompletionRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAICompletionChunk, void, undefined>>;\n openaiCompletions(\n request: OpenAICompletionRequest,\n ): Promise<OpenAICompletionResponse | AsyncGenerator<OpenAICompletionChunk, void, undefined>> {\n return this.runtime.invoke({\n operation: openaiCompletionsOp,\n body: request,\n });\n }\n\n openaiEmbeddings(request: OpenAIEmbeddingRequest): Promise<OpenAIEmbeddingResponse> {\n return this.runtime.invoke({\n operation: openaiEmbeddingsOp,\n body: request,\n });\n }\n\n openaiModels(options?: { signal?: AbortSignal }): Promise<OpenAIListModelsResponse> {\n return this.runtime.invoke({\n operation: openaiModelsOp,\n body: undefined,\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n openaiModelsGetOne(model: string, options?: { signal?: AbortSignal }): Promise<OpenAIModelItem> {\n return this.runtime.invoke({\n operation: openaiModelsGetOneOp,\n body: undefined,\n pathParams: { model },\n ...(options?.signal !== undefined ? { signal: options.signal } : {}),\n });\n }\n\n openaiResponses(\n request: OpenAIResponsesRequest & { stream?: false },\n ): Promise<OpenAIResponsesResponse>;\n openaiResponses(\n request: OpenAIResponsesRequest & { stream: true },\n ): Promise<AsyncGenerator<OpenAIResponsesStreamEvent, void, undefined>>;\n openaiResponses(\n request: OpenAIResponsesRequest,\n ): Promise<\n OpenAIResponsesResponse | AsyncGenerator<OpenAIResponsesStreamEvent, void, undefined>\n > {\n return this.runtime.invoke({\n operation: openaiResponsesOp,\n body: request,\n });\n }\n}\n","/**\n * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.\n * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).\n * Each generated class delegates to OllamaRuntime — the runtime owns\n * transport, retry, streaming, telemetry, and error handling.\n */\n\nimport type { OllamaRuntime } from '../runtime/runtime.js';\n// No model types referenced.\nimport type {\n AnthropicMessageStreamEvent,\n AnthropicMessagesRequest,\n AnthropicMessagesResponse,\n} from '../../integrations/index.js';\nimport { anthropicMessagesOp } from './operations.js';\n\n/**\n * Generated API surface for Ollama's anthropic domain.\n * Each method delegates to {@link OllamaRuntime.invoke}.\n */\nexport class AnthropicApi {\n constructor(private readonly runtime: OllamaRuntime) {}\n\n anthropicMessages(\n request: AnthropicMessagesRequest & { stream?: false },\n ): Promise<AnthropicMessagesResponse>;\n anthropicMessages(\n request: AnthropicMessagesRequest & { stream: true },\n ): Promise<AsyncGenerator<AnthropicMessageStreamEvent, void, undefined>>;\n anthropicMessages(\n request: AnthropicMessagesRequest,\n ): Promise<\n AnthropicMessagesResponse | AsyncGenerator<AnthropicMessageStreamEvent, void, undefined>\n > {\n return this.runtime.invoke({\n operation: anthropicMessagesOp,\n body: request,\n });\n }\n}\n"]}
@@ -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-DIPnBwlf.cjs';
2
- export { N as NativeApi } from './anthropic-DIPnBwlf.cjs';
3
- import { O as OllamaRuntime } from './runtime-C28YEAHC.cjs';
4
- export { a as OperationDefinition } from './runtime-C28YEAHC.cjs';
5
- import './types-Y3u0FtdN.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-C2-qaxjI.cjs';
2
+ export { N as NativeApi } from './anthropic-C2-qaxjI.cjs';
3
+ import { O as OllamaRuntime } from './runtime-CpO3H6yy.cjs';
4
+ export { a as OperationDefinition } from './runtime-CpO3H6yy.cjs';
5
+ import './types-CnsZ24tm.cjs';
6
6
  import 'zod';
7
7
 
8
8
  /**
@@ -489,7 +489,7 @@ declare const usageOp: {
489
489
  readonly documented: true;
490
490
  };
491
491
  readonly domain: "native";
492
- readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
492
+ readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e — groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
493
493
  };
494
494
  declare const versionOp: {
495
495
  readonly operationId: "version";
@@ -1122,7 +1122,7 @@ declare const allOperations: readonly [{
1122
1122
  readonly documented: true;
1123
1123
  };
1124
1124
  readonly domain: "native";
1125
- readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
1125
+ readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e — groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
1126
1126
  }, {
1127
1127
  readonly operationId: "version";
1128
1128
  readonly method: "GET";
@@ -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-CAvwqIjx.js';
2
- export { N as NativeApi } from './anthropic-CAvwqIjx.js';
3
- import { O as OllamaRuntime } from './runtime-DYCxYGG-.js';
4
- export { a as OperationDefinition } from './runtime-DYCxYGG-.js';
5
- import './types-Y3u0FtdN.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-BFOC6eI7.js';
2
+ export { N as NativeApi } from './anthropic-BFOC6eI7.js';
3
+ import { O as OllamaRuntime } from './runtime-DPSrPwAa.js';
4
+ export { a as OperationDefinition } from './runtime-DPSrPwAa.js';
5
+ import './types-CnsZ24tm.js';
6
6
  import 'zod';
7
7
 
8
8
  /**
@@ -489,7 +489,7 @@ declare const usageOp: {
489
489
  readonly documented: true;
490
490
  };
491
491
  readonly domain: "native";
492
- readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
492
+ readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e — groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
493
493
  };
494
494
  declare const versionOp: {
495
495
  readonly operationId: "version";
@@ -1122,7 +1122,7 @@ declare const allOperations: readonly [{
1122
1122
  readonly documented: true;
1123
1123
  };
1124
1124
  readonly domain: "native";
1125
- readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
1125
+ readonly notes: readonly ["Cloud-only account endpoint — targets https://ollama.com, not the local Ollama server.", "Requires an Ollama Cloud API key (set via OllamaClient credentials).", "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e — groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).", "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.", "Use OllamaClient.usage() — the generated NativeApi class does not expose this operation."];
1126
1126
  }, {
1127
1127
  readonly operationId: "version";
1128
1128
  readonly method: "GET";
@@ -242,7 +242,7 @@ var usageOp = {
242
242
  notes: [
243
243
  "Cloud-only account endpoint \u2014 targets https://ollama.com, not the local Ollama server.",
244
244
  "Requires an Ollama Cloud API key (set via OllamaClient credentials).",
245
- "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin).",
245
+ "Query parameters (not modeled by the generated runtime): range = 24h | 7d | 30d (server default 7d), scope = self | team (server default self; team scope requires a team admin), group_by = model (2026-10-22 pin: upstream 2476d5e \u2014 groups totals into per-model UsageGroup entries, up to 10 ranked by usage_usd or request_count, with a remainder bucket for the rest).",
246
246
  "Rate limited to 10 requests/minute per user; 429 responses carry a Retry-After header.",
247
247
  "Use OllamaClient.usage() \u2014 the generated NativeApi class does not expose this operation."
248
248
  ]