hanzoai 8.5.621 → 8.5.640

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 (168) hide show
  1. package/README.md +64 -9
  2. package/dist/answer.js +20 -10
  3. package/dist/api/ai-api.d.ts +280 -14
  4. package/dist/api/ai-api.js +315 -29
  5. package/dist/api/auto-api.d.ts +64 -0
  6. package/dist/api/auto-api.js +77 -0
  7. package/dist/api/billing-api.d.ts +4 -4
  8. package/dist/api/billing-api.js +4 -4
  9. package/dist/api/git-api.d.ts +30 -0
  10. package/dist/api/git-api.js +59 -0
  11. package/dist/api/task-api.d.ts +55 -0
  12. package/dist/api/task-api.js +71 -0
  13. package/dist/client.d.ts +3 -2
  14. package/dist/client.js +4 -3
  15. package/dist/esm/answer.js +20 -10
  16. package/dist/esm/api/ai-api.d.ts +280 -14
  17. package/dist/esm/api/ai-api.js +315 -29
  18. package/dist/esm/api/auto-api.d.ts +64 -0
  19. package/dist/esm/api/auto-api.js +77 -0
  20. package/dist/esm/api/billing-api.d.ts +4 -4
  21. package/dist/esm/api/billing-api.js +4 -4
  22. package/dist/esm/api/git-api.d.ts +30 -0
  23. package/dist/esm/api/git-api.js +59 -0
  24. package/dist/esm/api/task-api.d.ts +55 -0
  25. package/dist/esm/api/task-api.js +71 -0
  26. package/dist/esm/client.d.ts +3 -2
  27. package/dist/esm/client.js +3 -2
  28. package/dist/esm/hanzo.d.ts +3 -0
  29. package/dist/esm/hanzo.js +6 -0
  30. package/dist/esm/models/agent-target-view.d.ts +6 -0
  31. package/dist/esm/models/ai-chat-in.d.ts +42 -0
  32. package/dist/esm/models/ai-chat.d.ts +37 -0
  33. package/dist/esm/models/ai-decide-in.d.ts +50 -0
  34. package/dist/esm/models/ai-decide-in.js +14 -0
  35. package/dist/esm/models/ai-decision-sides.d.ts +4 -5
  36. package/dist/esm/models/{ai-decision-sides-false.d.ts → ai-decision.d.ts} +15 -2
  37. package/dist/esm/models/ai-decision.js +14 -0
  38. package/dist/esm/models/ai-decisions-answer.d.ts +2 -3
  39. package/dist/esm/models/ai-decisions-choice.d.ts +4 -8
  40. package/dist/esm/models/ai-decisions-noul.d.ts +2 -3
  41. package/dist/esm/models/ai-decisions-request.d.ts +2 -3
  42. package/dist/esm/models/ai-decisions-score.d.ts +4 -5
  43. package/dist/esm/models/ai-model.d.ts +73 -0
  44. package/dist/esm/models/ai-model.js +14 -0
  45. package/dist/esm/models/{ai-decisions-choice-criteria-value.d.ts → ai-models.d.ts} +15 -2
  46. package/dist/esm/models/ai-models.js +14 -0
  47. package/dist/esm/models/ai-price.d.ts +48 -0
  48. package/dist/esm/models/ai-price.js +14 -0
  49. package/dist/esm/models/ai-receipt.d.ts +60 -0
  50. package/dist/esm/models/ai-receipt.js +14 -0
  51. package/dist/esm/models/ai-routing-reward-request.d.ts +54 -0
  52. package/dist/esm/models/ai-routing-reward-request.js +24 -0
  53. package/dist/esm/models/auto-automation-in.d.ts +6 -0
  54. package/dist/esm/models/auto-automation-patch.d.ts +6 -0
  55. package/dist/esm/models/auto-automation-run.d.ts +14 -1
  56. package/dist/esm/models/auto-automation.d.ts +6 -0
  57. package/dist/esm/models/auto-post-result.d.ts +36 -0
  58. package/dist/esm/models/auto-post-result.js +14 -0
  59. package/dist/esm/models/auto-review-in.d.ts +36 -0
  60. package/dist/esm/models/auto-review-in.js +14 -0
  61. package/dist/esm/models/git-workspace-view.d.ts +36 -0
  62. package/dist/esm/models/git-workspace-view.js +14 -0
  63. package/dist/esm/models/iam-user.d.ts +1 -1
  64. package/dist/esm/models/index.d.ts +14 -2
  65. package/dist/esm/models/index.js +14 -2
  66. package/dist/esm/models/provider-github-import-out.d.ts +6 -0
  67. package/dist/esm/models/provider-github-repo-item.d.ts +6 -0
  68. package/dist/esm/models/task-comment-list.d.ts +31 -0
  69. package/dist/esm/models/task-comment-list.js +14 -0
  70. package/dist/esm/models/task-comment.d.ts +42 -0
  71. package/dist/esm/models/task-comment.js +14 -0
  72. package/dist/esm/transport.d.ts +4 -0
  73. package/dist/esm/transport.js +188 -0
  74. package/dist/esm/usage.d.ts +98 -0
  75. package/dist/esm/usage.js +161 -0
  76. package/dist/hanzo.d.ts +3 -0
  77. package/dist/hanzo.js +16 -1
  78. package/dist/models/agent-target-view.d.ts +6 -0
  79. package/dist/models/ai-chat-in.d.ts +42 -0
  80. package/dist/models/ai-chat.d.ts +37 -0
  81. package/dist/models/ai-decide-in.d.ts +50 -0
  82. package/dist/models/ai-decide-in.js +15 -0
  83. package/dist/models/ai-decision-sides.d.ts +4 -5
  84. package/dist/models/{ai-decision-sides-false.d.ts → ai-decision.d.ts} +15 -2
  85. package/dist/models/ai-decision.js +15 -0
  86. package/dist/models/ai-decisions-answer.d.ts +2 -3
  87. package/dist/models/ai-decisions-choice.d.ts +4 -8
  88. package/dist/models/ai-decisions-noul.d.ts +2 -3
  89. package/dist/models/ai-decisions-request.d.ts +2 -3
  90. package/dist/models/ai-decisions-score.d.ts +4 -5
  91. package/dist/models/ai-model.d.ts +73 -0
  92. package/dist/models/ai-model.js +15 -0
  93. package/dist/models/{ai-decisions-choice-criteria-value.d.ts → ai-models.d.ts} +15 -2
  94. package/dist/models/ai-models.js +15 -0
  95. package/dist/models/ai-price.d.ts +48 -0
  96. package/dist/models/ai-price.js +15 -0
  97. package/dist/models/ai-receipt.d.ts +60 -0
  98. package/dist/models/ai-receipt.js +15 -0
  99. package/dist/models/ai-routing-reward-request.d.ts +54 -0
  100. package/dist/models/ai-routing-reward-request.js +27 -0
  101. package/dist/models/auto-automation-in.d.ts +6 -0
  102. package/dist/models/auto-automation-patch.d.ts +6 -0
  103. package/dist/models/auto-automation-run.d.ts +14 -1
  104. package/dist/models/auto-automation.d.ts +6 -0
  105. package/dist/models/auto-post-result.d.ts +36 -0
  106. package/dist/models/auto-post-result.js +15 -0
  107. package/dist/models/auto-review-in.d.ts +36 -0
  108. package/dist/models/auto-review-in.js +15 -0
  109. package/dist/models/git-workspace-view.d.ts +36 -0
  110. package/dist/models/git-workspace-view.js +15 -0
  111. package/dist/models/iam-user.d.ts +1 -1
  112. package/dist/models/index.d.ts +14 -2
  113. package/dist/models/index.js +14 -2
  114. package/dist/models/provider-github-import-out.d.ts +6 -0
  115. package/dist/models/provider-github-repo-item.d.ts +6 -0
  116. package/dist/models/task-comment-list.d.ts +31 -0
  117. package/dist/models/task-comment-list.js +15 -0
  118. package/dist/models/task-comment.d.ts +42 -0
  119. package/dist/models/task-comment.js +15 -0
  120. package/dist/transport.d.ts +4 -0
  121. package/dist/transport.js +195 -0
  122. package/dist/usage.d.ts +98 -0
  123. package/dist/usage.js +174 -0
  124. package/package.json +1 -1
  125. package/src/answer.ts +23 -10
  126. package/src/api/ai-api.ts +503 -29
  127. package/src/api/auto-api.ts +117 -0
  128. package/src/api/billing-api.ts +4 -4
  129. package/src/api/git-api.ts +68 -0
  130. package/src/api/task-api.ts +101 -0
  131. package/src/client.ts +3 -2
  132. package/src/hanzo.ts +18 -0
  133. package/src/models/agent-target-view.ts +6 -0
  134. package/src/models/ai-chat-in.ts +48 -0
  135. package/src/models/ai-chat.ts +45 -0
  136. package/src/models/ai-decide-in.ts +54 -0
  137. package/src/models/ai-decision-sides.ts +4 -7
  138. package/src/models/{ai-decision-sides-false.ts → ai-decision.ts} +17 -2
  139. package/src/models/ai-decisions-answer.ts +2 -5
  140. package/src/models/ai-decisions-choice.ts +4 -10
  141. package/src/models/ai-decisions-noul.ts +2 -5
  142. package/src/models/ai-decisions-question.ts +0 -3
  143. package/src/models/ai-decisions-request.ts +2 -5
  144. package/src/models/ai-decisions-score.ts +4 -7
  145. package/src/models/ai-model.ts +81 -0
  146. package/src/models/{ai-decisions-choice-criteria-value.ts → ai-models.ts} +17 -2
  147. package/src/models/ai-price.ts +54 -0
  148. package/src/models/ai-receipt.ts +66 -0
  149. package/src/models/ai-routing-reward-request.ts +63 -0
  150. package/src/models/auto-automation-in.ts +6 -0
  151. package/src/models/auto-automation-patch.ts +6 -0
  152. package/src/models/auto-automation-run.ts +16 -1
  153. package/src/models/auto-automation.ts +6 -0
  154. package/src/models/auto-post-result.ts +42 -0
  155. package/src/models/auto-review-in.ts +42 -0
  156. package/src/models/git-workspace-view.ts +42 -0
  157. package/src/models/iam-user.ts +1 -1
  158. package/src/models/index.ts +14 -2
  159. package/src/models/provider-github-import-out.ts +6 -0
  160. package/src/models/provider-github-repo-item.ts +6 -0
  161. package/src/models/task-comment-list.ts +39 -0
  162. package/src/models/task-comment.ts +48 -0
  163. package/src/transport.ts +190 -0
  164. package/src/usage.ts +203 -0
  165. /package/dist/esm/models/{ai-decision-sides-false.js → ai-chat-in.js} +0 -0
  166. /package/dist/esm/models/{ai-decisions-choice-criteria-value.js → ai-chat.js} +0 -0
  167. /package/dist/models/{ai-decision-sides-false.js → ai-chat-in.js} +0 -0
  168. /package/dist/models/{ai-decisions-choice-criteria-value.js → ai-chat.js} +0 -0
package/src/api/ai-api.ts CHANGED
@@ -26,6 +26,14 @@ import type { AiAnthropicRequest } from '../models';
26
26
  // @ts-ignore
27
27
  import type { AiAnthropicResponse } from '../models';
28
28
  // @ts-ignore
29
+ import type { AiChat } from '../models';
30
+ // @ts-ignore
31
+ import type { AiChatIn } from '../models';
32
+ // @ts-ignore
33
+ import type { AiDecideIn } from '../models';
34
+ // @ts-ignore
35
+ import type { AiDecision } from '../models';
36
+ // @ts-ignore
29
37
  import type { AiDecisionsRefused } from '../models';
30
38
  // @ts-ignore
31
39
  import type { AiDecisionsRequest } from '../models';
@@ -40,6 +48,8 @@ import type { AiMCPSurface } from '../models';
40
48
  // @ts-ignore
41
49
  import type { AiModelList } from '../models';
42
50
  // @ts-ignore
51
+ import type { AiModels } from '../models';
52
+ // @ts-ignore
43
53
  import type { AiRanking } from '../models';
44
54
  // @ts-ignore
45
55
  import type { AiResponse } from '../models';
@@ -48,6 +58,8 @@ import type { AiResponsesResource } from '../models';
48
58
  // @ts-ignore
49
59
  import type { AiRoutingEdit } from '../models';
50
60
  // @ts-ignore
61
+ import type { AiRoutingRewardRequest } from '../models';
62
+ // @ts-ignore
51
63
  import type { AiTokenCount } from '../models';
52
64
  // @ts-ignore
53
65
  import type { AiVideoStatus } from '../models';
@@ -223,6 +235,86 @@ import type { PutAiRouterCatalog200Response } from '../models';
223
235
  */
224
236
  export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
225
237
  return {
238
+ /**
239
+ * Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
240
+ * @summary Asks one model one prompt and answers the reply, which model served it and who paid.
241
+ * @param {AiChatIn} aiChatIn
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ aiChat: async (aiChatIn: AiChatIn, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
246
+ // verify required parameter 'aiChatIn' is not null or undefined
247
+ assertParamExists('aiChat', 'aiChatIn', aiChatIn)
248
+ const localVarPath = `/v1/ai/mcp/chat`;
249
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
250
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
251
+ let baseOptions;
252
+ if (configuration) {
253
+ baseOptions = configuration.baseOptions;
254
+ }
255
+
256
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
257
+ const localVarHeaderParameter = {} as any;
258
+ const localVarQueryParameter = {} as any;
259
+
260
+ // authentication bearer required
261
+ // http bearer authentication required
262
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
263
+
264
+
265
+
266
+ localVarHeaderParameter['Content-Type'] = 'application/json';
267
+
268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
271
+ localVarRequestOptions.data = serializeDataIfNeeded(aiChatIn, localVarRequestOptions, configuration)
272
+
273
+ return {
274
+ url: toPathString(localVarUrlObj),
275
+ options: localVarRequestOptions,
276
+ };
277
+ },
278
+ /**
279
+ * Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
280
+ * @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
281
+ * @param {AiDecideIn} aiDecideIn
282
+ * @param {*} [options] Override http request option.
283
+ * @throws {RequiredError}
284
+ */
285
+ aiDecide: async (aiDecideIn: AiDecideIn, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
286
+ // verify required parameter 'aiDecideIn' is not null or undefined
287
+ assertParamExists('aiDecide', 'aiDecideIn', aiDecideIn)
288
+ const localVarPath = `/v1/ai/mcp/decisions`;
289
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
290
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
291
+ let baseOptions;
292
+ if (configuration) {
293
+ baseOptions = configuration.baseOptions;
294
+ }
295
+
296
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
297
+ const localVarHeaderParameter = {} as any;
298
+ const localVarQueryParameter = {} as any;
299
+
300
+ // authentication bearer required
301
+ // http bearer authentication required
302
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
303
+
304
+
305
+
306
+ localVarHeaderParameter['Content-Type'] = 'application/json';
307
+
308
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
309
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
310
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
311
+ localVarRequestOptions.data = serializeDataIfNeeded(aiDecideIn, localVarRequestOptions, configuration)
312
+
313
+ return {
314
+ url: toPathString(localVarUrlObj),
315
+ options: localVarRequestOptions,
316
+ };
317
+ },
226
318
  /**
227
319
  * Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
228
320
  * @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
@@ -287,6 +379,65 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
287
379
 
288
380
 
289
381
 
382
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
383
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
384
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
385
+
386
+ return {
387
+ url: toPathString(localVarUrlObj),
388
+ options: localVarRequestOptions,
389
+ };
390
+ },
391
+ /**
392
+ * Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
393
+ * @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
394
+ * @param {string} [q] Q matches the model\&#39;s id, name, description or owner, ignoring case.
395
+ * @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\&#39;s priced models) or free.
396
+ * @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
397
+ * @param {string} [capability] Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
398
+ * @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
399
+ * @param {*} [options] Override http request option.
400
+ * @throws {RequiredError}
401
+ */
402
+ aiModels: async (q?: string, _class?: string, family?: string, capability?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
403
+ const localVarPath = `/v1/ai/mcp/models`;
404
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
405
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
406
+ let baseOptions;
407
+ if (configuration) {
408
+ baseOptions = configuration.baseOptions;
409
+ }
410
+
411
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
412
+ const localVarHeaderParameter = {} as any;
413
+ const localVarQueryParameter = {} as any;
414
+
415
+ // authentication bearer required
416
+ // http bearer authentication required
417
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
418
+
419
+ if (q !== undefined) {
420
+ localVarQueryParameter['q'] = q;
421
+ }
422
+
423
+ if (_class !== undefined) {
424
+ localVarQueryParameter['class'] = _class;
425
+ }
426
+
427
+ if (family !== undefined) {
428
+ localVarQueryParameter['family'] = family;
429
+ }
430
+
431
+ if (capability !== undefined) {
432
+ localVarQueryParameter['capability'] = capability;
433
+ }
434
+
435
+ if (limit !== undefined) {
436
+ localVarQueryParameter['limit'] = limit;
437
+ }
438
+
439
+
440
+
290
441
  setSearchParams(localVarUrlObj, localVarQueryParameter);
291
442
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
443
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -7761,10 +7912,13 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
7761
7912
  /**
7762
7913
  * Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
7763
7914
  * @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
7915
+ * @param {AiRoutingRewardRequest} aiRoutingRewardRequest
7764
7916
  * @param {*} [options] Override http request option.
7765
7917
  * @throws {RequiredError}
7766
7918
  */
7767
- postAiFeedback: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7919
+ postAiFeedback: async (aiRoutingRewardRequest: AiRoutingRewardRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
7920
+ // verify required parameter 'aiRoutingRewardRequest' is not null or undefined
7921
+ assertParamExists('postAiFeedback', 'aiRoutingRewardRequest', aiRoutingRewardRequest)
7768
7922
  const localVarPath = `/v1/ai/feedback`;
7769
7923
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
7770
7924
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -7783,9 +7937,12 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
7783
7937
 
7784
7938
 
7785
7939
 
7940
+ localVarHeaderParameter['Content-Type'] = 'application/json';
7941
+
7786
7942
  setSearchParams(localVarUrlObj, localVarQueryParameter);
7787
7943
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
7788
7944
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
7945
+ localVarRequestOptions.data = serializeDataIfNeeded(aiRoutingRewardRequest, localVarRequestOptions, configuration)
7789
7946
 
7790
7947
  return {
7791
7948
  url: toPathString(localVarUrlObj),
@@ -10260,10 +10417,12 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10260
10417
  * Implements the OpenAI-compatible chat completions API
10261
10418
  * @summary Implements the OpenAI-compatible chat completions API
10262
10419
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
10420
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
10421
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
10263
10422
  * @param {*} [options] Override http request option.
10264
10423
  * @throws {RequiredError}
10265
10424
  */
10266
- postChat: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10425
+ postChat: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10267
10426
  // verify required parameter 'openaiChatCompletionRequest' is not null or undefined
10268
10427
  assertParamExists('postChat', 'openaiChatCompletionRequest', openaiChatCompletionRequest)
10269
10428
  const localVarPath = `/v1/chat`;
@@ -10286,6 +10445,16 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10286
10445
 
10287
10446
  localVarHeaderParameter['Content-Type'] = 'application/json';
10288
10447
 
10448
+ if (xMaxCost != null) {
10449
+ localVarHeaderParameter['X-Max-Cost'] = typeof xMaxCost === 'string'
10450
+ ? xMaxCost
10451
+ : JSON.stringify(xMaxCost);
10452
+ }
10453
+ if (xMaxLatencyMs != null) {
10454
+ localVarHeaderParameter['X-Max-Latency-Ms'] = typeof xMaxLatencyMs === 'string'
10455
+ ? xMaxLatencyMs
10456
+ : JSON.stringify(xMaxLatencyMs);
10457
+ }
10289
10458
  setSearchParams(localVarUrlObj, localVarQueryParameter);
10290
10459
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10291
10460
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -10300,10 +10469,12 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10300
10469
  * Implements the OpenAI-compatible chat completions API
10301
10470
  * @summary Implements the OpenAI-compatible chat completions API
10302
10471
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
10472
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
10473
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
10303
10474
  * @param {*} [options] Override http request option.
10304
10475
  * @throws {RequiredError}
10305
10476
  */
10306
- postChatCompletions: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10477
+ postChatCompletions: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10307
10478
  // verify required parameter 'openaiChatCompletionRequest' is not null or undefined
10308
10479
  assertParamExists('postChatCompletions', 'openaiChatCompletionRequest', openaiChatCompletionRequest)
10309
10480
  const localVarPath = `/v1/chat/completions`;
@@ -10326,6 +10497,16 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10326
10497
 
10327
10498
  localVarHeaderParameter['Content-Type'] = 'application/json';
10328
10499
 
10500
+ if (xMaxCost != null) {
10501
+ localVarHeaderParameter['X-Max-Cost'] = typeof xMaxCost === 'string'
10502
+ ? xMaxCost
10503
+ : JSON.stringify(xMaxCost);
10504
+ }
10505
+ if (xMaxLatencyMs != null) {
10506
+ localVarHeaderParameter['X-Max-Latency-Ms'] = typeof xMaxLatencyMs === 'string'
10507
+ ? xMaxLatencyMs
10508
+ : JSON.stringify(xMaxLatencyMs);
10509
+ }
10329
10510
  setSearchParams(localVarUrlObj, localVarQueryParameter);
10330
10511
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10331
10512
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -10380,10 +10561,12 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10380
10561
  * Implements the OpenAI-compatible chat completions API
10381
10562
  * @summary Implements the OpenAI-compatible chat completions API
10382
10563
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
10564
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
10565
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
10383
10566
  * @param {*} [options] Override http request option.
10384
10567
  * @throws {RequiredError}
10385
10568
  */
10386
- postCompletions: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10569
+ postCompletions: async (openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10387
10570
  // verify required parameter 'openaiChatCompletionRequest' is not null or undefined
10388
10571
  assertParamExists('postCompletions', 'openaiChatCompletionRequest', openaiChatCompletionRequest)
10389
10572
  const localVarPath = `/v1/completions`;
@@ -10406,6 +10589,16 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10406
10589
 
10407
10590
  localVarHeaderParameter['Content-Type'] = 'application/json';
10408
10591
 
10592
+ if (xMaxCost != null) {
10593
+ localVarHeaderParameter['X-Max-Cost'] = typeof xMaxCost === 'string'
10594
+ ? xMaxCost
10595
+ : JSON.stringify(xMaxCost);
10596
+ }
10597
+ if (xMaxLatencyMs != null) {
10598
+ localVarHeaderParameter['X-Max-Latency-Ms'] = typeof xMaxLatencyMs === 'string'
10599
+ ? xMaxLatencyMs
10600
+ : JSON.stringify(xMaxLatencyMs);
10601
+ }
10409
10602
  setSearchParams(localVarUrlObj, localVarQueryParameter);
10410
10603
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10411
10604
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -10679,10 +10872,12 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10679
10872
  /**
10680
10873
  * Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
10681
10874
  * @summary Implements POST /v1/responses.
10875
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
10876
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
10682
10877
  * @param {*} [options] Override http request option.
10683
10878
  * @throws {RequiredError}
10684
10879
  */
10685
- postResponses: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10880
+ postResponses: async (xMaxCost?: number, xMaxLatencyMs?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
10686
10881
  const localVarPath = `/v1/responses`;
10687
10882
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
10688
10883
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -10701,6 +10896,16 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
10701
10896
 
10702
10897
 
10703
10898
 
10899
+ if (xMaxCost != null) {
10900
+ localVarHeaderParameter['X-Max-Cost'] = typeof xMaxCost === 'string'
10901
+ ? xMaxCost
10902
+ : JSON.stringify(xMaxCost);
10903
+ }
10904
+ if (xMaxLatencyMs != null) {
10905
+ localVarHeaderParameter['X-Max-Latency-Ms'] = typeof xMaxLatencyMs === 'string'
10906
+ ? xMaxLatencyMs
10907
+ : JSON.stringify(xMaxLatencyMs);
10908
+ }
10704
10909
  setSearchParams(localVarUrlObj, localVarQueryParameter);
10705
10910
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
10706
10911
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -12216,6 +12421,32 @@ export const AiApiAxiosParamCreator = function (configuration?: Configuration) {
12216
12421
  export const AiApiFp = function(configuration?: Configuration) {
12217
12422
  const localVarAxiosParamCreator = AiApiAxiosParamCreator(configuration)
12218
12423
  return {
12424
+ /**
12425
+ * Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
12426
+ * @summary Asks one model one prompt and answers the reply, which model served it and who paid.
12427
+ * @param {AiChatIn} aiChatIn
12428
+ * @param {*} [options] Override http request option.
12429
+ * @throws {RequiredError}
12430
+ */
12431
+ async aiChat(aiChatIn: AiChatIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiChat>> {
12432
+ const localVarAxiosArgs = await localVarAxiosParamCreator.aiChat(aiChatIn, options);
12433
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12434
+ const localVarOperationServerBasePath = operationServerMap['AiApi.aiChat']?.[localVarOperationServerIndex]?.url;
12435
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12436
+ },
12437
+ /**
12438
+ * Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
12439
+ * @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
12440
+ * @param {AiDecideIn} aiDecideIn
12441
+ * @param {*} [options] Override http request option.
12442
+ * @throws {RequiredError}
12443
+ */
12444
+ async aiDecide(aiDecideIn: AiDecideIn, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiDecision>> {
12445
+ const localVarAxiosArgs = await localVarAxiosParamCreator.aiDecide(aiDecideIn, options);
12446
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12447
+ const localVarOperationServerBasePath = operationServerMap['AiApi.aiDecide']?.[localVarOperationServerIndex]?.url;
12448
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12449
+ },
12219
12450
  /**
12220
12451
  * Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
12221
12452
  * @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
@@ -12241,6 +12472,23 @@ export const AiApiFp = function(configuration?: Configuration) {
12241
12472
  const localVarOperationServerBasePath = operationServerMap['AiApi.aiMCPTools']?.[localVarOperationServerIndex]?.url;
12242
12473
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12243
12474
  },
12475
+ /**
12476
+ * Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
12477
+ * @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
12478
+ * @param {string} [q] Q matches the model\&#39;s id, name, description or owner, ignoring case.
12479
+ * @param {string} [_class] Class keeps one class: premium (third-party frontier models), ours (Hanzo\&#39;s priced models) or free.
12480
+ * @param {string} [family] Family keeps one Hanzo family: enso, zen, kai or zoo.
12481
+ * @param {string} [capability] Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
12482
+ * @param {number} [limit] Limit is the most models to answer, 1 to 500; 0 answers 50.
12483
+ * @param {*} [options] Override http request option.
12484
+ * @throws {RequiredError}
12485
+ */
12486
+ async aiModels(q?: string, _class?: string, family?: string, capability?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiModels>> {
12487
+ const localVarAxiosArgs = await localVarAxiosParamCreator.aiModels(q, _class, family, capability, limit, options);
12488
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
12489
+ const localVarOperationServerBasePath = operationServerMap['AiApi.aiModels']?.[localVarOperationServerIndex]?.url;
12490
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
12491
+ },
12244
12492
  /**
12245
12493
  * Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
12246
12494
  * @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
@@ -14775,11 +15023,12 @@ export const AiApiFp = function(configuration?: Configuration) {
14775
15023
  /**
14776
15024
  * Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
14777
15025
  * @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
15026
+ * @param {AiRoutingRewardRequest} aiRoutingRewardRequest
14778
15027
  * @param {*} [options] Override http request option.
14779
15028
  * @throws {RequiredError}
14780
15029
  */
14781
- async postAiFeedback(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>> {
14782
- const localVarAxiosArgs = await localVarAxiosParamCreator.postAiFeedback(options);
15030
+ async postAiFeedback(aiRoutingRewardRequest: AiRoutingRewardRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PostAiFeedback200Response>> {
15031
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postAiFeedback(aiRoutingRewardRequest, options);
14783
15032
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
14784
15033
  const localVarOperationServerBasePath = operationServerMap['AiApi.postAiFeedback']?.[localVarOperationServerIndex]?.url;
14785
15034
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -15609,11 +15858,13 @@ export const AiApiFp = function(configuration?: Configuration) {
15609
15858
  * Implements the OpenAI-compatible chat completions API
15610
15859
  * @summary Implements the OpenAI-compatible chat completions API
15611
15860
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
15861
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
15862
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
15612
15863
  * @param {*} [options] Override http request option.
15613
15864
  * @throws {RequiredError}
15614
15865
  */
15615
- async postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15616
- const localVarAxiosArgs = await localVarAxiosParamCreator.postChat(openaiChatCompletionRequest, options);
15866
+ async postChat(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15867
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postChat(openaiChatCompletionRequest, xMaxCost, xMaxLatencyMs, options);
15617
15868
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
15618
15869
  const localVarOperationServerBasePath = operationServerMap['AiApi.postChat']?.[localVarOperationServerIndex]?.url;
15619
15870
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -15622,11 +15873,13 @@ export const AiApiFp = function(configuration?: Configuration) {
15622
15873
  * Implements the OpenAI-compatible chat completions API
15623
15874
  * @summary Implements the OpenAI-compatible chat completions API
15624
15875
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
15876
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
15877
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
15625
15878
  * @param {*} [options] Override http request option.
15626
15879
  * @throws {RequiredError}
15627
15880
  */
15628
- async postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15629
- const localVarAxiosArgs = await localVarAxiosParamCreator.postChatCompletions(openaiChatCompletionRequest, options);
15881
+ async postChatCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15882
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postChatCompletions(openaiChatCompletionRequest, xMaxCost, xMaxLatencyMs, options);
15630
15883
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
15631
15884
  const localVarOperationServerBasePath = operationServerMap['AiApi.postChatCompletions']?.[localVarOperationServerIndex]?.url;
15632
15885
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -15648,11 +15901,13 @@ export const AiApiFp = function(configuration?: Configuration) {
15648
15901
  * Implements the OpenAI-compatible chat completions API
15649
15902
  * @summary Implements the OpenAI-compatible chat completions API
15650
15903
  * @param {OpenaiChatCompletionRequest} openaiChatCompletionRequest
15904
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
15905
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
15651
15906
  * @param {*} [options] Override http request option.
15652
15907
  * @throws {RequiredError}
15653
15908
  */
15654
- async postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15655
- const localVarAxiosArgs = await localVarAxiosParamCreator.postCompletions(openaiChatCompletionRequest, options);
15909
+ async postCompletions(openaiChatCompletionRequest: OpenaiChatCompletionRequest, xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OpenaiChatCompletionResponse>> {
15910
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postCompletions(openaiChatCompletionRequest, xMaxCost, xMaxLatencyMs, options);
15656
15911
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
15657
15912
  const localVarOperationServerBasePath = operationServerMap['AiApi.postCompletions']?.[localVarOperationServerIndex]?.url;
15658
15913
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -15748,11 +16003,13 @@ export const AiApiFp = function(configuration?: Configuration) {
15748
16003
  /**
15749
16004
  * Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
15750
16005
  * @summary Implements POST /v1/responses.
16006
+ * @param {number} [xMaxCost] The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
16007
+ * @param {number} [xMaxLatencyMs] The slowest model this request accepts, in milliseconds.
15751
16008
  * @param {*} [options] Override http request option.
15752
16009
  * @throws {RequiredError}
15753
16010
  */
15754
- async postResponses(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>> {
15755
- const localVarAxiosArgs = await localVarAxiosParamCreator.postResponses(options);
16011
+ async postResponses(xMaxCost?: number, xMaxLatencyMs?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AiResponsesResource>> {
16012
+ const localVarAxiosArgs = await localVarAxiosParamCreator.postResponses(xMaxCost, xMaxLatencyMs, options);
15756
16013
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
15757
16014
  const localVarOperationServerBasePath = operationServerMap['AiApi.postResponses']?.[localVarOperationServerIndex]?.url;
15758
16015
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -16247,6 +16504,26 @@ export const AiApiFp = function(configuration?: Configuration) {
16247
16504
  export const AiApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
16248
16505
  const localVarFp = AiApiFp(configuration)
16249
16506
  return {
16507
+ /**
16508
+ * Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
16509
+ * @summary Asks one model one prompt and answers the reply, which model served it and who paid.
16510
+ * @param {AiApiAiChatRequest} requestParameters Request parameters.
16511
+ * @param {*} [options] Override http request option.
16512
+ * @throws {RequiredError}
16513
+ */
16514
+ aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiChat> {
16515
+ return localVarFp.aiChat(requestParameters.aiChatIn, options).then((request) => request(axios, basePath));
16516
+ },
16517
+ /**
16518
+ * Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
16519
+ * @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
16520
+ * @param {AiApiAiDecideRequest} requestParameters Request parameters.
16521
+ * @param {*} [options] Override http request option.
16522
+ * @throws {RequiredError}
16523
+ */
16524
+ aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig): AxiosPromise<AiDecision> {
16525
+ return localVarFp.aiDecide(requestParameters.aiDecideIn, options).then((request) => request(axios, basePath));
16526
+ },
16250
16527
  /**
16251
16528
  * Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
16252
16529
  * @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
@@ -16266,6 +16543,16 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
16266
16543
  aiMCPTools(requestParameters: AiApiAiMCPToolsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AiMCPSurface> {
16267
16544
  return localVarFp.aiMCPTools(requestParameters.names, options).then((request) => request(axios, basePath));
16268
16545
  },
16546
+ /**
16547
+ * Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
16548
+ * @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
16549
+ * @param {AiApiAiModelsRequest} requestParameters Request parameters.
16550
+ * @param {*} [options] Override http request option.
16551
+ * @throws {RequiredError}
16552
+ */
16553
+ aiModels(requestParameters: AiApiAiModelsRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AiModels> {
16554
+ return localVarFp.aiModels(requestParameters.q, requestParameters._class, requestParameters.family, requestParameters.capability, requestParameters.limit, options).then((request) => request(axios, basePath));
16555
+ },
16269
16556
  /**
16270
16557
  * Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
16271
16558
  * @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
@@ -18116,11 +18403,12 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
18116
18403
  /**
18117
18404
  * Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
18118
18405
  * @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
18406
+ * @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
18119
18407
  * @param {*} [options] Override http request option.
18120
18408
  * @throws {RequiredError}
18121
18409
  */
18122
- postAiFeedback(options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response> {
18123
- return localVarFp.postAiFeedback(options).then((request) => request(axios, basePath));
18410
+ postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig): AxiosPromise<PostAiFeedback200Response> {
18411
+ return localVarFp.postAiFeedback(requestParameters.aiRoutingRewardRequest, options).then((request) => request(axios, basePath));
18124
18412
  },
18125
18413
  /**
18126
18414
  * Create one file.
@@ -18745,7 +19033,7 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
18745
19033
  * @throws {RequiredError}
18746
19034
  */
18747
19035
  postChat(requestParameters: AiApiPostChatRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpenaiChatCompletionResponse> {
18748
- return localVarFp.postChat(requestParameters.openaiChatCompletionRequest, options).then((request) => request(axios, basePath));
19036
+ return localVarFp.postChat(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(axios, basePath));
18749
19037
  },
18750
19038
  /**
18751
19039
  * Implements the OpenAI-compatible chat completions API
@@ -18755,7 +19043,7 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
18755
19043
  * @throws {RequiredError}
18756
19044
  */
18757
19045
  postChatCompletions(requestParameters: AiApiPostChatCompletionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpenaiChatCompletionResponse> {
18758
- return localVarFp.postChatCompletions(requestParameters.openaiChatCompletionRequest, options).then((request) => request(axios, basePath));
19046
+ return localVarFp.postChatCompletions(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(axios, basePath));
18759
19047
  },
18760
19048
  /**
18761
19049
  * Serves one completion to a caller with no account.
@@ -18775,7 +19063,7 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
18775
19063
  * @throws {RequiredError}
18776
19064
  */
18777
19065
  postCompletions(requestParameters: AiApiPostCompletionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<OpenaiChatCompletionResponse> {
18778
- return localVarFp.postCompletions(requestParameters.openaiChatCompletionRequest, options).then((request) => request(axios, basePath));
19066
+ return localVarFp.postCompletions(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(axios, basePath));
18779
19067
  },
18780
19068
  /**
18781
19069
  * Implements POST /v1/decisions (the Decisions API). Body: {\"model\": \"kai\", \"state\": \"...\"|{...}|[...], \"questions\": {\"<name>\": {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\": ..., \"criteria\": ...}}}. model is kai, Kai\'s versioned id kai-<12 hex of the weights\' sha256> — priced as kai and sent as asked — or Jev by OpenRouter\'s vendor ids, typesafe/jev-1.13 and ~typesafe/jev-latest, which reach Jev itself and bill at Jev\'s list price. No Jev id is ever answered by Kai: a bare one, such as jev-latest, is an unknown model. model is required; state and questions are required unless the request names a handle, which carries neither. instructions is optional and any JSON. A choice names at least 2 labels and a score at least 1 level, bounded by the token budget rather than a count; questions holds 1 to 100. observe holds the state under an id, and a later request naming that id as its handle decides over it again. An id is 1 to 128 characters of A-Z, a-z, 0-9, \'.\', \'_\' and \'-\'. A handle belongs to the org that observed it: no other org\'s request can name it. Response: {\"id\",\"model\",\"provider\",\"answers\":{\"<name>\":{\"type\",...}}, \"usage\":{\"input_tokens\",\"output_tokens\"},\"routing\",\"state_hash\",\"latency_ms\"}. usage.input_tokens is the billed count — the request\'s text counted once, the state once and each question\'s instructions and options once; a decision over a handle bills the state once, when it was observed. The body may be sent gzip, deflate, br or zstd encoded; decoded, it is bounded as sent. Refusals are {\"error\":{\"code\",\"message\"}}: 400 malformed JSON or unknown model, 401 no valid credential, 402 insufficient balance, 403 a key kind that may not call this (pk-), 415 any other Content-Encoding, 422 an invalid question or handle id, a state beyond the checkpoint\'s reach (code state_too_long) or a body past 16 MiB (code request_too_long), 429 rate limited or queue full, 502 the service failed, 503 the model is known and not served, 529 overloaded. 402, 429 and 529 carry Retry-After and Retry-After-Ms, and every answer carries X-Request-Id. Billed on the answer\'s input tokens at the model\'s price.
@@ -18847,11 +19135,12 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
18847
19135
  /**
18848
19136
  * Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
18849
19137
  * @summary Implements POST /v1/responses.
19138
+ * @param {AiApiPostResponsesRequest} requestParameters Request parameters.
18850
19139
  * @param {*} [options] Override http request option.
18851
19140
  * @throws {RequiredError}
18852
19141
  */
18853
- postResponses(options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource> {
18854
- return localVarFp.postResponses(options).then((request) => request(axios, basePath));
19142
+ postResponses(requestParameters: AiApiPostResponsesRequest = {}, options?: RawAxiosRequestConfig): AxiosPromise<AiResponsesResource> {
19143
+ return localVarFp.postResponses(requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(axios, basePath));
18855
19144
  },
18856
19145
  /**
18857
19146
  * Implements POST /v1/videos/generations — the ASYNC create. Body: {\"model\": \"...\", \"prompt\": \"...\", \"size\"?: \"1280x720\", \"seconds\"?: int} It authenticates the caller, resolves the model to its upstream provider via the shared routing table (zen3-video* / wan2-2-t2v-a14b → the spark-video backend), reserves the per-video budget (the balance gate), creates ONE upstream job, registers it in the in-pod store, and returns the OpenAI-shaped video object with status \"queued\" IMMEDIATELY. The client then polls GET /v1/videos/{id} and downloads GET /v1/videos/{id}/content. Nothing is billed here — the debit lands on completion.
@@ -19188,6 +19477,34 @@ export const AiApiFactory = function (configuration?: Configuration, basePath?:
19188
19477
  };
19189
19478
  };
19190
19479
 
19480
+ /**
19481
+ * Request parameters for aiChat operation in AiApi.
19482
+ * @export
19483
+ * @interface AiApiAiChatRequest
19484
+ */
19485
+ export interface AiApiAiChatRequest {
19486
+ /**
19487
+ *
19488
+ * @type {AiChatIn}
19489
+ * @memberof AiApiAiChat
19490
+ */
19491
+ readonly aiChatIn: AiChatIn
19492
+ }
19493
+
19494
+ /**
19495
+ * Request parameters for aiDecide operation in AiApi.
19496
+ * @export
19497
+ * @interface AiApiAiDecideRequest
19498
+ */
19499
+ export interface AiApiAiDecideRequest {
19500
+ /**
19501
+ *
19502
+ * @type {AiDecideIn}
19503
+ * @memberof AiApiAiDecide
19504
+ */
19505
+ readonly aiDecideIn: AiDecideIn
19506
+ }
19507
+
19191
19508
  /**
19192
19509
  * Request parameters for aiMCPTools operation in AiApi.
19193
19510
  * @export
@@ -19202,6 +19519,48 @@ export interface AiApiAiMCPToolsRequest {
19202
19519
  readonly names?: boolean
19203
19520
  }
19204
19521
 
19522
+ /**
19523
+ * Request parameters for aiModels operation in AiApi.
19524
+ * @export
19525
+ * @interface AiApiAiModelsRequest
19526
+ */
19527
+ export interface AiApiAiModelsRequest {
19528
+ /**
19529
+ * Q matches the model\&#39;s id, name, description or owner, ignoring case.
19530
+ * @type {string}
19531
+ * @memberof AiApiAiModels
19532
+ */
19533
+ readonly q?: string
19534
+
19535
+ /**
19536
+ * Class keeps one class: premium (third-party frontier models), ours (Hanzo\&#39;s priced models) or free.
19537
+ * @type {string}
19538
+ * @memberof AiApiAiModels
19539
+ */
19540
+ readonly _class?: string
19541
+
19542
+ /**
19543
+ * Family keeps one Hanzo family: enso, zen, kai or zoo.
19544
+ * @type {string}
19545
+ * @memberof AiApiAiModels
19546
+ */
19547
+ readonly family?: string
19548
+
19549
+ /**
19550
+ * Capability keeps the models that have it: tools, vision or reasoning, or a modality they take or give (text, image, audio, file, video, decision).
19551
+ * @type {string}
19552
+ * @memberof AiApiAiModels
19553
+ */
19554
+ readonly capability?: string
19555
+
19556
+ /**
19557
+ * Limit is the most models to answer, 1 to 500; 0 answers 50.
19558
+ * @type {number}
19559
+ * @memberof AiApiAiModels
19560
+ */
19561
+ readonly limit?: number
19562
+ }
19563
+
19205
19564
  /**
19206
19565
  * Request parameters for aiSetLimits operation in AiApi.
19207
19566
  * @export
@@ -21183,6 +21542,20 @@ export interface AiApiPostAiDeploymentsByOwnerByNameUndeployRequest {
21183
21542
  readonly body: object
21184
21543
  }
21185
21544
 
21545
+ /**
21546
+ * Request parameters for postAiFeedback operation in AiApi.
21547
+ * @export
21548
+ * @interface AiApiPostAiFeedbackRequest
21549
+ */
21550
+ export interface AiApiPostAiFeedbackRequest {
21551
+ /**
21552
+ *
21553
+ * @type {AiRoutingRewardRequest}
21554
+ * @memberof AiApiPostAiFeedback
21555
+ */
21556
+ readonly aiRoutingRewardRequest: AiRoutingRewardRequest
21557
+ }
21558
+
21186
21559
  /**
21187
21560
  * Request parameters for postAiFiles operation in AiApi.
21188
21561
  * @export
@@ -21839,6 +22212,20 @@ export interface AiApiPostChatRequest {
21839
22212
  * @memberof AiApiPostChat
21840
22213
  */
21841
22214
  readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest
22215
+
22216
+ /**
22217
+ * The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
22218
+ * @type {number}
22219
+ * @memberof AiApiPostChat
22220
+ */
22221
+ readonly xMaxCost?: number
22222
+
22223
+ /**
22224
+ * The slowest model this request accepts, in milliseconds.
22225
+ * @type {number}
22226
+ * @memberof AiApiPostChat
22227
+ */
22228
+ readonly xMaxLatencyMs?: number
21842
22229
  }
21843
22230
 
21844
22231
  /**
@@ -21853,6 +22240,20 @@ export interface AiApiPostChatCompletionsRequest {
21853
22240
  * @memberof AiApiPostChatCompletions
21854
22241
  */
21855
22242
  readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest
22243
+
22244
+ /**
22245
+ * The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
22246
+ * @type {number}
22247
+ * @memberof AiApiPostChatCompletions
22248
+ */
22249
+ readonly xMaxCost?: number
22250
+
22251
+ /**
22252
+ * The slowest model this request accepts, in milliseconds.
22253
+ * @type {number}
22254
+ * @memberof AiApiPostChatCompletions
22255
+ */
22256
+ readonly xMaxLatencyMs?: number
21856
22257
  }
21857
22258
 
21858
22259
  /**
@@ -21881,6 +22282,20 @@ export interface AiApiPostCompletionsRequest {
21881
22282
  * @memberof AiApiPostCompletions
21882
22283
  */
21883
22284
  readonly openaiChatCompletionRequest: OpenaiChatCompletionRequest
22285
+
22286
+ /**
22287
+ * The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
22288
+ * @type {number}
22289
+ * @memberof AiApiPostCompletions
22290
+ */
22291
+ readonly xMaxCost?: number
22292
+
22293
+ /**
22294
+ * The slowest model this request accepts, in milliseconds.
22295
+ * @type {number}
22296
+ * @memberof AiApiPostCompletions
22297
+ */
22298
+ readonly xMaxLatencyMs?: number
21884
22299
  }
21885
22300
 
21886
22301
  /**
@@ -21939,6 +22354,27 @@ export interface AiApiPostModelsByModelAccessRequest {
21939
22354
  readonly model: string
21940
22355
  }
21941
22356
 
22357
+ /**
22358
+ * Request parameters for postResponses operation in AiApi.
22359
+ * @export
22360
+ * @interface AiApiPostResponsesRequest
22361
+ */
22362
+ export interface AiApiPostResponsesRequest {
22363
+ /**
22364
+ * The most this request may cost, in USD per 1,000 tokens. Routing picks only models under it; an org\&#39;s own ceiling fills it when it is absent, and the lower of the two holds.
22365
+ * @type {number}
22366
+ * @memberof AiApiPostResponses
22367
+ */
22368
+ readonly xMaxCost?: number
22369
+
22370
+ /**
22371
+ * The slowest model this request accepts, in milliseconds.
22372
+ * @type {number}
22373
+ * @memberof AiApiPostResponses
22374
+ */
22375
+ readonly xMaxLatencyMs?: number
22376
+ }
22377
+
21942
22378
  /**
21943
22379
  * Request parameters for putAiArticlesByOwnerByName operation in AiApi.
21944
22380
  * @export
@@ -22632,6 +23068,30 @@ export interface AiApiPutAiWorkflowsByOwnerByNameRequest {
22632
23068
  * @extends {BaseAPI}
22633
23069
  */
22634
23070
  export class AiApi extends BaseAPI {
23071
+ /**
23072
+ * Asks one model one prompt and answers the reply, which model served it and who paid. The call is the caller\'s own POST /v1/chat/completions, run as the caller, so it is gated, billed and refused exactly as that route is; a refusal names its code and what lifts it, never an amount. An empty model asks the deployment\'s default Hanzo model.
23073
+ * @summary Asks one model one prompt and answers the reply, which model served it and who paid.
23074
+ * @param {AiApiAiChatRequest} requestParameters Request parameters.
23075
+ * @param {*} [options] Override http request option.
23076
+ * @throws {RequiredError}
23077
+ * @memberof AiApi
23078
+ */
23079
+ public aiChat(requestParameters: AiApiAiChatRequest, options?: RawAxiosRequestConfig) {
23080
+ return AiApiFp(this.configuration).aiChat(requestParameters.aiChatIn, options).then((request) => request(this.axios, this.basePath));
23081
+ }
23082
+
23083
+ /**
23084
+ * Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid. A refusal names its code and what lifts it, never an amount.
23085
+ * @summary Runs one decision — the caller\'s own POST /v1/decisions, gated and billed exactly as that route is — and answers the decision, which model served it and who paid.
23086
+ * @param {AiApiAiDecideRequest} requestParameters Request parameters.
23087
+ * @param {*} [options] Override http request option.
23088
+ * @throws {RequiredError}
23089
+ * @memberof AiApi
23090
+ */
23091
+ public aiDecide(requestParameters: AiApiAiDecideRequest, options?: RawAxiosRequestConfig) {
23092
+ return AiApiFp(this.configuration).aiDecide(requestParameters.aiDecideIn, options).then((request) => request(this.axios, this.basePath));
23093
+ }
23094
+
22635
23095
  /**
22636
23096
  * Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on. Shares only, never amounts.
22637
23097
  * @summary Reads the caller\'s plan usage: for each class of model the plan includes, the share used of the billing period and of its short window, who pays for the next request, and whether the caller is in limited mode and why; the share used of the session and the day; and the ways on.
@@ -22655,6 +23115,18 @@ export class AiApi extends BaseAPI {
22655
23115
  return AiApiFp(this.configuration).aiMCPTools(requestParameters.names, options).then((request) => request(this.axios, this.basePath));
22656
23116
  }
22657
23117
 
23118
+ /**
23119
+ * Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
23120
+ * @summary Searches the model catalog — the one GET /v1/models lists — by text, class, family or capability, and answers each match with its class, family, list price (per token and per million; variable for a router billed at the answering model\'s price), context window and capabilities.
23121
+ * @param {AiApiAiModelsRequest} requestParameters Request parameters.
23122
+ * @param {*} [options] Override http request option.
23123
+ * @throws {RequiredError}
23124
+ * @memberof AiApi
23125
+ */
23126
+ public aiModels(requestParameters: AiApiAiModelsRequest = {}, options?: RawAxiosRequestConfig) {
23127
+ return AiApiFp(this.configuration).aiModels(requestParameters.q, requestParameters._class, requestParameters.family, requestParameters.capability, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
23128
+ }
23129
+
22658
23130
  /**
22659
23131
  * Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent. A pooled org wallet is its org admin\'s to set; a person\'s own wallet is theirs. Every change is on the audit trail, before and after; no trail, no change. Answers the limits as they read after it.
22660
23132
  * @summary Sets the payer\'s choice to keep using a model on credits once the plan\'s included usage of it is spent.
@@ -24895,12 +25367,13 @@ export class AiApi extends BaseAPI {
24895
25367
  /**
24896
25368
  * Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal. Org-scoped via the same session-OR-Bearer principal the usage read uses (RequirePrincipal): the reward lands only on the caller\'s OWN org\'s event, so a request_id from another org (or unknown) is a 404 — cross-org writes are impossible and unknown ids are indistinguishable from foreign ones. Idempotent: a repeat overwrites. The body carries NO prompt text — only {request_id, reward|rating}.
24897
25369
  * @summary Attaches a per-request outcome reward to the routing decision that served request_id — the enso training loop\'s quality signal.
25370
+ * @param {AiApiPostAiFeedbackRequest} requestParameters Request parameters.
24898
25371
  * @param {*} [options] Override http request option.
24899
25372
  * @throws {RequiredError}
24900
25373
  * @memberof AiApi
24901
25374
  */
24902
- public postAiFeedback(options?: RawAxiosRequestConfig) {
24903
- return AiApiFp(this.configuration).postAiFeedback(options).then((request) => request(this.axios, this.basePath));
25375
+ public postAiFeedback(requestParameters: AiApiPostAiFeedbackRequest, options?: RawAxiosRequestConfig) {
25376
+ return AiApiFp(this.configuration).postAiFeedback(requestParameters.aiRoutingRewardRequest, options).then((request) => request(this.axios, this.basePath));
24904
25377
  }
24905
25378
 
24906
25379
  /**
@@ -25655,7 +26128,7 @@ export class AiApi extends BaseAPI {
25655
26128
  * @memberof AiApi
25656
26129
  */
25657
26130
  public postChat(requestParameters: AiApiPostChatRequest, options?: RawAxiosRequestConfig) {
25658
- return AiApiFp(this.configuration).postChat(requestParameters.openaiChatCompletionRequest, options).then((request) => request(this.axios, this.basePath));
26131
+ return AiApiFp(this.configuration).postChat(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(this.axios, this.basePath));
25659
26132
  }
25660
26133
 
25661
26134
  /**
@@ -25667,7 +26140,7 @@ export class AiApi extends BaseAPI {
25667
26140
  * @memberof AiApi
25668
26141
  */
25669
26142
  public postChatCompletions(requestParameters: AiApiPostChatCompletionsRequest, options?: RawAxiosRequestConfig) {
25670
- return AiApiFp(this.configuration).postChatCompletions(requestParameters.openaiChatCompletionRequest, options).then((request) => request(this.axios, this.basePath));
26143
+ return AiApiFp(this.configuration).postChatCompletions(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(this.axios, this.basePath));
25671
26144
  }
25672
26145
 
25673
26146
  /**
@@ -25691,7 +26164,7 @@ export class AiApi extends BaseAPI {
25691
26164
  * @memberof AiApi
25692
26165
  */
25693
26166
  public postCompletions(requestParameters: AiApiPostCompletionsRequest, options?: RawAxiosRequestConfig) {
25694
- return AiApiFp(this.configuration).postCompletions(requestParameters.openaiChatCompletionRequest, options).then((request) => request(this.axios, this.basePath));
26167
+ return AiApiFp(this.configuration).postCompletions(requestParameters.openaiChatCompletionRequest, requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(this.axios, this.basePath));
25695
26168
  }
25696
26169
 
25697
26170
  /**
@@ -25778,12 +26251,13 @@ export class AiApi extends BaseAPI {
25778
26251
  /**
25779
26252
  * Implements POST /v1/responses. The converted request is completed by the chat path, which is handed a sink saying where the answer goes: a stream is translated as it is produced, a whole body is translated entire.
25780
26253
  * @summary Implements POST /v1/responses.
26254
+ * @param {AiApiPostResponsesRequest} requestParameters Request parameters.
25781
26255
  * @param {*} [options] Override http request option.
25782
26256
  * @throws {RequiredError}
25783
26257
  * @memberof AiApi
25784
26258
  */
25785
- public postResponses(options?: RawAxiosRequestConfig) {
25786
- return AiApiFp(this.configuration).postResponses(options).then((request) => request(this.axios, this.basePath));
26259
+ public postResponses(requestParameters: AiApiPostResponsesRequest = {}, options?: RawAxiosRequestConfig) {
26260
+ return AiApiFp(this.configuration).postResponses(requestParameters.xMaxCost, requestParameters.xMaxLatencyMs, options).then((request) => request(this.axios, this.basePath));
25787
26261
  }
25788
26262
 
25789
26263
  /**