@nemesis-oss/ollama-sdk 1.1.0 → 1.4.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 (58) hide show
  1. package/CHANGELOG.md +43 -92
  2. package/README.md +749 -11
  3. package/dist/compose-BR70yb4W.d.cts +164 -0
  4. package/dist/compose-DfAqKAFj.d.ts +164 -0
  5. package/dist/generated-api.cjs +454 -0
  6. package/dist/generated-api.cjs.map +1 -0
  7. package/dist/generated-api.d.cts +1651 -0
  8. package/dist/generated-api.d.ts +1651 -0
  9. package/dist/generated-api.js +428 -0
  10. package/dist/generated-api.js.map +1 -0
  11. package/dist/generated-models-schemas.cjs +328 -0
  12. package/dist/generated-models-schemas.cjs.map +1 -0
  13. package/dist/generated-models-schemas.d.cts +463 -0
  14. package/dist/generated-models-schemas.d.ts +463 -0
  15. package/dist/generated-models-schemas.js +291 -0
  16. package/dist/generated-models-schemas.js.map +1 -0
  17. package/dist/generated-runtime.cjs +145 -0
  18. package/dist/generated-runtime.cjs.map +1 -0
  19. package/dist/generated-runtime.d.cts +2 -0
  20. package/dist/generated-runtime.d.ts +2 -0
  21. package/dist/generated-runtime.js +143 -0
  22. package/dist/generated-runtime.js.map +1 -0
  23. package/dist/index-2RIErNT5.d.cts +583 -0
  24. package/dist/index-DIQ8NUbU.d.ts +583 -0
  25. package/dist/index.cjs +2308 -184
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +1123 -421
  28. package/dist/index.d.ts +1123 -421
  29. package/dist/index.js +2293 -185
  30. package/dist/index.js.map +1 -1
  31. package/dist/mcp/tools.json +1058 -0
  32. package/dist/mcp-generated.cjs +386 -0
  33. package/dist/mcp-generated.cjs.map +1 -0
  34. package/dist/mcp-generated.d.cts +35 -0
  35. package/dist/mcp-generated.d.ts +35 -0
  36. package/dist/mcp-generated.js +381 -0
  37. package/dist/mcp-generated.js.map +1 -0
  38. package/dist/mcp-http.cjs +100 -0
  39. package/dist/mcp-http.cjs.map +1 -0
  40. package/dist/mcp-http.d.cts +48 -0
  41. package/dist/mcp-http.d.ts +48 -0
  42. package/dist/mcp-http.js +96 -0
  43. package/dist/mcp-http.js.map +1 -0
  44. package/dist/mcp-stdio.cjs +49 -0
  45. package/dist/mcp-stdio.cjs.map +1 -0
  46. package/dist/mcp-stdio.d.cts +34 -0
  47. package/dist/mcp-stdio.d.ts +34 -0
  48. package/dist/mcp-stdio.js +47 -0
  49. package/dist/mcp-stdio.js.map +1 -0
  50. package/dist/skills.cjs.map +1 -1
  51. package/dist/skills.d.cts +3 -2
  52. package/dist/skills.d.ts +3 -2
  53. package/dist/skills.js.map +1 -1
  54. package/dist/types-B9_axjum.d.cts +66 -0
  55. package/dist/types-B9_axjum.d.ts +66 -0
  56. package/dist/{compose-DJjVpDrk.d.cts → types-BQhgW-du.d.cts} +118 -172
  57. package/dist/{compose-DJjVpDrk.d.ts → types-BQhgW-du.d.ts} +118 -172
  58. package/package.json +96 -5
@@ -0,0 +1,1651 @@
1
+ import { O as OllamaRuntime } from './index-2RIErNT5.cjs';
2
+ export { ac as OperationDefinition } from './index-2RIErNT5.cjs';
3
+ import './types-BQhgW-du.cjs';
4
+
5
+ /**
6
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
7
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
8
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
9
+ */
10
+
11
+ interface ChatMessage {
12
+ /** Author of the message. */
13
+ readonly role: 'system' | 'user' | 'assistant' | 'tool';
14
+ /** Message text content */
15
+ readonly content: string;
16
+ /** Optional list of inline images for multimodal models */
17
+ readonly images?: readonly string[] | undefined;
18
+ /** Tool call requests produced by the model */
19
+ readonly tool_calls?: readonly ToolCall[] | undefined;
20
+ }
21
+
22
+ /**
23
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
24
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
25
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
26
+ */
27
+
28
+ interface ChatRequest {
29
+ /** Model name */
30
+ readonly model: string;
31
+ /** Chat history as an array of message objects (each with a role and content) */
32
+ readonly messages: readonly ChatMessage[];
33
+ /** Optional list of function tools the model may call during the chat */
34
+ readonly tools?: readonly ToolDefinition[] | undefined;
35
+ /** Format to return a response in. Can be `json` or a JSON schema */
36
+ readonly format?: 'json' | Record<string, unknown> | undefined;
37
+ readonly options?: ModelOptions | undefined;
38
+ readonly stream?: boolean | undefined;
39
+ readonly think?: ThinkValue | undefined;
40
+ /** Model keep-alive duration (for example `5m` or `0` to unload immediately) */
41
+ readonly keep_alive?: string | number | undefined;
42
+ /** Whether to return log probabilities of the output tokens */
43
+ readonly logprobs?: boolean | undefined;
44
+ /** Number of most likely tokens to return at each token position when logprobs are enabled */
45
+ readonly top_logprobs?: number | undefined;
46
+ }
47
+
48
+ /**
49
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
50
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
51
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
52
+ */
53
+
54
+ interface ChatResponse {
55
+ /** Model name used to generate this message */
56
+ readonly model?: string | undefined;
57
+ /** Timestamp of response creation (ISO 8601) */
58
+ readonly created_at?: string | undefined;
59
+ readonly message?: {
60
+ /** Always `assistant` for model responses */
61
+ readonly role?: 'assistant' | undefined;
62
+ /** Assistant message text */
63
+ readonly content?: string | undefined;
64
+ /** Optional deliberate thinking trace when `think` is enabled */
65
+ readonly thinking?: string | undefined;
66
+ /** Tool calls requested by the assistant */
67
+ readonly tool_calls?: readonly ToolCall[] | undefined;
68
+ /** Optional base64-encoded images in the response */
69
+ readonly images?: readonly string[] | undefined;
70
+ } | undefined;
71
+ /** Indicates whether the chat response has finished */
72
+ readonly done?: boolean | undefined;
73
+ /** Reason the response finished */
74
+ readonly done_reason?: string | undefined;
75
+ /** Total time spent generating in nanoseconds */
76
+ readonly total_duration?: number | undefined;
77
+ /** Time spent loading the model in nanoseconds */
78
+ readonly load_duration?: number | undefined;
79
+ /** Number of tokens in the prompt */
80
+ readonly prompt_eval_count?: number | undefined;
81
+ /** Number of prompt tokens read from the cache */
82
+ readonly prompt_eval_cached_count?: number | undefined;
83
+ /** Time spent evaluating uncached prompt tokens in nanoseconds */
84
+ readonly prompt_eval_duration?: number | undefined;
85
+ /** Number of tokens generated in the response */
86
+ readonly eval_count?: number | undefined;
87
+ /** Time spent generating tokens in nanoseconds */
88
+ readonly eval_duration?: number | undefined;
89
+ /** Log probability information for the generated tokens when logprobs are enabled */
90
+ readonly logprobs?: readonly Logprob[] | undefined;
91
+ }
92
+
93
+ /**
94
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
95
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
96
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
97
+ */
98
+ interface CopyRequest {
99
+ /** Existing model name to copy from */
100
+ readonly source: string;
101
+ /** New model name to create */
102
+ readonly destination: string;
103
+ }
104
+
105
+ /**
106
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
107
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
108
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
109
+ */
110
+
111
+ interface CreateRequest {
112
+ /** Name for the model to create */
113
+ readonly model: string;
114
+ /** Existing model to create from */
115
+ readonly from?: string | undefined;
116
+ /** Prompt template to use for the model */
117
+ readonly template?: string | undefined;
118
+ /** Name of the renderer for the model */
119
+ readonly renderer?: string | undefined;
120
+ /** Name of the parser for the model */
121
+ readonly parser?: string | undefined;
122
+ /** Source file names mapped to their SHA-256 digests. Split GGUF models must include each shard under its original split filename. */
123
+ readonly files?: {
124
+ [key: string]: string;
125
+ } | undefined;
126
+ /** Draft source file names mapped to their SHA-256 digests */
127
+ readonly draft_files?: {
128
+ [key: string]: string;
129
+ } | undefined;
130
+ /** License string or list of licenses for the model */
131
+ readonly license?: string | string[] | undefined;
132
+ /** System prompt to embed in the model */
133
+ readonly system?: string | undefined;
134
+ /** Key-value parameters for the model */
135
+ readonly parameters?: Record<string, unknown> | undefined;
136
+ /** Message history to use for the model */
137
+ readonly messages?: readonly ChatMessage[] | undefined;
138
+ /** Quantization level to apply during import (e.g. `nvfp4`) */
139
+ readonly quantize?: string | undefined;
140
+ /** Quantization level to apply to draft weights during import */
141
+ readonly draft_quantize?: string | undefined;
142
+ /** Minimum Ollama version required by the model */
143
+ readonly requires?: string | undefined;
144
+ /** Stream status updates */
145
+ readonly stream?: boolean | undefined;
146
+ }
147
+
148
+ /**
149
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
150
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
151
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
152
+ */
153
+ interface DeleteRequest {
154
+ /** Model name to delete */
155
+ readonly model: string;
156
+ }
157
+
158
+ /**
159
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
160
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
161
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
162
+ */
163
+
164
+ interface EmbedRequest {
165
+ /** Model name */
166
+ readonly model: string;
167
+ /** Text or array of texts to generate embeddings for */
168
+ readonly input: string | string[];
169
+ /** If true, truncate inputs that exceed the context window. If false, returns an error. */
170
+ readonly truncate?: boolean | undefined;
171
+ /** Number of dimensions to generate embeddings for */
172
+ readonly dimensions?: number | undefined;
173
+ /** Model keep-alive duration */
174
+ readonly keep_alive?: string | undefined;
175
+ readonly options?: ModelOptions | undefined;
176
+ }
177
+
178
+ /**
179
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
180
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
181
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
182
+ */
183
+ interface EmbedResponse {
184
+ /** Model that produced the embeddings */
185
+ readonly model?: string | undefined;
186
+ /** Array of vector embeddings */
187
+ readonly embeddings?: readonly number[][] | undefined;
188
+ /** Total time spent generating in nanoseconds */
189
+ readonly total_duration?: number | undefined;
190
+ /** Load time in nanoseconds */
191
+ readonly load_duration?: number | undefined;
192
+ /** Number of input tokens processed to generate embeddings */
193
+ readonly prompt_eval_count?: number | undefined;
194
+ }
195
+
196
+ /**
197
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
198
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
199
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
200
+ */
201
+
202
+ interface GenerateRequest {
203
+ /** Model name */
204
+ readonly model: string;
205
+ /** Text for the model to generate a response from */
206
+ readonly prompt?: string | undefined;
207
+ /** Used for fill-in-the-middle models, text that appears after the user prompt and before the model response */
208
+ readonly suffix?: string | undefined;
209
+ readonly images?: readonly string[] | undefined;
210
+ /** Structured output format for the model to generate a response from. Supports either the string `"json"` or a JSON schema object. */
211
+ readonly format?: string | Record<string, unknown> | undefined;
212
+ /** System prompt for the model to generate a response from */
213
+ readonly system?: string | undefined;
214
+ /** When true, returns a stream of partial responses */
215
+ readonly stream?: boolean | undefined;
216
+ readonly think?: ThinkValue | undefined;
217
+ /** When true, returns the raw response from the model without any prompt templating */
218
+ readonly raw?: boolean | undefined;
219
+ /** Model keep-alive duration (for example `5m` or `0` to unload immediately) */
220
+ readonly keep_alive?: string | number | undefined;
221
+ readonly options?: ModelOptions | undefined;
222
+ /** Whether to return log probabilities of the output tokens */
223
+ readonly logprobs?: boolean | undefined;
224
+ /** Number of most likely tokens to return at each token position when logprobs are enabled */
225
+ readonly top_logprobs?: number | undefined;
226
+ }
227
+
228
+ /**
229
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
230
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
231
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
232
+ */
233
+
234
+ interface GenerateResponse {
235
+ /** Model name */
236
+ readonly model?: string | undefined;
237
+ /** ISO 8601 timestamp of response creation */
238
+ readonly created_at?: string | undefined;
239
+ /** The model's generated text response */
240
+ readonly response?: string | undefined;
241
+ /** The model's generated thinking output */
242
+ readonly thinking?: string | undefined;
243
+ /** Indicates whether generation has finished */
244
+ readonly done?: boolean | undefined;
245
+ /** Reason the generation stopped */
246
+ readonly done_reason?: string | undefined;
247
+ /** Time spent generating the response in nanoseconds */
248
+ readonly total_duration?: number | undefined;
249
+ /** Time spent loading the model in nanoseconds */
250
+ readonly load_duration?: number | undefined;
251
+ /** Number of input tokens in the prompt */
252
+ readonly prompt_eval_count?: number | undefined;
253
+ /** Number of prompt tokens read from the cache */
254
+ readonly prompt_eval_cached_count?: number | undefined;
255
+ /** Time spent evaluating uncached prompt tokens in nanoseconds */
256
+ readonly prompt_eval_duration?: number | undefined;
257
+ /** Number of output tokens generated in the response */
258
+ readonly eval_count?: number | undefined;
259
+ /** Time spent generating tokens in nanoseconds */
260
+ readonly eval_duration?: number | undefined;
261
+ /** Log probability information for the generated tokens when logprobs are enabled */
262
+ readonly logprobs?: readonly Logprob[] | undefined;
263
+ }
264
+
265
+ /**
266
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
267
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
268
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
269
+ */
270
+
271
+ interface ListResponse {
272
+ readonly models?: readonly ModelSummary[] | undefined;
273
+ }
274
+
275
+ /**
276
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
277
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
278
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
279
+ */
280
+
281
+ /** Log probability information for a generated token */
282
+ interface Logprob {
283
+ /** The text representation of the token */
284
+ readonly token?: string | undefined;
285
+ /** The log probability of this token */
286
+ readonly logprob?: number | undefined;
287
+ /** The raw byte representation of the token */
288
+ readonly bytes?: readonly number[] | undefined;
289
+ /** Most likely tokens and their log probabilities at this position */
290
+ readonly top_logprobs?: readonly TokenLogprob[] | undefined;
291
+ }
292
+
293
+ /**
294
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
295
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
296
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
297
+ */
298
+ /** Runtime options that control text generation */
299
+ interface ModelOptions {
300
+ /** Random seed used for reproducible outputs */
301
+ readonly seed?: number | undefined;
302
+ /** Controls randomness in generation (higher = more random) */
303
+ readonly temperature?: number | undefined;
304
+ /** Limits next token selection to the K most likely */
305
+ readonly top_k?: number | undefined;
306
+ /** Cumulative probability threshold for nucleus sampling */
307
+ readonly top_p?: number | undefined;
308
+ /** Minimum probability threshold for token selection */
309
+ readonly min_p?: number | undefined;
310
+ /** Stop sequences that will halt generation */
311
+ readonly stop?: string | string[] | undefined;
312
+ /** Context length size (number of tokens) */
313
+ readonly num_ctx?: number | undefined;
314
+ /** Maximum number of tokens to generate */
315
+ readonly num_predict?: number | undefined;
316
+ [key: string]: unknown;
317
+ }
318
+
319
+ /**
320
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
321
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
322
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
323
+ */
324
+ /** Summary information for a locally available model */
325
+ interface ModelSummary {
326
+ /** Model name */
327
+ readonly name?: string | undefined;
328
+ /** Model name */
329
+ readonly model?: string | undefined;
330
+ /** Name of the upstream model, if the model is remote */
331
+ readonly remote_model?: string | undefined;
332
+ /** URL of the upstream Ollama host, if the model is remote */
333
+ readonly remote_host?: string | undefined;
334
+ /** Last modified timestamp in ISO 8601 format */
335
+ readonly modified_at?: string | undefined;
336
+ /** Total size of the model on disk in bytes */
337
+ readonly size?: number | undefined;
338
+ /** SHA256 digest identifier of the model contents */
339
+ readonly digest?: string | undefined;
340
+ /** Additional information about the model's format and family */
341
+ readonly details?: {
342
+ /** Model file format (for example `gguf`) */
343
+ readonly format?: string | undefined;
344
+ /** Primary model family (for example `llama`) */
345
+ readonly family?: string | undefined;
346
+ /** All families the model belongs to, when applicable */
347
+ readonly families?: readonly string[] | undefined;
348
+ /** Approximate parameter count label (for example `7B`, `13B`) */
349
+ readonly parameter_size?: string | undefined;
350
+ /** Quantization level used (for example `Q4_0`) */
351
+ readonly quantization_level?: string | undefined;
352
+ } | undefined;
353
+ }
354
+
355
+ /**
356
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
357
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
358
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
359
+ */
360
+ interface Ps {
361
+ /** Name of the running model */
362
+ readonly name?: string | undefined;
363
+ /** Name of the running model */
364
+ readonly model?: string | undefined;
365
+ /** Size of the model in bytes */
366
+ readonly size?: number | undefined;
367
+ /** SHA256 digest of the model */
368
+ readonly digest?: string | undefined;
369
+ /** Model details such as format and family */
370
+ readonly details?: Record<string, unknown> | undefined;
371
+ /** Time when the model will be unloaded */
372
+ readonly expires_at?: string | undefined;
373
+ /** VRAM usage in bytes */
374
+ readonly size_vram?: number | undefined;
375
+ /** Context length for the running model */
376
+ readonly context_length?: number | undefined;
377
+ }
378
+
379
+ /**
380
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
381
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
382
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
383
+ */
384
+
385
+ interface PsResponse {
386
+ /** Currently running models */
387
+ readonly models?: readonly Ps[] | undefined;
388
+ }
389
+
390
+ /**
391
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
392
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
393
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
394
+ */
395
+ interface PullRequest {
396
+ /** Name of the model to download */
397
+ readonly model: string;
398
+ /** Allow downloading over insecure connections */
399
+ readonly insecure?: boolean | undefined;
400
+ /** Stream progress updates */
401
+ readonly stream?: boolean | undefined;
402
+ }
403
+
404
+ /**
405
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
406
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
407
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
408
+ */
409
+ interface PushRequest {
410
+ /** Name of the model to publish */
411
+ readonly model: string;
412
+ /** Allow publishing over insecure connections */
413
+ readonly insecure?: boolean | undefined;
414
+ /** Stream progress updates */
415
+ readonly stream?: boolean | undefined;
416
+ }
417
+
418
+ /**
419
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
420
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
421
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
422
+ */
423
+ interface ShowRequest {
424
+ /** Model name to show */
425
+ readonly model: string;
426
+ /** If true, includes large verbose fields in the response. */
427
+ readonly verbose?: boolean | undefined;
428
+ }
429
+
430
+ /**
431
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
432
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
433
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
434
+ */
435
+
436
+ interface ShowResponse {
437
+ readonly thinking?: Thinking | undefined;
438
+ /** Model parameter settings serialized as text */
439
+ readonly parameters?: string | undefined;
440
+ /** The license of the model */
441
+ readonly license?: string | undefined;
442
+ /** Last modified timestamp in ISO 8601 format */
443
+ readonly modified_at?: string | undefined;
444
+ /** High-level model details */
445
+ readonly details?: Record<string, unknown> | undefined;
446
+ /** The template used by the model to render prompts */
447
+ readonly template?: string | undefined;
448
+ /** List of supported features */
449
+ readonly capabilities?: readonly string[] | undefined;
450
+ /** Additional model metadata */
451
+ readonly model_info?: Record<string, unknown> | undefined;
452
+ }
453
+
454
+ /**
455
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
456
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
457
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
458
+ */
459
+ interface StatusResponse {
460
+ /** Current status message */
461
+ readonly status?: string | undefined;
462
+ }
463
+
464
+ /**
465
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
466
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
467
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
468
+ */
469
+ /** Controls a model's thinking output. Use `/api/show` to discover the supported values and default for the selected model. `true` requests thinking, `false` requests no thinking output, and `null` uses the model default. String values are model-defined; supported names must match `/api/show` exactly. Numbers are not supported. */
470
+ type ThinkValue = boolean | string | null;
471
+
472
+ /**
473
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
474
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
475
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
476
+ */
477
+ /** Thinking controls advertised by a model. Models without thinking metadata omit this field. */
478
+ interface Thinking {
479
+ /** Values explicitly supported by the model's `think` request field. Booleans represent on/off controls and strings represent model-defined levels. An array containing only `false` identifies a model without thinking support. */
480
+ readonly values: readonly (boolean | string)[];
481
+ /** Value used when `think` is not set. For models that use this metadata for named thinking levels, unsupported names resolve to this default. */
482
+ readonly default: boolean | string;
483
+ }
484
+
485
+ /**
486
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
487
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
488
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
489
+ */
490
+ /** Log probability information for a single token alternative */
491
+ interface TokenLogprob {
492
+ /** The text representation of the token */
493
+ readonly token?: string | undefined;
494
+ /** The log probability of this token */
495
+ readonly logprob?: number | undefined;
496
+ /** The raw byte representation of the token */
497
+ readonly bytes?: readonly number[] | undefined;
498
+ }
499
+
500
+ /**
501
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
502
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
503
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
504
+ */
505
+ interface ToolCall {
506
+ readonly function?: {
507
+ /** Name of the function to call */
508
+ readonly name: string;
509
+ /** What the function does */
510
+ readonly description?: string | undefined;
511
+ /** JSON object of arguments to pass to the function */
512
+ readonly arguments?: Record<string, unknown> | undefined;
513
+ } | undefined;
514
+ }
515
+
516
+ /**
517
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
518
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
519
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
520
+ */
521
+ interface ToolDefinition {
522
+ /** Type of tool (always `function`) */
523
+ readonly type: 'function';
524
+ readonly function: {
525
+ /** Function name exposed to the model */
526
+ readonly name: string;
527
+ /** Human-readable description of the function */
528
+ readonly description?: string | undefined;
529
+ /** JSON Schema for the function parameters */
530
+ readonly parameters: Record<string, unknown>;
531
+ };
532
+ }
533
+
534
+ /**
535
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
536
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
537
+ * See ADR 0013 and ADR 0014 for the contract-first architecture.
538
+ */
539
+ interface VersionResponse {
540
+ /** Version of Ollama */
541
+ readonly version?: string | undefined;
542
+ }
543
+
544
+ /**
545
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
546
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
547
+ * Each generated class delegates to OllamaRuntime — the runtime owns
548
+ * transport, retry, streaming, telemetry, and error handling.
549
+ */
550
+
551
+ /**
552
+ * Generated API surface for Ollama's native domain.
553
+ * Each method delegates to {@link OllamaRuntime.invoke}.
554
+ */
555
+ declare class NativeApi {
556
+ private readonly runtime;
557
+ constructor(runtime: OllamaRuntime);
558
+ blobs(options?: {
559
+ signal?: AbortSignal;
560
+ }): Promise<unknown>;
561
+ chat(request: ChatRequest & {
562
+ stream?: false;
563
+ }): Promise<ChatResponse>;
564
+ chat(request: ChatRequest & {
565
+ stream: true;
566
+ }): Promise<AsyncGenerator<ChatResponse, void, undefined>>;
567
+ copy(request: CopyRequest): Promise<unknown>;
568
+ create(request: CreateRequest & {
569
+ stream?: false;
570
+ }): Promise<StatusResponse>;
571
+ create(request: CreateRequest & {
572
+ stream: true;
573
+ }): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
574
+ delete(request: DeleteRequest): Promise<unknown>;
575
+ embed(request: EmbedRequest): Promise<EmbedResponse>;
576
+ generate(request: GenerateRequest & {
577
+ stream?: false;
578
+ }): Promise<GenerateResponse>;
579
+ generate(request: GenerateRequest & {
580
+ stream: true;
581
+ }): Promise<AsyncGenerator<GenerateResponse, void, undefined>>;
582
+ ps(options?: {
583
+ signal?: AbortSignal;
584
+ }): Promise<PsResponse>;
585
+ pull(request: PullRequest & {
586
+ stream?: false;
587
+ }): Promise<StatusResponse>;
588
+ pull(request: PullRequest & {
589
+ stream: true;
590
+ }): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
591
+ push(request: PushRequest & {
592
+ stream?: false;
593
+ }): Promise<StatusResponse>;
594
+ push(request: PushRequest & {
595
+ stream: true;
596
+ }): Promise<AsyncGenerator<StatusResponse, void, undefined>>;
597
+ show(request: ShowRequest): Promise<ShowResponse>;
598
+ systemOne(request: Record<string, unknown>): Promise<unknown>;
599
+ tags(options?: {
600
+ signal?: AbortSignal;
601
+ }): Promise<ListResponse>;
602
+ version(options?: {
603
+ signal?: AbortSignal;
604
+ }): Promise<VersionResponse>;
605
+ }
606
+
607
+ /**
608
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
609
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
610
+ * Each generated class delegates to OllamaRuntime — the runtime owns
611
+ * transport, retry, streaming, telemetry, and error handling.
612
+ */
613
+
614
+ /**
615
+ * Generated API surface for Ollama's openai domain.
616
+ * Each method delegates to {@link OllamaRuntime.invoke}.
617
+ */
618
+ declare class OpenAIApi {
619
+ private readonly runtime;
620
+ constructor(runtime: OllamaRuntime);
621
+ openaiChatCompletions(request: Record<string, unknown> & {
622
+ stream?: false;
623
+ }): Promise<unknown>;
624
+ openaiChatCompletions(request: Record<string, unknown> & {
625
+ stream: true;
626
+ }): Promise<AsyncGenerator<unknown, void, undefined>>;
627
+ openaiCompletions(request: Record<string, unknown> & {
628
+ stream?: false;
629
+ }): Promise<unknown>;
630
+ openaiCompletions(request: Record<string, unknown> & {
631
+ stream: true;
632
+ }): Promise<AsyncGenerator<unknown, void, undefined>>;
633
+ openaiEmbeddings(request: Record<string, unknown>): Promise<unknown>;
634
+ openaiModels(options?: {
635
+ signal?: AbortSignal;
636
+ }): Promise<unknown>;
637
+ openaiModelsGetOne(options?: {
638
+ signal?: AbortSignal;
639
+ }): Promise<unknown>;
640
+ openaiResponses(request: Record<string, unknown> & {
641
+ stream?: false;
642
+ }): Promise<unknown>;
643
+ openaiResponses(request: Record<string, unknown> & {
644
+ stream: true;
645
+ }): Promise<AsyncGenerator<unknown, void, undefined>>;
646
+ }
647
+
648
+ /**
649
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
650
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
651
+ * Each generated class delegates to OllamaRuntime — the runtime owns
652
+ * transport, retry, streaming, telemetry, and error handling.
653
+ */
654
+
655
+ /**
656
+ * Generated API surface for Ollama's anthropic domain.
657
+ * Each method delegates to {@link OllamaRuntime.invoke}.
658
+ */
659
+ declare class AnthropicApi {
660
+ private readonly runtime;
661
+ constructor(runtime: OllamaRuntime);
662
+ anthropicMessages(request: Record<string, unknown> & {
663
+ stream?: false;
664
+ }): Promise<unknown>;
665
+ anthropicMessages(request: Record<string, unknown> & {
666
+ stream: true;
667
+ }): Promise<AsyncGenerator<unknown, void, undefined>>;
668
+ }
669
+
670
+ /**
671
+ * AUTO-GENERATED by `npm run contract:generate`. DO NOT EDIT.
672
+ * Source: contracts/ir/ollama.ir.json (canonical Ollama IR).
673
+ * Each OperationDefinition captures what Ollama exposes; the runtime
674
+ * in src/generated/runtime/runtime.ts captures how the SDK behaves.
675
+ */
676
+ declare const blobsOp: {
677
+ readonly operationId: "blobs";
678
+ readonly method: "HEAD";
679
+ readonly path: "/api/blobs/{digest}";
680
+ readonly environment: {
681
+ readonly local: true;
682
+ readonly cloud: false;
683
+ };
684
+ readonly transport: {
685
+ readonly mode: "json";
686
+ readonly streaming: false;
687
+ };
688
+ readonly capabilities: {};
689
+ readonly status: {
690
+ readonly documented: true;
691
+ };
692
+ readonly domain: "native";
693
+ readonly notes: readonly ["HEAD-only endpoint for blob existence checks; declared in OpenAPI but not in the legacy parity manifest."];
694
+ };
695
+ declare const chatOp: {
696
+ readonly operationId: "chat";
697
+ readonly method: "POST";
698
+ readonly path: "/api/chat";
699
+ readonly request: {
700
+ readonly $ref: "#/schemas/ChatRequest";
701
+ };
702
+ readonly response: {
703
+ readonly $ref: "#/schemas/ChatResponse";
704
+ };
705
+ readonly environment: {
706
+ readonly local: true;
707
+ readonly cloud: true;
708
+ };
709
+ readonly transport: {
710
+ readonly mode: "ndjson";
711
+ readonly streaming: true;
712
+ readonly streamingDefault: true;
713
+ };
714
+ readonly capabilities: {
715
+ readonly thinking: "model-dependent";
716
+ readonly tools: "model-dependent";
717
+ readonly vision: "model-dependent";
718
+ readonly structuredOutput: "supported";
719
+ readonly logprobs: "supported";
720
+ };
721
+ readonly status: {
722
+ readonly documented: true;
723
+ };
724
+ readonly domain: "native";
725
+ readonly notes: readonly ["Use /api/show to discover model-specific thinking values and defaults.", "Structured output (format field) is rejected by Ollama Cloud."];
726
+ };
727
+ declare const copyOp: {
728
+ readonly operationId: "copy";
729
+ readonly method: "POST";
730
+ readonly path: "/api/copy";
731
+ readonly request: {
732
+ readonly $ref: "#/schemas/CopyRequest";
733
+ };
734
+ readonly environment: {
735
+ readonly local: true;
736
+ readonly cloud: false;
737
+ };
738
+ readonly transport: {
739
+ readonly mode: "json";
740
+ readonly streaming: false;
741
+ };
742
+ readonly capabilities: {};
743
+ readonly status: {
744
+ readonly documented: true;
745
+ };
746
+ readonly domain: "native";
747
+ };
748
+ declare const createOp: {
749
+ readonly operationId: "create";
750
+ readonly method: "POST";
751
+ readonly path: "/api/create";
752
+ readonly request: {
753
+ readonly $ref: "#/schemas/CreateRequest";
754
+ };
755
+ readonly response: {
756
+ readonly $ref: "#/schemas/StatusResponse";
757
+ };
758
+ readonly environment: {
759
+ readonly local: true;
760
+ readonly cloud: false;
761
+ };
762
+ readonly transport: {
763
+ readonly mode: "ndjson";
764
+ readonly streaming: true;
765
+ readonly streamingDefault: true;
766
+ };
767
+ readonly capabilities: {
768
+ readonly thinking: "unsupported";
769
+ readonly tools: "unsupported";
770
+ };
771
+ readonly status: {
772
+ readonly documented: true;
773
+ };
774
+ readonly domain: "native";
775
+ readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
776
+ };
777
+ declare const deleteOp: {
778
+ readonly operationId: "delete";
779
+ readonly method: "DELETE";
780
+ readonly path: "/api/delete";
781
+ readonly request: {
782
+ readonly $ref: "#/schemas/DeleteRequest";
783
+ };
784
+ readonly environment: {
785
+ readonly local: true;
786
+ readonly cloud: false;
787
+ };
788
+ readonly transport: {
789
+ readonly mode: "json";
790
+ readonly streaming: false;
791
+ };
792
+ readonly capabilities: {};
793
+ readonly status: {
794
+ readonly documented: true;
795
+ };
796
+ readonly domain: "native";
797
+ };
798
+ declare const embedOp: {
799
+ readonly operationId: "embed";
800
+ readonly method: "POST";
801
+ readonly path: "/api/embed";
802
+ readonly request: {
803
+ readonly $ref: "#/schemas/EmbedRequest";
804
+ };
805
+ readonly response: {
806
+ readonly $ref: "#/schemas/EmbedResponse";
807
+ };
808
+ readonly environment: {
809
+ readonly local: true;
810
+ readonly cloud: true;
811
+ };
812
+ readonly transport: {
813
+ readonly mode: "json";
814
+ readonly streaming: false;
815
+ };
816
+ readonly capabilities: {
817
+ readonly embeddings: "supported";
818
+ };
819
+ readonly status: {
820
+ readonly documented: true;
821
+ };
822
+ readonly domain: "native";
823
+ };
824
+ declare const generateOp: {
825
+ readonly operationId: "generate";
826
+ readonly method: "POST";
827
+ readonly path: "/api/generate";
828
+ readonly request: {
829
+ readonly $ref: "#/schemas/GenerateRequest";
830
+ };
831
+ readonly response: {
832
+ readonly $ref: "#/schemas/GenerateResponse";
833
+ };
834
+ readonly environment: {
835
+ readonly local: true;
836
+ readonly cloud: true;
837
+ };
838
+ readonly transport: {
839
+ readonly mode: "ndjson";
840
+ readonly streaming: true;
841
+ readonly streamingDefault: true;
842
+ };
843
+ readonly capabilities: {
844
+ readonly thinking: "model-dependent";
845
+ readonly vision: "supported";
846
+ readonly structuredOutput: "supported";
847
+ readonly logprobs: "supported";
848
+ };
849
+ readonly status: {
850
+ readonly documented: true;
851
+ };
852
+ readonly domain: "native";
853
+ };
854
+ declare const psOp: {
855
+ readonly operationId: "ps";
856
+ readonly method: "GET";
857
+ readonly path: "/api/ps";
858
+ readonly response: {
859
+ readonly $ref: "#/schemas/PsResponse";
860
+ };
861
+ readonly environment: {
862
+ readonly local: true;
863
+ readonly cloud: true;
864
+ };
865
+ readonly transport: {
866
+ readonly mode: "json";
867
+ readonly streaming: false;
868
+ };
869
+ readonly capabilities: {};
870
+ readonly status: {
871
+ readonly documented: true;
872
+ };
873
+ readonly domain: "native";
874
+ };
875
+ declare const pullOp: {
876
+ readonly operationId: "pull";
877
+ readonly method: "POST";
878
+ readonly path: "/api/pull";
879
+ readonly request: {
880
+ readonly $ref: "#/schemas/PullRequest";
881
+ };
882
+ readonly response: {
883
+ readonly $ref: "#/schemas/StatusResponse";
884
+ };
885
+ readonly environment: {
886
+ readonly local: true;
887
+ readonly cloud: false;
888
+ };
889
+ readonly transport: {
890
+ readonly mode: "ndjson";
891
+ readonly streaming: true;
892
+ readonly streamingDefault: true;
893
+ };
894
+ readonly capabilities: {};
895
+ readonly status: {
896
+ readonly documented: true;
897
+ };
898
+ readonly domain: "native";
899
+ };
900
+ declare const pushOp: {
901
+ readonly operationId: "push";
902
+ readonly method: "POST";
903
+ readonly path: "/api/push";
904
+ readonly request: {
905
+ readonly $ref: "#/schemas/PushRequest";
906
+ };
907
+ readonly response: {
908
+ readonly $ref: "#/schemas/StatusResponse";
909
+ };
910
+ readonly environment: {
911
+ readonly local: true;
912
+ readonly cloud: false;
913
+ };
914
+ readonly transport: {
915
+ readonly mode: "ndjson";
916
+ readonly streaming: true;
917
+ readonly streamingDefault: true;
918
+ };
919
+ readonly capabilities: {};
920
+ readonly status: {
921
+ readonly documented: true;
922
+ };
923
+ readonly domain: "native";
924
+ };
925
+ declare const showOp: {
926
+ readonly operationId: "show";
927
+ readonly method: "POST";
928
+ readonly path: "/api/show";
929
+ readonly request: {
930
+ readonly $ref: "#/schemas/ShowRequest";
931
+ };
932
+ readonly response: {
933
+ readonly $ref: "#/schemas/ShowResponse";
934
+ };
935
+ readonly environment: {
936
+ readonly local: true;
937
+ readonly cloud: true;
938
+ };
939
+ readonly transport: {
940
+ readonly mode: "json";
941
+ readonly streaming: false;
942
+ };
943
+ readonly capabilities: {};
944
+ readonly status: {
945
+ readonly documented: true;
946
+ };
947
+ readonly domain: "native";
948
+ readonly notes: readonly ["Capabilities source: /api/show is the runtime source of truth for model-dependent capability values (tools, vision, thinking, embeddings)."];
949
+ };
950
+ declare const systemOneOp: {
951
+ readonly operationId: "systemOne";
952
+ readonly method: "POST";
953
+ readonly path: "/v1/systemone";
954
+ readonly environment: {
955
+ readonly local: true;
956
+ readonly cloud: false;
957
+ };
958
+ readonly transport: {
959
+ readonly mode: "json";
960
+ readonly streaming: false;
961
+ };
962
+ readonly capabilities: {
963
+ readonly thinking: "unsupported";
964
+ readonly tools: "unsupported";
965
+ readonly vision: "unsupported";
966
+ readonly structuredOutput: "unsupported";
967
+ readonly logprobs: "unsupported";
968
+ readonly embeddings: "unsupported";
969
+ };
970
+ readonly constraints: {
971
+ readonly minOllamaVersion: "0.35.0";
972
+ readonly maxRequestBytes: 65536;
973
+ };
974
+ readonly status: {
975
+ readonly documented: true;
976
+ readonly experimental: true;
977
+ };
978
+ readonly domain: "native";
979
+ readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "Hard 64 KiB request body limit enforced by the server.", "No images, no tools, no generation controls (temperature, top_p, etc.).", "Experimental: behavioral surface may change between Ollama releases."];
980
+ };
981
+ declare const tagsOp: {
982
+ readonly operationId: "tags";
983
+ readonly method: "GET";
984
+ readonly path: "/api/tags";
985
+ readonly response: {
986
+ readonly $ref: "#/schemas/ListResponse";
987
+ };
988
+ readonly environment: {
989
+ readonly local: true;
990
+ readonly cloud: true;
991
+ };
992
+ readonly transport: {
993
+ readonly mode: "json";
994
+ readonly streaming: false;
995
+ };
996
+ readonly capabilities: {};
997
+ readonly status: {
998
+ readonly documented: true;
999
+ };
1000
+ readonly domain: "native";
1001
+ };
1002
+ declare const versionOp: {
1003
+ readonly operationId: "version";
1004
+ readonly method: "GET";
1005
+ readonly path: "/api/version";
1006
+ readonly response: {
1007
+ readonly $ref: "#/schemas/VersionResponse";
1008
+ };
1009
+ readonly environment: {
1010
+ readonly local: true;
1011
+ readonly cloud: true;
1012
+ };
1013
+ readonly transport: {
1014
+ readonly mode: "json";
1015
+ readonly streaming: false;
1016
+ };
1017
+ readonly capabilities: {};
1018
+ readonly status: {
1019
+ readonly documented: true;
1020
+ };
1021
+ readonly domain: "native";
1022
+ };
1023
+ declare const openaiChatCompletionsOp: {
1024
+ readonly operationId: "openaiChatCompletions";
1025
+ readonly method: "POST";
1026
+ readonly path: "/v1/chat/completions";
1027
+ readonly environment: {
1028
+ readonly local: true;
1029
+ readonly cloud: true;
1030
+ };
1031
+ readonly transport: {
1032
+ readonly mode: "sse";
1033
+ readonly streaming: true;
1034
+ readonly streamingDefault: false;
1035
+ };
1036
+ readonly capabilities: {
1037
+ readonly thinking: "model-dependent";
1038
+ readonly tools: "model-dependent";
1039
+ readonly vision: "model-dependent";
1040
+ readonly structuredOutput: "supported";
1041
+ readonly logprobs: "supported";
1042
+ };
1043
+ readonly status: {
1044
+ readonly documented: true;
1045
+ };
1046
+ readonly domain: "openai";
1047
+ readonly notes: readonly ["Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx."];
1048
+ };
1049
+ declare const openaiCompletionsOp: {
1050
+ readonly operationId: "openaiCompletions";
1051
+ readonly method: "POST";
1052
+ readonly path: "/v1/completions";
1053
+ readonly environment: {
1054
+ readonly local: true;
1055
+ readonly cloud: true;
1056
+ };
1057
+ readonly transport: {
1058
+ readonly mode: "sse";
1059
+ readonly streaming: true;
1060
+ readonly streamingDefault: false;
1061
+ };
1062
+ readonly capabilities: {
1063
+ readonly logprobs: "supported";
1064
+ };
1065
+ readonly status: {
1066
+ readonly documented: true;
1067
+ };
1068
+ readonly domain: "openai";
1069
+ };
1070
+ declare const openaiEmbeddingsOp: {
1071
+ readonly operationId: "openaiEmbeddings";
1072
+ readonly method: "POST";
1073
+ readonly path: "/v1/embeddings";
1074
+ readonly environment: {
1075
+ readonly local: true;
1076
+ readonly cloud: true;
1077
+ };
1078
+ readonly transport: {
1079
+ readonly mode: "json";
1080
+ readonly streaming: false;
1081
+ };
1082
+ readonly capabilities: {
1083
+ readonly embeddings: "supported";
1084
+ };
1085
+ readonly status: {
1086
+ readonly documented: true;
1087
+ };
1088
+ readonly domain: "openai";
1089
+ };
1090
+ declare const openaiModelsOp: {
1091
+ readonly operationId: "openaiModels";
1092
+ readonly method: "GET";
1093
+ readonly path: "/v1/models";
1094
+ readonly environment: {
1095
+ readonly local: true;
1096
+ readonly cloud: true;
1097
+ };
1098
+ readonly transport: {
1099
+ readonly mode: "json";
1100
+ readonly streaming: false;
1101
+ };
1102
+ readonly capabilities: {};
1103
+ readonly status: {
1104
+ readonly documented: true;
1105
+ };
1106
+ readonly domain: "openai";
1107
+ };
1108
+ declare const openaiModelsGetOneOp: {
1109
+ readonly operationId: "openaiModelsGetOne";
1110
+ readonly method: "GET";
1111
+ readonly path: "/v1/models/{model}";
1112
+ readonly environment: {
1113
+ readonly local: true;
1114
+ readonly cloud: true;
1115
+ };
1116
+ readonly transport: {
1117
+ readonly mode: "json";
1118
+ readonly streaming: false;
1119
+ };
1120
+ readonly capabilities: {};
1121
+ readonly status: {
1122
+ readonly documented: true;
1123
+ };
1124
+ readonly domain: "openai";
1125
+ readonly notes: readonly ["Returns metadata for a single OpenAI-compat model by id."];
1126
+ };
1127
+ declare const openaiResponsesOp: {
1128
+ readonly operationId: "openaiResponses";
1129
+ readonly method: "POST";
1130
+ readonly path: "/v1/responses";
1131
+ readonly environment: {
1132
+ readonly local: true;
1133
+ readonly cloud: true;
1134
+ };
1135
+ readonly transport: {
1136
+ readonly mode: "sse";
1137
+ readonly streaming: true;
1138
+ readonly streamingDefault: false;
1139
+ };
1140
+ readonly capabilities: {
1141
+ readonly thinking: "model-dependent";
1142
+ readonly tools: "model-dependent";
1143
+ };
1144
+ readonly status: {
1145
+ readonly documented: true;
1146
+ };
1147
+ readonly domain: "openai";
1148
+ readonly notes: readonly ["Ollama implements a subset of the OpenAI Responses API; previous_response_id and conversation are explicitly unsupported."];
1149
+ };
1150
+ declare const anthropicMessagesOp: {
1151
+ readonly operationId: "anthropicMessages";
1152
+ readonly method: "POST";
1153
+ readonly path: "/v1/messages";
1154
+ readonly environment: {
1155
+ readonly local: true;
1156
+ readonly cloud: true;
1157
+ };
1158
+ readonly transport: {
1159
+ readonly mode: "sse";
1160
+ readonly streaming: true;
1161
+ readonly streamingDefault: false;
1162
+ };
1163
+ readonly capabilities: {
1164
+ readonly thinking: "model-dependent";
1165
+ readonly tools: "model-dependent";
1166
+ };
1167
+ readonly status: {
1168
+ readonly documented: true;
1169
+ };
1170
+ readonly domain: "anthropic";
1171
+ readonly notes: readonly ["tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.", "Nested cache_control fields under messages[].content[].cache_control are unsupported."];
1172
+ };
1173
+ declare const allOperations: readonly [{
1174
+ readonly operationId: "blobs";
1175
+ readonly method: "HEAD";
1176
+ readonly path: "/api/blobs/{digest}";
1177
+ readonly environment: {
1178
+ readonly local: true;
1179
+ readonly cloud: false;
1180
+ };
1181
+ readonly transport: {
1182
+ readonly mode: "json";
1183
+ readonly streaming: false;
1184
+ };
1185
+ readonly capabilities: {};
1186
+ readonly status: {
1187
+ readonly documented: true;
1188
+ };
1189
+ readonly domain: "native";
1190
+ readonly notes: readonly ["HEAD-only endpoint for blob existence checks; declared in OpenAPI but not in the legacy parity manifest."];
1191
+ }, {
1192
+ readonly operationId: "chat";
1193
+ readonly method: "POST";
1194
+ readonly path: "/api/chat";
1195
+ readonly request: {
1196
+ readonly $ref: "#/schemas/ChatRequest";
1197
+ };
1198
+ readonly response: {
1199
+ readonly $ref: "#/schemas/ChatResponse";
1200
+ };
1201
+ readonly environment: {
1202
+ readonly local: true;
1203
+ readonly cloud: true;
1204
+ };
1205
+ readonly transport: {
1206
+ readonly mode: "ndjson";
1207
+ readonly streaming: true;
1208
+ readonly streamingDefault: true;
1209
+ };
1210
+ readonly capabilities: {
1211
+ readonly thinking: "model-dependent";
1212
+ readonly tools: "model-dependent";
1213
+ readonly vision: "model-dependent";
1214
+ readonly structuredOutput: "supported";
1215
+ readonly logprobs: "supported";
1216
+ };
1217
+ readonly status: {
1218
+ readonly documented: true;
1219
+ };
1220
+ readonly domain: "native";
1221
+ readonly notes: readonly ["Use /api/show to discover model-specific thinking values and defaults.", "Structured output (format field) is rejected by Ollama Cloud."];
1222
+ }, {
1223
+ readonly operationId: "copy";
1224
+ readonly method: "POST";
1225
+ readonly path: "/api/copy";
1226
+ readonly request: {
1227
+ readonly $ref: "#/schemas/CopyRequest";
1228
+ };
1229
+ readonly environment: {
1230
+ readonly local: true;
1231
+ readonly cloud: false;
1232
+ };
1233
+ readonly transport: {
1234
+ readonly mode: "json";
1235
+ readonly streaming: false;
1236
+ };
1237
+ readonly capabilities: {};
1238
+ readonly status: {
1239
+ readonly documented: true;
1240
+ };
1241
+ readonly domain: "native";
1242
+ }, {
1243
+ readonly operationId: "create";
1244
+ readonly method: "POST";
1245
+ readonly path: "/api/create";
1246
+ readonly request: {
1247
+ readonly $ref: "#/schemas/CreateRequest";
1248
+ };
1249
+ readonly response: {
1250
+ readonly $ref: "#/schemas/StatusResponse";
1251
+ };
1252
+ readonly environment: {
1253
+ readonly local: true;
1254
+ readonly cloud: false;
1255
+ };
1256
+ readonly transport: {
1257
+ readonly mode: "ndjson";
1258
+ readonly streaming: true;
1259
+ readonly streamingDefault: true;
1260
+ };
1261
+ readonly capabilities: {
1262
+ readonly thinking: "unsupported";
1263
+ readonly tools: "unsupported";
1264
+ };
1265
+ readonly status: {
1266
+ readonly documented: true;
1267
+ };
1268
+ readonly domain: "native";
1269
+ readonly notes: readonly ["Model creation is local-only; Ollama Cloud does not support it."];
1270
+ }, {
1271
+ readonly operationId: "delete";
1272
+ readonly method: "DELETE";
1273
+ readonly path: "/api/delete";
1274
+ readonly request: {
1275
+ readonly $ref: "#/schemas/DeleteRequest";
1276
+ };
1277
+ readonly environment: {
1278
+ readonly local: true;
1279
+ readonly cloud: false;
1280
+ };
1281
+ readonly transport: {
1282
+ readonly mode: "json";
1283
+ readonly streaming: false;
1284
+ };
1285
+ readonly capabilities: {};
1286
+ readonly status: {
1287
+ readonly documented: true;
1288
+ };
1289
+ readonly domain: "native";
1290
+ }, {
1291
+ readonly operationId: "embed";
1292
+ readonly method: "POST";
1293
+ readonly path: "/api/embed";
1294
+ readonly request: {
1295
+ readonly $ref: "#/schemas/EmbedRequest";
1296
+ };
1297
+ readonly response: {
1298
+ readonly $ref: "#/schemas/EmbedResponse";
1299
+ };
1300
+ readonly environment: {
1301
+ readonly local: true;
1302
+ readonly cloud: true;
1303
+ };
1304
+ readonly transport: {
1305
+ readonly mode: "json";
1306
+ readonly streaming: false;
1307
+ };
1308
+ readonly capabilities: {
1309
+ readonly embeddings: "supported";
1310
+ };
1311
+ readonly status: {
1312
+ readonly documented: true;
1313
+ };
1314
+ readonly domain: "native";
1315
+ }, {
1316
+ readonly operationId: "generate";
1317
+ readonly method: "POST";
1318
+ readonly path: "/api/generate";
1319
+ readonly request: {
1320
+ readonly $ref: "#/schemas/GenerateRequest";
1321
+ };
1322
+ readonly response: {
1323
+ readonly $ref: "#/schemas/GenerateResponse";
1324
+ };
1325
+ readonly environment: {
1326
+ readonly local: true;
1327
+ readonly cloud: true;
1328
+ };
1329
+ readonly transport: {
1330
+ readonly mode: "ndjson";
1331
+ readonly streaming: true;
1332
+ readonly streamingDefault: true;
1333
+ };
1334
+ readonly capabilities: {
1335
+ readonly thinking: "model-dependent";
1336
+ readonly vision: "supported";
1337
+ readonly structuredOutput: "supported";
1338
+ readonly logprobs: "supported";
1339
+ };
1340
+ readonly status: {
1341
+ readonly documented: true;
1342
+ };
1343
+ readonly domain: "native";
1344
+ }, {
1345
+ readonly operationId: "ps";
1346
+ readonly method: "GET";
1347
+ readonly path: "/api/ps";
1348
+ readonly response: {
1349
+ readonly $ref: "#/schemas/PsResponse";
1350
+ };
1351
+ readonly environment: {
1352
+ readonly local: true;
1353
+ readonly cloud: true;
1354
+ };
1355
+ readonly transport: {
1356
+ readonly mode: "json";
1357
+ readonly streaming: false;
1358
+ };
1359
+ readonly capabilities: {};
1360
+ readonly status: {
1361
+ readonly documented: true;
1362
+ };
1363
+ readonly domain: "native";
1364
+ }, {
1365
+ readonly operationId: "pull";
1366
+ readonly method: "POST";
1367
+ readonly path: "/api/pull";
1368
+ readonly request: {
1369
+ readonly $ref: "#/schemas/PullRequest";
1370
+ };
1371
+ readonly response: {
1372
+ readonly $ref: "#/schemas/StatusResponse";
1373
+ };
1374
+ readonly environment: {
1375
+ readonly local: true;
1376
+ readonly cloud: false;
1377
+ };
1378
+ readonly transport: {
1379
+ readonly mode: "ndjson";
1380
+ readonly streaming: true;
1381
+ readonly streamingDefault: true;
1382
+ };
1383
+ readonly capabilities: {};
1384
+ readonly status: {
1385
+ readonly documented: true;
1386
+ };
1387
+ readonly domain: "native";
1388
+ }, {
1389
+ readonly operationId: "push";
1390
+ readonly method: "POST";
1391
+ readonly path: "/api/push";
1392
+ readonly request: {
1393
+ readonly $ref: "#/schemas/PushRequest";
1394
+ };
1395
+ readonly response: {
1396
+ readonly $ref: "#/schemas/StatusResponse";
1397
+ };
1398
+ readonly environment: {
1399
+ readonly local: true;
1400
+ readonly cloud: false;
1401
+ };
1402
+ readonly transport: {
1403
+ readonly mode: "ndjson";
1404
+ readonly streaming: true;
1405
+ readonly streamingDefault: true;
1406
+ };
1407
+ readonly capabilities: {};
1408
+ readonly status: {
1409
+ readonly documented: true;
1410
+ };
1411
+ readonly domain: "native";
1412
+ }, {
1413
+ readonly operationId: "show";
1414
+ readonly method: "POST";
1415
+ readonly path: "/api/show";
1416
+ readonly request: {
1417
+ readonly $ref: "#/schemas/ShowRequest";
1418
+ };
1419
+ readonly response: {
1420
+ readonly $ref: "#/schemas/ShowResponse";
1421
+ };
1422
+ readonly environment: {
1423
+ readonly local: true;
1424
+ readonly cloud: true;
1425
+ };
1426
+ readonly transport: {
1427
+ readonly mode: "json";
1428
+ readonly streaming: false;
1429
+ };
1430
+ readonly capabilities: {};
1431
+ readonly status: {
1432
+ readonly documented: true;
1433
+ };
1434
+ readonly domain: "native";
1435
+ readonly notes: readonly ["Capabilities source: /api/show is the runtime source of truth for model-dependent capability values (tools, vision, thinking, embeddings)."];
1436
+ }, {
1437
+ readonly operationId: "systemOne";
1438
+ readonly method: "POST";
1439
+ readonly path: "/v1/systemone";
1440
+ readonly environment: {
1441
+ readonly local: true;
1442
+ readonly cloud: false;
1443
+ };
1444
+ readonly transport: {
1445
+ readonly mode: "json";
1446
+ readonly streaming: false;
1447
+ };
1448
+ readonly capabilities: {
1449
+ readonly thinking: "unsupported";
1450
+ readonly tools: "unsupported";
1451
+ readonly vision: "unsupported";
1452
+ readonly structuredOutput: "unsupported";
1453
+ readonly logprobs: "unsupported";
1454
+ readonly embeddings: "unsupported";
1455
+ };
1456
+ readonly constraints: {
1457
+ readonly minOllamaVersion: "0.35.0";
1458
+ readonly maxRequestBytes: 65536;
1459
+ };
1460
+ readonly status: {
1461
+ readonly documented: true;
1462
+ readonly experimental: true;
1463
+ };
1464
+ readonly domain: "native";
1465
+ readonly notes: readonly ["Local-only; Ollama Cloud rejects /v1/systemone.", "Hard 64 KiB request body limit enforced by the server.", "No images, no tools, no generation controls (temperature, top_p, etc.).", "Experimental: behavioral surface may change between Ollama releases."];
1466
+ }, {
1467
+ readonly operationId: "tags";
1468
+ readonly method: "GET";
1469
+ readonly path: "/api/tags";
1470
+ readonly response: {
1471
+ readonly $ref: "#/schemas/ListResponse";
1472
+ };
1473
+ readonly environment: {
1474
+ readonly local: true;
1475
+ readonly cloud: true;
1476
+ };
1477
+ readonly transport: {
1478
+ readonly mode: "json";
1479
+ readonly streaming: false;
1480
+ };
1481
+ readonly capabilities: {};
1482
+ readonly status: {
1483
+ readonly documented: true;
1484
+ };
1485
+ readonly domain: "native";
1486
+ }, {
1487
+ readonly operationId: "version";
1488
+ readonly method: "GET";
1489
+ readonly path: "/api/version";
1490
+ readonly response: {
1491
+ readonly $ref: "#/schemas/VersionResponse";
1492
+ };
1493
+ readonly environment: {
1494
+ readonly local: true;
1495
+ readonly cloud: true;
1496
+ };
1497
+ readonly transport: {
1498
+ readonly mode: "json";
1499
+ readonly streaming: false;
1500
+ };
1501
+ readonly capabilities: {};
1502
+ readonly status: {
1503
+ readonly documented: true;
1504
+ };
1505
+ readonly domain: "native";
1506
+ }, {
1507
+ readonly operationId: "openaiChatCompletions";
1508
+ readonly method: "POST";
1509
+ readonly path: "/v1/chat/completions";
1510
+ readonly environment: {
1511
+ readonly local: true;
1512
+ readonly cloud: true;
1513
+ };
1514
+ readonly transport: {
1515
+ readonly mode: "sse";
1516
+ readonly streaming: true;
1517
+ readonly streamingDefault: false;
1518
+ };
1519
+ readonly capabilities: {
1520
+ readonly thinking: "model-dependent";
1521
+ readonly tools: "model-dependent";
1522
+ readonly vision: "model-dependent";
1523
+ readonly structuredOutput: "supported";
1524
+ readonly logprobs: "supported";
1525
+ };
1526
+ readonly status: {
1527
+ readonly documented: true;
1528
+ };
1529
+ readonly domain: "openai";
1530
+ readonly notes: readonly ["Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx."];
1531
+ }, {
1532
+ readonly operationId: "openaiCompletions";
1533
+ readonly method: "POST";
1534
+ readonly path: "/v1/completions";
1535
+ readonly environment: {
1536
+ readonly local: true;
1537
+ readonly cloud: true;
1538
+ };
1539
+ readonly transport: {
1540
+ readonly mode: "sse";
1541
+ readonly streaming: true;
1542
+ readonly streamingDefault: false;
1543
+ };
1544
+ readonly capabilities: {
1545
+ readonly logprobs: "supported";
1546
+ };
1547
+ readonly status: {
1548
+ readonly documented: true;
1549
+ };
1550
+ readonly domain: "openai";
1551
+ }, {
1552
+ readonly operationId: "openaiEmbeddings";
1553
+ readonly method: "POST";
1554
+ readonly path: "/v1/embeddings";
1555
+ readonly environment: {
1556
+ readonly local: true;
1557
+ readonly cloud: true;
1558
+ };
1559
+ readonly transport: {
1560
+ readonly mode: "json";
1561
+ readonly streaming: false;
1562
+ };
1563
+ readonly capabilities: {
1564
+ readonly embeddings: "supported";
1565
+ };
1566
+ readonly status: {
1567
+ readonly documented: true;
1568
+ };
1569
+ readonly domain: "openai";
1570
+ }, {
1571
+ readonly operationId: "openaiModels";
1572
+ readonly method: "GET";
1573
+ readonly path: "/v1/models";
1574
+ readonly environment: {
1575
+ readonly local: true;
1576
+ readonly cloud: true;
1577
+ };
1578
+ readonly transport: {
1579
+ readonly mode: "json";
1580
+ readonly streaming: false;
1581
+ };
1582
+ readonly capabilities: {};
1583
+ readonly status: {
1584
+ readonly documented: true;
1585
+ };
1586
+ readonly domain: "openai";
1587
+ }, {
1588
+ readonly operationId: "openaiModelsGetOne";
1589
+ readonly method: "GET";
1590
+ readonly path: "/v1/models/{model}";
1591
+ readonly environment: {
1592
+ readonly local: true;
1593
+ readonly cloud: true;
1594
+ };
1595
+ readonly transport: {
1596
+ readonly mode: "json";
1597
+ readonly streaming: false;
1598
+ };
1599
+ readonly capabilities: {};
1600
+ readonly status: {
1601
+ readonly documented: true;
1602
+ };
1603
+ readonly domain: "openai";
1604
+ readonly notes: readonly ["Returns metadata for a single OpenAI-compat model by id."];
1605
+ }, {
1606
+ readonly operationId: "openaiResponses";
1607
+ readonly method: "POST";
1608
+ readonly path: "/v1/responses";
1609
+ readonly environment: {
1610
+ readonly local: true;
1611
+ readonly cloud: true;
1612
+ };
1613
+ readonly transport: {
1614
+ readonly mode: "sse";
1615
+ readonly streaming: true;
1616
+ readonly streamingDefault: false;
1617
+ };
1618
+ readonly capabilities: {
1619
+ readonly thinking: "model-dependent";
1620
+ readonly tools: "model-dependent";
1621
+ };
1622
+ readonly status: {
1623
+ readonly documented: true;
1624
+ };
1625
+ readonly domain: "openai";
1626
+ readonly notes: readonly ["Ollama implements a subset of the OpenAI Responses API; previous_response_id and conversation are explicitly unsupported."];
1627
+ }, {
1628
+ readonly operationId: "anthropicMessages";
1629
+ readonly method: "POST";
1630
+ readonly path: "/v1/messages";
1631
+ readonly environment: {
1632
+ readonly local: true;
1633
+ readonly cloud: true;
1634
+ };
1635
+ readonly transport: {
1636
+ readonly mode: "sse";
1637
+ readonly streaming: true;
1638
+ readonly streamingDefault: false;
1639
+ };
1640
+ readonly capabilities: {
1641
+ readonly thinking: "model-dependent";
1642
+ readonly tools: "model-dependent";
1643
+ };
1644
+ readonly status: {
1645
+ readonly documented: true;
1646
+ };
1647
+ readonly domain: "anthropic";
1648
+ readonly notes: readonly ["tool_choice and metadata are explicitly unsupported by Ollama's Anthropic compat layer.", "Nested cache_control fields under messages[].content[].cache_control are unsupported."];
1649
+ }];
1650
+
1651
+ export { AnthropicApi, NativeApi, OpenAIApi, allOperations, anthropicMessagesOp as anthropicMessages, blobsOp as blobs, chatOp as chat, copyOp as copy, createOp as create, deleteOp as delete, embedOp as embed, generateOp as generate, openaiChatCompletionsOp as openaiChatCompletions, openaiCompletionsOp as openaiCompletions, openaiEmbeddingsOp as openaiEmbeddings, openaiModelsOp as openaiModels, openaiModelsGetOneOp as openaiModelsGetOne, openaiResponsesOp as openaiResponses, psOp as ps, pullOp as pull, pushOp as push, showOp as show, systemOneOp as systemOne, tagsOp as tags, versionOp as version };