@orq-ai/node 4.16.0-rc.57 → 4.16.0-rc.58

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 (138) hide show
  1. package/README.md +68 -52
  2. package/funcs/routerClassifyCreate.d.ts +2 -2
  3. package/funcs/routerClassifyCreate.d.ts.map +1 -1
  4. package/funcs/routerClassifyCreate.js +2 -2
  5. package/funcs/routerClassifyCreate.js.map +1 -1
  6. package/funcs/routerDecisionsCreate.d.ts +18 -0
  7. package/funcs/routerDecisionsCreate.d.ts.map +1 -0
  8. package/funcs/routerDecisionsCreate.js +123 -0
  9. package/funcs/routerDecisionsCreate.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +2 -2
  12. package/lib/config.js +2 -2
  13. package/models/components/classifyanswer.d.ts +6 -47
  14. package/models/components/classifyanswer.d.ts.map +1 -1
  15. package/models/components/classifyanswer.js +11 -20
  16. package/models/components/classifyanswer.js.map +1 -1
  17. package/models/components/classifychoiceanswer.d.ts +24 -0
  18. package/models/components/classifychoiceanswer.d.ts.map +1 -0
  19. package/models/components/classifychoiceanswer.js +53 -0
  20. package/models/components/classifychoiceanswer.js.map +1 -0
  21. package/models/components/classifyinputtokensdetails.d.ts +17 -0
  22. package/models/components/classifyinputtokensdetails.d.ts.map +1 -0
  23. package/models/components/classifyinputtokensdetails.js +57 -0
  24. package/models/components/classifyinputtokensdetails.js.map +1 -0
  25. package/models/components/classifynoulanswer.d.ts +14 -0
  26. package/models/components/classifynoulanswer.d.ts.map +1 -0
  27. package/models/components/classifynoulanswer.js +51 -0
  28. package/models/components/classifynoulanswer.js.map +1 -0
  29. package/models/components/classifyrefusalanswer.d.ts +10 -0
  30. package/models/components/classifyrefusalanswer.d.ts.map +1 -0
  31. package/models/components/classifyrefusalanswer.js +50 -0
  32. package/models/components/classifyrefusalanswer.js.map +1 -0
  33. package/models/components/classifyretryconfig.d.ts +4 -4
  34. package/models/components/classifyretryconfig.d.ts.map +1 -1
  35. package/models/components/classifyretryconfig.js +1 -1
  36. package/models/components/classifyretryconfig.js.map +1 -1
  37. package/models/components/classifyscoreanswer.d.ts +30 -0
  38. package/models/components/classifyscoreanswer.d.ts.map +1 -0
  39. package/models/components/classifyscoreanswer.js +54 -0
  40. package/models/components/classifyscoreanswer.js.map +1 -0
  41. package/models/components/classifyusage.d.ts +4 -2
  42. package/models/components/classifyusage.d.ts.map +1 -1
  43. package/models/components/classifyusage.js +3 -0
  44. package/models/components/classifyusage.js.map +1 -1
  45. package/models/components/index.d.ts +5 -0
  46. package/models/components/index.d.ts.map +1 -1
  47. package/models/components/index.js +5 -0
  48. package/models/components/index.js.map +1 -1
  49. package/models/components/model.d.ts +4 -0
  50. package/models/components/model.d.ts.map +1 -1
  51. package/models/components/model.js +1 -0
  52. package/models/components/model.js.map +1 -1
  53. package/models/components/modelmetadata.d.ts +2 -0
  54. package/models/components/modelmetadata.d.ts.map +1 -1
  55. package/models/components/modelmetadata.js +4 -0
  56. package/models/components/modelmetadata.js.map +1 -1
  57. package/models/components/reasoningpart.js +1 -1
  58. package/models/errors/createclassify.d.ts +90 -6
  59. package/models/errors/createclassify.d.ts.map +1 -1
  60. package/models/errors/createclassify.js +116 -4
  61. package/models/errors/createclassify.js.map +1 -1
  62. package/models/errors/createdecisions.d.ts +151 -0
  63. package/models/errors/createdecisions.d.ts.map +1 -0
  64. package/models/errors/createdecisions.js +239 -0
  65. package/models/errors/createdecisions.js.map +1 -0
  66. package/models/errors/index.d.ts +1 -0
  67. package/models/errors/index.d.ts.map +1 -1
  68. package/models/errors/index.js +1 -0
  69. package/models/errors/index.js.map +1 -1
  70. package/models/operations/createclassify.d.ts +9 -4
  71. package/models/operations/createclassify.d.ts.map +1 -1
  72. package/models/operations/createclassify.js +2 -0
  73. package/models/operations/createclassify.js.map +1 -1
  74. package/models/operations/createdecisions.d.ts +237 -0
  75. package/models/operations/createdecisions.d.ts.map +1 -0
  76. package/models/operations/createdecisions.js +148 -0
  77. package/models/operations/createdecisions.js.map +1 -0
  78. package/models/operations/createtool.js +4 -4
  79. package/models/operations/getalltools.js +4 -4
  80. package/models/operations/getv2humanevalsets.js +2 -2
  81. package/models/operations/getv2humanevalsetsid.js +2 -2
  82. package/models/operations/index.d.ts +1 -0
  83. package/models/operations/index.d.ts.map +1 -1
  84. package/models/operations/index.js +1 -0
  85. package/models/operations/index.js.map +1 -1
  86. package/models/operations/patchv2humanevalsetsid.js +2 -2
  87. package/models/operations/postv2feedbackevaluation.js +4 -4
  88. package/models/operations/postv2humanevalsets.js +2 -2
  89. package/models/operations/retrievetool.js +4 -4
  90. package/models/operations/runagent.js +1 -1
  91. package/models/operations/streamrunagent.js +1 -1
  92. package/models/operations/updatetool.js +4 -4
  93. package/package.json +3 -3
  94. package/sdk/classify.d.ts +1 -1
  95. package/sdk/classify.js +1 -1
  96. package/sdk/decisions.d.ts +12 -0
  97. package/sdk/decisions.d.ts.map +1 -0
  98. package/sdk/decisions.js +22 -0
  99. package/sdk/decisions.js.map +1 -0
  100. package/sdk/router.d.ts +3 -0
  101. package/sdk/router.d.ts.map +1 -1
  102. package/sdk/router.js +4 -0
  103. package/sdk/router.js.map +1 -1
  104. package/src/funcs/routerClassifyCreate.ts +31 -3
  105. package/src/funcs/routerDecisionsCreate.ts +218 -0
  106. package/src/lib/config.ts +2 -2
  107. package/src/models/components/classifyanswer.ts +28 -56
  108. package/src/models/components/classifychoiceanswer.ts +46 -0
  109. package/src/models/components/classifyinputtokensdetails.ts +45 -0
  110. package/src/models/components/classifynoulanswer.ts +36 -0
  111. package/src/models/components/classifyrefusalanswer.ts +31 -0
  112. package/src/models/components/classifyretryconfig.ts +5 -5
  113. package/src/models/components/classifyscoreanswer.ts +51 -0
  114. package/src/models/components/classifyusage.ts +9 -2
  115. package/src/models/components/index.ts +5 -0
  116. package/src/models/components/model.ts +5 -0
  117. package/src/models/components/modelmetadata.ts +6 -0
  118. package/src/models/components/reasoningpart.ts +1 -1
  119. package/src/models/errors/createclassify.ts +214 -6
  120. package/src/models/errors/createdecisions.ts +363 -0
  121. package/src/models/errors/index.ts +1 -0
  122. package/src/models/operations/createclassify.ts +11 -4
  123. package/src/models/operations/createdecisions.ts +434 -0
  124. package/src/models/operations/createtool.ts +4 -4
  125. package/src/models/operations/getalltools.ts +4 -4
  126. package/src/models/operations/getv2humanevalsets.ts +2 -2
  127. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  128. package/src/models/operations/index.ts +1 -0
  129. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  130. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  131. package/src/models/operations/postv2humanevalsets.ts +2 -2
  132. package/src/models/operations/retrievetool.ts +4 -4
  133. package/src/models/operations/runagent.ts +1 -1
  134. package/src/models/operations/streamrunagent.ts +1 -1
  135. package/src/models/operations/updatetool.ts +4 -4
  136. package/src/sdk/classify.ts +1 -1
  137. package/src/sdk/decisions.ts +27 -0
  138. package/src/sdk/router.ts +6 -0
@@ -1764,7 +1764,7 @@ export const UpdateToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1764
1764
  z.ZodTypeDef,
1765
1765
  unknown
1766
1766
  > = z.object({
1767
- _id: z.string().default("tool_01M4AJD93PSTRNK4XFB9QMYPPE"),
1767
+ _id: z.string().default("tool_01M4AT2CQDQCBGPWHA2X69DZY7"),
1768
1768
  path: z.string(),
1769
1769
  key: z.string(),
1770
1770
  display_name: z.string().optional(),
@@ -1959,7 +1959,7 @@ export const UpdateToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
1959
1959
  z.ZodTypeDef,
1960
1960
  unknown
1961
1961
  > = z.object({
1962
- _id: z.string().default("tool_01M4AJD93NPNMVVTB5N6GW28TN"),
1962
+ _id: z.string().default("tool_01M4AT2CQCHG6FXM6PV31K1N54"),
1963
1963
  path: z.string(),
1964
1964
  key: z.string(),
1965
1965
  display_name: z.string().optional(),
@@ -2054,7 +2054,7 @@ export const UpdateToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2054
2054
  z.ZodTypeDef,
2055
2055
  unknown
2056
2056
  > = z.object({
2057
- _id: z.string().default("tool_01M4AJD93N7HQCRQ66FKDGXTVP"),
2057
+ _id: z.string().default("tool_01M4AT2CQC76S92CVGNSCR7P45"),
2058
2058
  path: z.string(),
2059
2059
  key: z.string(),
2060
2060
  display_name: z.string().optional(),
@@ -2157,7 +2157,7 @@ export const UpdateToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
2157
2157
  z.ZodTypeDef,
2158
2158
  unknown
2159
2159
  > = z.object({
2160
- _id: z.string().default("tool_01M4AJD93MVCPJ5PZ6FGQ25KSS"),
2160
+ _id: z.string().default("tool_01M4AT2CQB6KC0KY5WFFJF3TTX"),
2161
2161
  path: z.string(),
2162
2162
  key: z.string(),
2163
2163
  display_name: z.string().optional(),
@@ -12,7 +12,7 @@ export class Classify extends ClientSDK {
12
12
  * Classify
13
13
  *
14
14
  * @remarks
15
- * **Beta.** Runs typed classification questions (`noul`, `choice`, `score`) against the native classify model `typesafe/jev-latest` or a chat model that supports classify. Chat models answer through one structured-output call and their probabilities are model-reported rather than calibrated. The request and response follow the TypeSafe classification contract; `model` in the response echoes the request and `usage` carries the computed cost like the Responses API. This endpoint currently does not apply PII plugins or guardrails.
15
+ * **Beta.** Runs typed classification questions (`noul`, `choice`, `score`) against a native classify provider, including OpenAI Decisions with `openai/gpt-6-luna`, or a chat model that supports classify emulation. Emulated models answer through one structured-output call and their probabilities are model-reported rather than calibrated. Native providers can return `refusal` for individual questions; refused answers contain only `type`. The request and response follow the TypeSafe classification contract; `model` in the response identifies the primary or fallback model that answered and `usage` carries the computed cost like the Responses API. Both `/v3/router/classify` and `/v3/router/decisions` use this contract, including ordered `fallbacks`, request-level `retry`, and `identity` attribution. Both require `classify.execute`. This endpoint currently does not apply PII plugins or guardrails.
16
16
  */
17
17
  async create(
18
18
  request: operations.CreateClassifyRequestBody,
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { routerDecisionsCreate } from "../funcs/routerDecisionsCreate.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as operations from "../models/operations/index.js";
8
+ import { unwrapAsync } from "../types/fp.js";
9
+
10
+ export class Decisions extends ClientSDK {
11
+ /**
12
+ * Decisions
13
+ *
14
+ * @remarks
15
+ * **Beta.** Runs typed classification questions (`noul`, `choice`, `score`) against a native classify provider, including OpenAI Decisions with `openai/gpt-6-luna`, or a chat model that supports classify emulation. Emulated models answer through one structured-output call and their probabilities are model-reported rather than calibrated. Native providers can return `refusal` for individual questions; refused answers contain only `type`. The request and response follow the TypeSafe classification contract; `model` in the response identifies the primary or fallback model that answered and `usage` carries the computed cost like the Responses API. Both `/v3/router/classify` and `/v3/router/decisions` use this contract, including ordered `fallbacks`, request-level `retry`, and `identity` attribution. Both require `classify.execute`. This endpoint currently does not apply PII plugins or guardrails.
16
+ */
17
+ async create(
18
+ request: operations.CreateDecisionsRequestBody,
19
+ options?: RequestOptions,
20
+ ): Promise<operations.CreateDecisionsResponseBody> {
21
+ return unwrapAsync(routerDecisionsCreate(
22
+ this,
23
+ request,
24
+ options,
25
+ ));
26
+ }
27
+ }
package/src/sdk/router.ts CHANGED
@@ -10,6 +10,7 @@ import { Audio } from "./audio.js";
10
10
  import { Chat } from "./chat.js";
11
11
  import { Classify } from "./classify.js";
12
12
  import { Completions } from "./completions.js";
13
+ import { Decisions } from "./decisions.js";
13
14
  import { Embeddings } from "./embeddings.js";
14
15
  import { Images } from "./images.js";
15
16
  import { Moderations } from "./moderations.js";
@@ -56,6 +57,11 @@ export class Router extends ClientSDK {
56
57
  return (this._classify ??= new Classify(this._options));
57
58
  }
58
59
 
60
+ private _decisions?: Decisions;
61
+ get decisions(): Decisions {
62
+ return (this._decisions ??= new Decisions(this._options));
63
+ }
64
+
59
65
  /**
60
66
  * Extracts text content while maintaining document structure and hierarchy
61
67
  */