@nemesis-oss/ollama-sdk 1.7.0 → 1.8.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 (39) hide show
  1. package/CHANGELOG.md +10 -1
  2. package/dist/anthropic-B_UXplNF.d.ts +1647 -0
  3. package/dist/anthropic-CVDFy_a0.d.cts +1647 -0
  4. package/dist/generated-api.cjs +74 -6
  5. package/dist/generated-api.cjs.map +1 -1
  6. package/dist/generated-api.d.cts +230 -629
  7. package/dist/generated-api.d.ts +230 -629
  8. package/dist/generated-api.js +72 -7
  9. package/dist/generated-api.js.map +1 -1
  10. package/dist/generated-models-schemas.cjs +89 -1
  11. package/dist/generated-models-schemas.cjs.map +1 -1
  12. package/dist/generated-models-schemas.d.cts +121 -1
  13. package/dist/generated-models-schemas.d.ts +121 -1
  14. package/dist/generated-models-schemas.js +79 -2
  15. package/dist/generated-models-schemas.js.map +1 -1
  16. package/dist/generated-runtime.cjs +576 -57
  17. package/dist/generated-runtime.cjs.map +1 -1
  18. package/dist/generated-runtime.d.cts +21 -23
  19. package/dist/generated-runtime.d.ts +21 -23
  20. package/dist/generated-runtime.js +575 -58
  21. package/dist/generated-runtime.js.map +1 -1
  22. package/dist/index.cjs +1078 -75
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +378 -874
  25. package/dist/index.d.ts +378 -874
  26. package/dist/index.js +1075 -76
  27. package/dist/index.js.map +1 -1
  28. package/dist/mcp/tools.json +287 -73
  29. package/dist/mcp-generated.cjs +96 -7
  30. package/dist/mcp-generated.cjs.map +1 -1
  31. package/dist/mcp-generated.d.cts +1 -1
  32. package/dist/mcp-generated.d.ts +1 -1
  33. package/dist/mcp-generated.js +96 -7
  34. package/dist/mcp-generated.js.map +1 -1
  35. package/dist/{runtime-qwD72cpn.d.ts → runtime-C6UYtBRB.d.ts} +218 -4
  36. package/dist/{runtime-bQ48I-RC.d.cts → runtime-DTmUeU6K.d.cts} +218 -4
  37. package/dist/skills.cjs.map +1 -1
  38. package/dist/skills.js.map +1 -1
  39. package/package.json +3 -2
@@ -7,12 +7,14 @@
7
7
  "inputSchema": {
8
8
  "type": "object",
9
9
  "properties": {
10
- "prompt": {
10
+ "digest": {
11
11
  "type": "string",
12
- "description": "Input for blobs"
12
+ "description": "path parameter: digest"
13
13
  }
14
14
  },
15
- "additionalProperties": true
15
+ "required": ["digest"],
16
+ "additionalProperties": false,
17
+ "description": "HEAD /api/blobs/{digest} — 1 parameter."
16
18
  },
17
19
  "annotations": {
18
20
  "title": "blobs (Ollama)",
@@ -404,6 +406,30 @@
404
406
  },
405
407
  "_operationId": "create"
406
408
  },
409
+ {
410
+ "name": "ollama_createBlob",
411
+ "description": "Ollama POST /api/blobs/{digest} (native domain)\n\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.",
412
+ "inputSchema": {
413
+ "type": "object",
414
+ "properties": {
415
+ "digest": {
416
+ "type": "string",
417
+ "description": "path parameter: digest"
418
+ }
419
+ },
420
+ "required": ["digest"],
421
+ "additionalProperties": false,
422
+ "description": "POST /api/blobs/{digest} — 1 parameter."
423
+ },
424
+ "annotations": {
425
+ "title": "createBlob (Ollama)",
426
+ "readOnlyHint": false,
427
+ "destructiveHint": false,
428
+ "idempotentHint": false,
429
+ "openWorldHint": false
430
+ },
431
+ "_operationId": "createBlob"
432
+ },
407
433
  {
408
434
  "name": "ollama_delete",
409
435
  "description": "Ollama DELETE /api/delete (native domain)",
@@ -678,13 +704,9 @@
678
704
  "description": "Ollama GET /api/ps (native domain)",
679
705
  "inputSchema": {
680
706
  "type": "object",
681
- "properties": {
682
- "prompt": {
683
- "type": "string",
684
- "description": "Input for ps"
685
- }
686
- },
687
- "additionalProperties": true
707
+ "properties": {},
708
+ "additionalProperties": false,
709
+ "description": "GET /api/ps takes no request body."
688
710
  },
689
711
  "annotations": {
690
712
  "title": "ps (Ollama)",
@@ -785,16 +807,186 @@
785
807
  },
786
808
  {
787
809
  "name": "ollama_systemOne",
788
- "description": "Ollama POST /v1/systemone (native domain)\n\n- Local-only; Ollama Cloud rejects /v1/systemone.\n- Hard 64 KiB request body limit enforced by the server.\n- No images, no tools, no generation controls (temperature, top_p, etc.).\n- Experimental: behavioral surface may change between Ollama releases.",
810
+ "description": "Ollama POST /v1/systemone (native domain)\n\n- Local-only; Ollama Cloud rejects /v1/systemone.\n- 64 KiB request limit without images, 32 MiB with images (includes JSON/base64 overhead).\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.",
789
811
  "inputSchema": {
790
812
  "type": "object",
813
+ "required": ["model", "state", "questions"],
791
814
  "properties": {
792
- "prompt": {
815
+ "model": {
793
816
  "type": "string",
794
- "description": "Input for systemOne"
817
+ "pattern": "\\S",
818
+ "description": "Local model trained for System One, such as nimble. Requires compatible GGUF weights and a scoring-capable runner; cloud and MLX/Safetensors models are not supported."
819
+ },
820
+ "state": {
821
+ "description": "A nonempty string, or an object or array serialized as JSON text. Not interpreted as chat messages or multimodal input.",
822
+ "oneOf": [
823
+ {
824
+ "type": "string",
825
+ "pattern": "\\S"
826
+ },
827
+ {
828
+ "type": "object",
829
+ "additionalProperties": true
830
+ },
831
+ {
832
+ "type": "array",
833
+ "items": {}
834
+ }
835
+ ]
836
+ },
837
+ "images": {
838
+ "type": "array",
839
+ "description": "Base64-encoded images shared by all questions, in request order. Requires Clef or Clef Flash with vision weights. URLs and data URLs are not supported.",
840
+ "items": {
841
+ "type": "string",
842
+ "format": "byte"
843
+ }
844
+ },
845
+ "questions": {
846
+ "type": "object",
847
+ "description": "Named questions about the shared state. Answers are not passed to later questions.",
848
+ "minProperties": 1,
849
+ "maxProperties": 64,
850
+ "propertyNames": {
851
+ "pattern": "\\S"
852
+ },
853
+ "additionalProperties": {
854
+ "oneOf": [
855
+ {
856
+ "title": "Choice",
857
+ "type": "object",
858
+ "required": ["type", "instructions", "criteria"],
859
+ "properties": {
860
+ "type": {
861
+ "type": "string",
862
+ "enum": ["choice"]
863
+ },
864
+ "instructions": {
865
+ "description": "A nonempty string, or an object or array serialized as JSON text. Not interpreted as chat messages or multimodal input.",
866
+ "oneOf": [
867
+ {
868
+ "type": "string",
869
+ "pattern": "\\S"
870
+ },
871
+ {
872
+ "type": "object",
873
+ "additionalProperties": true
874
+ },
875
+ {
876
+ "type": "array",
877
+ "items": {}
878
+ }
879
+ ]
880
+ },
881
+ "criteria": {
882
+ "type": "object",
883
+ "description": "Option keys mapped to descriptions. A null description uses the key itself. Keys must not be blank; ties follow the model's option order.",
884
+ "minProperties": 2,
885
+ "maxProperties": 26,
886
+ "propertyNames": {
887
+ "pattern": "\\S"
888
+ },
889
+ "additionalProperties": {
890
+ "type": ["string", "null"]
891
+ }
892
+ }
893
+ }
894
+ },
895
+ {
896
+ "title": "Noul",
897
+ "type": "object",
898
+ "required": ["type", "instructions"],
899
+ "properties": {
900
+ "type": {
901
+ "type": "string",
902
+ "enum": ["noul"]
903
+ },
904
+ "instructions": {
905
+ "description": "A nonempty string, or an object or array serialized as JSON text. Not interpreted as chat messages or multimodal input.",
906
+ "oneOf": [
907
+ {
908
+ "type": "string",
909
+ "pattern": "\\S"
910
+ },
911
+ {
912
+ "type": "object",
913
+ "additionalProperties": true
914
+ },
915
+ {
916
+ "type": "array",
917
+ "items": {}
918
+ }
919
+ ]
920
+ },
921
+ "criteria": {
922
+ "type": "object",
923
+ "description": "Optional descriptions for the two outcomes. Omitted entries use No and Yes.",
924
+ "properties": {
925
+ "false": {
926
+ "type": "string",
927
+ "default": "No"
928
+ },
929
+ "true": {
930
+ "type": "string",
931
+ "default": "Yes"
932
+ }
933
+ },
934
+ "additionalProperties": false
935
+ }
936
+ }
937
+ },
938
+ {
939
+ "title": "Score",
940
+ "type": "object",
941
+ "required": ["type", "instructions", "criteria"],
942
+ "properties": {
943
+ "type": {
944
+ "type": "string",
945
+ "enum": ["score"]
946
+ },
947
+ "instructions": {
948
+ "description": "A nonempty string, or an object or array serialized as JSON text. Not interpreted as chat messages or multimodal input.",
949
+ "oneOf": [
950
+ {
951
+ "type": "string",
952
+ "pattern": "\\S"
953
+ },
954
+ {
955
+ "type": "object",
956
+ "additionalProperties": true
957
+ },
958
+ {
959
+ "type": "array",
960
+ "items": {}
961
+ }
962
+ ]
963
+ },
964
+ "criteria": {
965
+ "type": "array",
966
+ "description": "Descriptions ordered from the lowest score (index 0) to the highest. Defines a scale from 0 to the number of criteria minus 1.",
967
+ "minItems": 2,
968
+ "maxItems": 26,
969
+ "items": {
970
+ "type": "string"
971
+ }
972
+ }
973
+ }
974
+ }
975
+ ]
976
+ }
977
+ },
978
+ "keep_alive": {
979
+ "oneOf": [
980
+ {
981
+ "type": "string"
982
+ },
983
+ {
984
+ "type": "number"
985
+ }
986
+ ],
987
+ "description": "How long to keep the model loaded after the request, as a duration string (such as 5m) or seconds. Zero unloads after the request; a negative value keeps it loaded. Defaults to the server's keep-alive setting (5m unless configured otherwise)."
795
988
  }
796
- },
797
- "additionalProperties": true
989
+ }
798
990
  },
799
991
  "annotations": {
800
992
  "title": "systemOne (Ollama)",
@@ -810,13 +1002,9 @@
810
1002
  "description": "Ollama GET /api/tags (native domain)",
811
1003
  "inputSchema": {
812
1004
  "type": "object",
813
- "properties": {
814
- "prompt": {
815
- "type": "string",
816
- "description": "Input for tags"
817
- }
818
- },
819
- "additionalProperties": true
1005
+ "properties": {},
1006
+ "additionalProperties": false,
1007
+ "description": "GET /api/tags takes no request body."
820
1008
  },
821
1009
  "annotations": {
822
1010
  "title": "tags (Ollama)",
@@ -832,13 +1020,9 @@
832
1020
  "description": "Ollama GET /api/version (native domain)",
833
1021
  "inputSchema": {
834
1022
  "type": "object",
835
- "properties": {
836
- "prompt": {
837
- "type": "string",
838
- "description": "Input for version"
839
- }
840
- },
841
- "additionalProperties": true
1023
+ "properties": {},
1024
+ "additionalProperties": false,
1025
+ "description": "GET /api/version takes no request body."
842
1026
  },
843
1027
  "annotations": {
844
1028
  "title": "version (Ollama)",
@@ -850,17 +1034,65 @@
850
1034
  "_operationId": "version"
851
1035
  },
852
1036
  {
853
- "name": "ollama_openaiChatCompletions",
854
- "description": "Ollama POST /v1/chat/completions (openai domain)\n\n- Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx.",
1037
+ "name": "ollama_webFetch",
1038
+ "description": "Ollama POST /api/web_fetch (native domain)\n\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.",
855
1039
  "inputSchema": {
856
1040
  "type": "object",
1041
+ "required": ["url"],
857
1042
  "properties": {
858
- "prompt": {
1043
+ "url": {
859
1044
  "type": "string",
860
- "description": "Input for openaiChatCompletions"
1045
+ "format": "uri",
1046
+ "description": "The URL to fetch"
861
1047
  }
862
- },
863
- "additionalProperties": true
1048
+ }
1049
+ },
1050
+ "annotations": {
1051
+ "title": "webFetch (Ollama)",
1052
+ "readOnlyHint": false,
1053
+ "destructiveHint": false,
1054
+ "idempotentHint": false,
1055
+ "openWorldHint": false
1056
+ },
1057
+ "_operationId": "webFetch"
1058
+ },
1059
+ {
1060
+ "name": "ollama_webSearch",
1061
+ "description": "Ollama POST /api/web_search (native domain)\n\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.",
1062
+ "inputSchema": {
1063
+ "type": "object",
1064
+ "required": ["query"],
1065
+ "properties": {
1066
+ "query": {
1067
+ "type": "string",
1068
+ "description": "Search query string"
1069
+ },
1070
+ "max_results": {
1071
+ "type": "integer",
1072
+ "minimum": 1,
1073
+ "maximum": 10,
1074
+ "default": 5,
1075
+ "description": "Maximum number of results to return"
1076
+ }
1077
+ }
1078
+ },
1079
+ "annotations": {
1080
+ "title": "webSearch (Ollama)",
1081
+ "readOnlyHint": false,
1082
+ "destructiveHint": false,
1083
+ "idempotentHint": false,
1084
+ "openWorldHint": false
1085
+ },
1086
+ "_operationId": "webSearch"
1087
+ },
1088
+ {
1089
+ "name": "ollama_openaiChatCompletions",
1090
+ "description": "Ollama POST /v1/chat/completions (openai domain)\n\n- Ollama exposes a subset of the OpenAI Chat Completions request fields; see docs/upstream/ollama-openai-compatibility.mdx.",
1091
+ "inputSchema": {
1092
+ "type": "object",
1093
+ "properties": {},
1094
+ "additionalProperties": false,
1095
+ "description": "POST /v1/chat/completions takes no request body."
864
1096
  },
865
1097
  "annotations": {
866
1098
  "title": "openaiChatCompletions (Ollama)",
@@ -876,13 +1108,9 @@
876
1108
  "description": "Ollama POST /v1/completions (openai domain)",
877
1109
  "inputSchema": {
878
1110
  "type": "object",
879
- "properties": {
880
- "prompt": {
881
- "type": "string",
882
- "description": "Input for openaiCompletions"
883
- }
884
- },
885
- "additionalProperties": true
1111
+ "properties": {},
1112
+ "additionalProperties": false,
1113
+ "description": "POST /v1/completions takes no request body."
886
1114
  },
887
1115
  "annotations": {
888
1116
  "title": "openaiCompletions (Ollama)",
@@ -898,13 +1126,9 @@
898
1126
  "description": "Ollama POST /v1/embeddings (openai domain)",
899
1127
  "inputSchema": {
900
1128
  "type": "object",
901
- "properties": {
902
- "prompt": {
903
- "type": "string",
904
- "description": "Input for openaiEmbeddings"
905
- }
906
- },
907
- "additionalProperties": true
1129
+ "properties": {},
1130
+ "additionalProperties": false,
1131
+ "description": "POST /v1/embeddings takes no request body."
908
1132
  },
909
1133
  "annotations": {
910
1134
  "title": "openaiEmbeddings (Ollama)",
@@ -920,13 +1144,9 @@
920
1144
  "description": "Ollama GET /v1/models (openai domain)",
921
1145
  "inputSchema": {
922
1146
  "type": "object",
923
- "properties": {
924
- "prompt": {
925
- "type": "string",
926
- "description": "Input for openaiModels"
927
- }
928
- },
929
- "additionalProperties": true
1147
+ "properties": {},
1148
+ "additionalProperties": false,
1149
+ "description": "GET /v1/models takes no request body."
930
1150
  },
931
1151
  "annotations": {
932
1152
  "title": "openaiModels (Ollama)",
@@ -943,12 +1163,14 @@
943
1163
  "inputSchema": {
944
1164
  "type": "object",
945
1165
  "properties": {
946
- "prompt": {
1166
+ "model": {
947
1167
  "type": "string",
948
- "description": "Input for openaiModelsGetOne"
1168
+ "description": "path parameter: model"
949
1169
  }
950
1170
  },
951
- "additionalProperties": true
1171
+ "required": ["model"],
1172
+ "additionalProperties": false,
1173
+ "description": "GET /v1/models/{model} — 1 parameter."
952
1174
  },
953
1175
  "annotations": {
954
1176
  "title": "openaiModelsGetOne (Ollama)",
@@ -964,13 +1186,9 @@
964
1186
  "description": "Ollama POST /v1/responses (openai domain)\n\n- Ollama implements a subset of the OpenAI Responses API; previous_response_id and conversation are explicitly unsupported.",
965
1187
  "inputSchema": {
966
1188
  "type": "object",
967
- "properties": {
968
- "prompt": {
969
- "type": "string",
970
- "description": "Input for openaiResponses"
971
- }
972
- },
973
- "additionalProperties": true
1189
+ "properties": {},
1190
+ "additionalProperties": false,
1191
+ "description": "POST /v1/responses takes no request body."
974
1192
  },
975
1193
  "annotations": {
976
1194
  "title": "openaiResponses (Ollama)",
@@ -986,13 +1204,9 @@
986
1204
  "description": "Ollama POST /v1/messages (anthropic domain)\n\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.",
987
1205
  "inputSchema": {
988
1206
  "type": "object",
989
- "properties": {
990
- "prompt": {
991
- "type": "string",
992
- "description": "Input for anthropicMessages"
993
- }
994
- },
995
- "additionalProperties": true
1207
+ "properties": {},
1208
+ "additionalProperties": false,
1209
+ "description": "POST /v1/messages takes no request body."
996
1210
  },
997
1211
  "annotations": {
998
1212
  "title": "anthropicMessages (Ollama)",
@@ -23,6 +23,7 @@ __export(operations_exports, {
23
23
  blobsOp: () => blobsOp,
24
24
  chatOp: () => chatOp,
25
25
  copyOp: () => copyOp,
26
+ createBlobOp: () => createBlobOp,
26
27
  createOp: () => createOp,
27
28
  deleteOp: () => deleteOp,
28
29
  embedOp: () => embedOp,
@@ -39,9 +40,11 @@ __export(operations_exports, {
39
40
  showOp: () => showOp,
40
41
  systemOneOp: () => systemOneOp,
41
42
  tagsOp: () => tagsOp,
42
- versionOp: () => versionOp
43
+ versionOp: () => versionOp,
44
+ webFetchOp: () => webFetchOp,
45
+ webSearchOp: () => webSearchOp
43
46
  });
44
- var blobsOp, chatOp, copyOp, createOp, deleteOp, embedOp, generateOp, psOp, pullOp, pushOp, showOp, systemOneOp, tagsOp, versionOp, openaiChatCompletionsOp, openaiCompletionsOp, openaiEmbeddingsOp, openaiModelsOp, openaiModelsGetOneOp, openaiResponsesOp, anthropicMessagesOp, allOperations;
47
+ var blobsOp, chatOp, copyOp, createOp, createBlobOp, deleteOp, embedOp, generateOp, psOp, pullOp, pushOp, showOp, systemOneOp, tagsOp, versionOp, webFetchOp, webSearchOp, openaiChatCompletionsOp, openaiCompletionsOp, openaiEmbeddingsOp, openaiModelsOp, openaiModelsGetOneOp, openaiResponsesOp, anthropicMessagesOp, allOperations;
45
48
  var init_operations = __esm({
46
49
  "src/generated/api/operations.ts"() {
47
50
  blobsOp = {
@@ -49,6 +52,7 @@ var init_operations = __esm({
49
52
  method: "HEAD",
50
53
  path: "/api/blobs/{digest}",
51
54
  environment: { local: true, cloud: false },
55
+ parameters: [{ name: "digest", in: "path", required: true, schema: { type: "string" } }],
52
56
  transport: { mode: "json", streaming: false },
53
57
  capabilities: {},
54
58
  status: { documented: true },
@@ -103,6 +107,21 @@ var init_operations = __esm({
103
107
  domain: "native",
104
108
  notes: ["Model creation is local-only; Ollama Cloud does not support it."]
105
109
  };
110
+ createBlobOp = {
111
+ operationId: "createBlob",
112
+ method: "POST",
113
+ path: "/api/blobs/{digest}",
114
+ environment: { local: true, cloud: false },
115
+ parameters: [{ name: "digest", in: "path", required: true, schema: { type: "string" } }],
116
+ transport: { mode: "json", streaming: false },
117
+ capabilities: {},
118
+ status: { documented: true },
119
+ domain: "native",
120
+ notes: [
121
+ "POST endpoint for blob creation; takes a binary body (application/octet-stream).",
122
+ "Handled by OllamaClient.createBlob() \u2014 the generated NativeApi does not expose this operation because the runtime JSON-encodes request bodies."
123
+ ]
124
+ };
106
125
  deleteOp = {
107
126
  operationId: "delete",
108
127
  method: "DELETE",
@@ -197,23 +216,30 @@ var init_operations = __esm({
197
216
  operationId: "systemOne",
198
217
  method: "POST",
199
218
  path: "/v1/systemone",
219
+ request: { $ref: "#/schemas/SystemOneRequest" },
220
+ response: { $ref: "#/schemas/SystemOneResponse" },
200
221
  environment: { local: true, cloud: false },
201
222
  transport: { mode: "json", streaming: false },
202
223
  capabilities: {
203
224
  thinking: "unsupported",
204
225
  tools: "unsupported",
205
- vision: "unsupported",
226
+ vision: "model-dependent",
206
227
  structuredOutput: "unsupported",
207
228
  logprobs: "unsupported",
208
229
  embeddings: "unsupported"
209
230
  },
210
- constraints: { minOllamaVersion: "0.35.0", maxRequestBytes: 65536 },
231
+ constraints: {
232
+ minOllamaVersion: "0.35.0",
233
+ maxRequestBytes: 65536,
234
+ maxRequestBytesWithImages: 33554432
235
+ },
211
236
  status: { documented: true, experimental: true },
212
237
  domain: "native",
213
238
  notes: [
214
239
  "Local-only; Ollama Cloud rejects /v1/systemone.",
215
- "Hard 64 KiB request body limit enforced by the server.",
216
- "No images, no tools, no generation controls (temperature, top_p, etc.).",
240
+ "64 KiB request limit without images, 32 MiB with images (includes JSON/base64 overhead).",
241
+ "No tools, no generation controls (temperature, top_p, etc.).",
242
+ "Vision is model-dependent: images are accepted by vision-weighted models (Clef/Clef Flash) but not by text-only models.",
217
243
  "Experimental: behavioral surface may change between Ollama releases."
218
244
  ]
219
245
  };
@@ -239,6 +265,42 @@ var init_operations = __esm({
239
265
  status: { documented: true },
240
266
  domain: "native"
241
267
  };
268
+ webFetchOp = {
269
+ operationId: "webFetch",
270
+ method: "POST",
271
+ path: "/api/web_fetch",
272
+ request: { $ref: "#/schemas/WebFetchRequest" },
273
+ response: { $ref: "#/schemas/WebFetchResponse" },
274
+ environment: { local: false, cloud: true },
275
+ host: "https://ollama.com",
276
+ transport: { mode: "json", streaming: false },
277
+ capabilities: {},
278
+ status: { documented: true },
279
+ domain: "native",
280
+ notes: [
281
+ "Cloud-only capability endpoint \u2014 targets https://ollama.com, not the local Ollama server.",
282
+ "Requires an Ollama Cloud API key (set via OllamaClient credentials).",
283
+ "Use OllamaClient.webFetch() \u2014 the generated NativeApi class does not expose this operation."
284
+ ]
285
+ };
286
+ webSearchOp = {
287
+ operationId: "webSearch",
288
+ method: "POST",
289
+ path: "/api/web_search",
290
+ request: { $ref: "#/schemas/WebSearchRequest" },
291
+ response: { $ref: "#/schemas/WebSearchResponse" },
292
+ environment: { local: false, cloud: true },
293
+ host: "https://ollama.com",
294
+ transport: { mode: "json", streaming: false },
295
+ capabilities: {},
296
+ status: { documented: true },
297
+ domain: "native",
298
+ notes: [
299
+ "Cloud-only capability endpoint \u2014 targets https://ollama.com, not the local Ollama server.",
300
+ "Requires an Ollama Cloud API key (set via OllamaClient credentials).",
301
+ "Use OllamaClient.webSearch() \u2014 the generated NativeApi class does not expose this operation."
302
+ ]
303
+ };
242
304
  openaiChatCompletionsOp = {
243
305
  operationId: "openaiChatCompletions",
244
306
  method: "POST",
@@ -293,6 +355,7 @@ var init_operations = __esm({
293
355
  method: "GET",
294
356
  path: "/v1/models/{model}",
295
357
  environment: { local: true, cloud: true },
358
+ parameters: [{ name: "model", in: "path", required: true, schema: { type: "string" } }],
296
359
  transport: { mode: "json", streaming: false },
297
360
  capabilities: {},
298
361
  status: { documented: true },
@@ -331,6 +394,7 @@ var init_operations = __esm({
331
394
  chatOp,
332
395
  copyOp,
333
396
  createOp,
397
+ createBlobOp,
334
398
  deleteOp,
335
399
  embedOp,
336
400
  generateOp,
@@ -341,6 +405,8 @@ var init_operations = __esm({
341
405
  systemOneOp,
342
406
  tagsOp,
343
407
  versionOp,
408
+ webFetchOp,
409
+ webSearchOp,
344
410
  openaiChatCompletionsOp,
345
411
  openaiCompletionsOp,
346
412
  openaiEmbeddingsOp,
@@ -404,9 +470,32 @@ async function callGeneratedOllamaTool(runtime, name, args, options) {
404
470
  };
405
471
  }
406
472
  try {
473
+ const opParams = operation.parameters ?? [];
474
+ const pathParams = {};
475
+ const queryParams = {};
476
+ const headerParams = {};
477
+ const bodyArgs = {};
478
+ for (const [key, value] of Object.entries(args)) {
479
+ const paramDef = opParams.find((p) => p.name === key);
480
+ if (paramDef) {
481
+ if (paramDef.in === "path") {
482
+ pathParams[key] = String(value);
483
+ } else if (paramDef.in === "query") {
484
+ queryParams[key] = String(value);
485
+ } else if (paramDef.in === "header") {
486
+ headerParams[key] = String(value);
487
+ }
488
+ } else {
489
+ bodyArgs[key] = value;
490
+ }
491
+ }
492
+ const hasBody = Object.keys(bodyArgs).length > 0;
407
493
  const result = await runtime.invoke({
408
494
  operation,
409
- body: args,
495
+ body: hasBody ? bodyArgs : void 0,
496
+ ...Object.keys(pathParams).length > 0 ? { pathParams } : {},
497
+ ...Object.keys(queryParams).length > 0 ? { queryParams } : {},
498
+ ...Object.keys(headerParams).length > 0 ? { headerParams } : {},
410
499
  ...options?.signal !== void 0 ? { signal: options.signal } : {}
411
500
  });
412
501
  return {