@orq-ai/node 4.11.0-rc.4 → 4.11.0-rc.6
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.
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +23 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +23 -0
- package/models/components/index.js.map +1 -1
- package/models/components/modelmetadata.d.ts +2 -0
- package/models/components/modelmetadata.d.ts.map +1 -1
- package/models/components/modelmetadata.js +4 -0
- package/models/components/modelmetadata.js.map +1 -1
- package/models/components/publicresponseresource.d.ts +105 -0
- package/models/components/publicresponseresource.d.ts.map +1 -0
- package/models/components/publicresponseresource.js +138 -0
- package/models/components/publicresponseresource.js.map +1 -0
- package/models/components/reasoning.d.ts +40 -2
- package/models/components/reasoning.d.ts.map +1 -1
- package/models/components/reasoning.js +26 -3
- package/models/components/reasoning.js.map +1 -1
- package/models/components/reasoningparam.d.ts +40 -2
- package/models/components/reasoningparam.d.ts.map +1 -1
- package/models/components/reasoningparam.js +28 -3
- package/models/components/reasoningparam.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts +61 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.d.ts.map +1 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.js +89 -0
- package/models/components/responsecodeinterpretercodedeltastreamevent.js.map +1 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.d.ts +61 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.d.ts.map +1 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.js +89 -0
- package/models/components/responsecodeinterpretercodedonestreamevent.js.map +1 -0
- package/models/components/responsecontentpartstreamevent.d.ts +81 -0
- package/models/components/responsecontentpartstreamevent.d.ts.map +1 -0
- package/models/components/responsecontentpartstreamevent.js +100 -0
- package/models/components/responsecontentpartstreamevent.js.map +1 -0
- package/models/components/responseerrorstreamevent.d.ts +51 -0
- package/models/components/responseerrorstreamevent.d.ts.map +1 -0
- package/models/components/responseerrorstreamevent.js +85 -0
- package/models/components/responseerrorstreamevent.js.map +1 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts +65 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.js +90 -0
- package/models/components/responsefunctioncallargumentsdeltastreamevent.js.map +1 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts +61 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.d.ts.map +1 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.js +89 -0
- package/models/components/responsefunctioncallargumentsdonestreamevent.js.map +1 -0
- package/models/components/responsehostedtoolcallstreamevent.d.ts +97 -0
- package/models/components/responsehostedtoolcallstreamevent.d.ts.map +1 -0
- package/models/components/responsehostedtoolcallstreamevent.js +123 -0
- package/models/components/responsehostedtoolcallstreamevent.js.map +1 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.d.ts +65 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.d.ts.map +1 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.js +92 -0
- package/models/components/responseimagegenerationpartialimagestreamevent.js.map +1 -0
- package/models/components/responselifecyclestreamevent.d.ts +73 -0
- package/models/components/responselifecyclestreamevent.d.ts.map +1 -0
- package/models/components/responselifecyclestreamevent.js +103 -0
- package/models/components/responselifecyclestreamevent.js.map +1 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts +61 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.js +89 -0
- package/models/components/responsemcpcallargumentsdeltastreamevent.js.map +1 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.d.ts +61 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.d.ts.map +1 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.js +89 -0
- package/models/components/responsemcpcallargumentsdonestreamevent.js.map +1 -0
- package/models/components/responseoutputitemstreamevent.d.ts +73 -0
- package/models/components/responseoutputitemstreamevent.d.ts.map +1 -0
- package/models/components/responseoutputitemstreamevent.js +96 -0
- package/models/components/responseoutputitemstreamevent.js.map +1 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.d.ts +71 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.js +93 -0
- package/models/components/responseoutputtextannotationaddedstreamevent.js.map +1 -0
- package/models/components/responseoutputtextdeltastreamevent.d.ts +75 -0
- package/models/components/responseoutputtextdeltastreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextdeltastreamevent.js +92 -0
- package/models/components/responseoutputtextdeltastreamevent.js.map +1 -0
- package/models/components/responseoutputtextdonestreamevent.d.ts +71 -0
- package/models/components/responseoutputtextdonestreamevent.d.ts.map +1 -0
- package/models/components/responseoutputtextdonestreamevent.js +91 -0
- package/models/components/responseoutputtextdonestreamevent.js.map +1 -0
- package/models/components/responsereasoningdeltastreamevent.d.ts +83 -0
- package/models/components/responsereasoningdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningdeltastreamevent.js +101 -0
- package/models/components/responsereasoningdeltastreamevent.js.map +1 -0
- package/models/components/responsereasoningdonestreamevent.d.ts +79 -0
- package/models/components/responsereasoningdonestreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningdonestreamevent.js +100 -0
- package/models/components/responsereasoningdonestreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarypartstreamevent.d.ts +81 -0
- package/models/components/responsereasoningsummarypartstreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarypartstreamevent.js +102 -0
- package/models/components/responsereasoningsummarypartstreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts +69 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.js +92 -0
- package/models/components/responsereasoningsummarytextdeltastreamevent.js.map +1 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.d.ts +65 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.d.ts.map +1 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.js +91 -0
- package/models/components/responsereasoningsummarytextdonestreamevent.js.map +1 -0
- package/models/components/responserefusaldeltastreamevent.d.ts +65 -0
- package/models/components/responserefusaldeltastreamevent.d.ts.map +1 -0
- package/models/components/responserefusaldeltastreamevent.js +90 -0
- package/models/components/responserefusaldeltastreamevent.js.map +1 -0
- package/models/components/responserefusaldonestreamevent.d.ts +65 -0
- package/models/components/responserefusaldonestreamevent.d.ts.map +1 -0
- package/models/components/responserefusaldonestreamevent.js +90 -0
- package/models/components/responserefusaldonestreamevent.js.map +1 -0
- package/models/operations/createagentrequest.d.ts +298 -4
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +163 -9
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +81 -4
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +45 -7
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +225 -12
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +124 -13
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +476 -61
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +332 -60
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/deploymentgetconfig.d.ts +70 -4
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +43 -8
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +74 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +43 -8
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/getallprompts.d.ts +140 -4
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +79 -6
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getoneprompt.d.ts +140 -4
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +79 -6
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +140 -4
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +78 -6
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listagents.d.ts +140 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +79 -3
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listknowledgebases.d.ts +3 -0
- package/models/operations/listknowledgebases.d.ts.map +1 -1
- package/models/operations/listknowledgebases.js +1 -1
- package/models/operations/listknowledgebases.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +140 -4
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +79 -6
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +140 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +81 -2
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.d.ts +154 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +80 -5
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +154 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +82 -4
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +298 -4
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +162 -9
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateprompt.d.ts +225 -12
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +125 -14
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +3 -3
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +23 -0
- package/src/models/components/modelmetadata.ts +6 -0
- package/src/models/components/publicresponseresource.ts +196 -0
- package/src/models/components/reasoning.ts +50 -4
- package/src/models/components/reasoningparam.ts +48 -4
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/responsecodeinterpretercodedeltastreamevent.ts +149 -0
- package/src/models/components/responsecodeinterpretercodedonestreamevent.ts +146 -0
- package/src/models/components/responsecontentpartstreamevent.ts +157 -0
- package/src/models/components/responseerrorstreamevent.ts +116 -0
- package/src/models/components/responsefunctioncallargumentsdeltastreamevent.ts +153 -0
- package/src/models/components/responsefunctioncallargumentsdonestreamevent.ts +148 -0
- package/src/models/components/responsehostedtoolcallstreamevent.ts +186 -0
- package/src/models/components/responseimagegenerationpartialimagestreamevent.ts +156 -0
- package/src/models/components/responselifecyclestreamevent.ts +145 -0
- package/src/models/components/responsemcpcallargumentsdeltastreamevent.ts +145 -0
- package/src/models/components/responsemcpcallargumentsdonestreamevent.ts +145 -0
- package/src/models/components/responseoutputitemstreamevent.ts +144 -0
- package/src/models/components/responseoutputtextannotationaddedstreamevent.ts +160 -0
- package/src/models/components/responseoutputtextdeltastreamevent.ts +149 -0
- package/src/models/components/responseoutputtextdonestreamevent.ts +143 -0
- package/src/models/components/responsereasoningdeltastreamevent.ts +164 -0
- package/src/models/components/responsereasoningdonestreamevent.ts +159 -0
- package/src/models/components/responsereasoningsummarypartstreamevent.ts +171 -0
- package/src/models/components/responsereasoningsummarytextdeltastreamevent.ts +159 -0
- package/src/models/components/responsereasoningsummarytextdonestreamevent.ts +154 -0
- package/src/models/components/responserefusaldeltastreamevent.ts +137 -0
- package/src/models/components/responserefusaldonestreamevent.ts +137 -0
- package/src/models/operations/createagentrequest.ts +460 -8
- package/src/models/operations/createchatcompletion.ts +129 -10
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +356 -27
- package/src/models/operations/createrouterresponse.ts +1000 -109
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/deploymentgetconfig.ts +105 -8
- package/src/models/operations/deployments.ts +113 -16
- package/src/models/operations/getallprompts.ts +210 -8
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getoneprompt.ts +208 -8
- package/src/models/operations/getpromptversion.ts +212 -8
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listagents.ts +215 -0
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listknowledgebases.ts +4 -1
- package/src/models/operations/listpromptversions.ts +212 -8
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +222 -0
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +236 -1
- package/src/models/operations/streamrunagent.ts +242 -1
- package/src/models/operations/updateagent.ts +464 -9
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateprompt.ts +356 -27
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +2 -2
|
@@ -11,10 +11,131 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
11
11
|
import * as components from "../components/index.js";
|
|
12
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
13
|
|
|
14
|
+
/**
|
|
15
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
*
|
|
19
|
+
* - `5m`: 5 minutes
|
|
20
|
+
* - `1h`: 1 hour
|
|
21
|
+
*
|
|
22
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
23
|
+
*/
|
|
24
|
+
export const CreateRouterResponseTtl = {
|
|
25
|
+
Fivem: "5m",
|
|
26
|
+
Oneh: "1h",
|
|
27
|
+
} as const;
|
|
28
|
+
/**
|
|
29
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
*
|
|
33
|
+
* - `5m`: 5 minutes
|
|
34
|
+
* - `1h`: 1 hour
|
|
35
|
+
*
|
|
36
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
37
|
+
*/
|
|
38
|
+
export type CreateRouterResponseTtl = ClosedEnum<
|
|
39
|
+
typeof CreateRouterResponseTtl
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
44
|
+
*/
|
|
45
|
+
export const CreateRouterResponseType = {
|
|
46
|
+
Ephemeral: "ephemeral",
|
|
47
|
+
} as const;
|
|
48
|
+
/**
|
|
49
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
50
|
+
*/
|
|
51
|
+
export type CreateRouterResponseType = ClosedEnum<
|
|
52
|
+
typeof CreateRouterResponseType
|
|
53
|
+
>;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
|
|
57
|
+
*/
|
|
58
|
+
export type CreateRouterResponseCacheControl = {
|
|
59
|
+
/**
|
|
60
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
61
|
+
*
|
|
62
|
+
* @remarks
|
|
63
|
+
*
|
|
64
|
+
* - `5m`: 5 minutes
|
|
65
|
+
* - `1h`: 1 hour
|
|
66
|
+
*
|
|
67
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
68
|
+
*/
|
|
69
|
+
ttl?: CreateRouterResponseTtl | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Create a cache control breakpoint. Accepts only the value "ephemeral".
|
|
72
|
+
*/
|
|
73
|
+
type: CreateRouterResponseType;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
*
|
|
81
|
+
* - `5m`: 5 minutes
|
|
82
|
+
* - `1h`: 1 hour
|
|
83
|
+
*
|
|
84
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
85
|
+
*/
|
|
86
|
+
export const CreateRouterResponse2ResponsesRequestTtl = {
|
|
87
|
+
Fivem: "5m",
|
|
88
|
+
Oneh: "1h",
|
|
89
|
+
} as const;
|
|
90
|
+
/**
|
|
91
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
92
|
+
*
|
|
93
|
+
* @remarks
|
|
94
|
+
*
|
|
95
|
+
* - `5m`: 5 minutes
|
|
96
|
+
* - `1h`: 1 hour
|
|
97
|
+
*
|
|
98
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
99
|
+
*/
|
|
100
|
+
export type CreateRouterResponse2ResponsesRequestTtl = ClosedEnum<
|
|
101
|
+
typeof CreateRouterResponse2ResponsesRequestTtl
|
|
102
|
+
>;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
106
|
+
*/
|
|
107
|
+
export const CreateRouterResponse2ResponsesRequestRequestBodyInputType = {
|
|
108
|
+
Ephemeral: "ephemeral",
|
|
109
|
+
} as const;
|
|
110
|
+
/**
|
|
111
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
112
|
+
*/
|
|
113
|
+
export type CreateRouterResponse2ResponsesRequestRequestBodyInputType =
|
|
114
|
+
ClosedEnum<typeof CreateRouterResponse2ResponsesRequestRequestBodyInputType>;
|
|
115
|
+
|
|
116
|
+
export type CreateRouterResponse2ResponsesRequestCacheControl = {
|
|
117
|
+
/**
|
|
118
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
119
|
+
*
|
|
120
|
+
* @remarks
|
|
121
|
+
*
|
|
122
|
+
* - `5m`: 5 minutes
|
|
123
|
+
* - `1h`: 1 hour
|
|
124
|
+
*
|
|
125
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
126
|
+
*/
|
|
127
|
+
ttl?: CreateRouterResponse2ResponsesRequestTtl | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
130
|
+
*/
|
|
131
|
+
type: CreateRouterResponse2ResponsesRequestRequestBodyInputType;
|
|
132
|
+
};
|
|
133
|
+
|
|
14
134
|
/**
|
|
15
135
|
* A file content part. Provide file_id, file_data (base64), or file_url.
|
|
16
136
|
*/
|
|
17
137
|
export type TwoFile = {
|
|
138
|
+
cacheControl?: CreateRouterResponse2ResponsesRequestCacheControl | undefined;
|
|
18
139
|
/**
|
|
19
140
|
* Base64-encoded file content.
|
|
20
141
|
*/
|
|
@@ -38,6 +159,65 @@ export type TwoFile = {
|
|
|
38
159
|
type: "input_file";
|
|
39
160
|
};
|
|
40
161
|
|
|
162
|
+
/**
|
|
163
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
164
|
+
*
|
|
165
|
+
* @remarks
|
|
166
|
+
*
|
|
167
|
+
* - `5m`: 5 minutes
|
|
168
|
+
* - `1h`: 1 hour
|
|
169
|
+
*
|
|
170
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
171
|
+
*/
|
|
172
|
+
export const CreateRouterResponse2ResponsesTtl = {
|
|
173
|
+
Fivem: "5m",
|
|
174
|
+
Oneh: "1h",
|
|
175
|
+
} as const;
|
|
176
|
+
/**
|
|
177
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
178
|
+
*
|
|
179
|
+
* @remarks
|
|
180
|
+
*
|
|
181
|
+
* - `5m`: 5 minutes
|
|
182
|
+
* - `1h`: 1 hour
|
|
183
|
+
*
|
|
184
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
185
|
+
*/
|
|
186
|
+
export type CreateRouterResponse2ResponsesTtl = ClosedEnum<
|
|
187
|
+
typeof CreateRouterResponse2ResponsesTtl
|
|
188
|
+
>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
192
|
+
*/
|
|
193
|
+
export const CreateRouterResponse2ResponsesRequestType = {
|
|
194
|
+
Ephemeral: "ephemeral",
|
|
195
|
+
} as const;
|
|
196
|
+
/**
|
|
197
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
198
|
+
*/
|
|
199
|
+
export type CreateRouterResponse2ResponsesRequestType = ClosedEnum<
|
|
200
|
+
typeof CreateRouterResponse2ResponsesRequestType
|
|
201
|
+
>;
|
|
202
|
+
|
|
203
|
+
export type CreateRouterResponse2ResponsesCacheControl = {
|
|
204
|
+
/**
|
|
205
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
206
|
+
*
|
|
207
|
+
* @remarks
|
|
208
|
+
*
|
|
209
|
+
* - `5m`: 5 minutes
|
|
210
|
+
* - `1h`: 1 hour
|
|
211
|
+
*
|
|
212
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
213
|
+
*/
|
|
214
|
+
ttl?: CreateRouterResponse2ResponsesTtl | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
217
|
+
*/
|
|
218
|
+
type: CreateRouterResponse2ResponsesRequestType;
|
|
219
|
+
};
|
|
220
|
+
|
|
41
221
|
/**
|
|
42
222
|
* The detail level for image understanding.
|
|
43
223
|
*/
|
|
@@ -55,6 +235,7 @@ export type Detail = ClosedEnum<typeof Detail>;
|
|
|
55
235
|
* An image content part.
|
|
56
236
|
*/
|
|
57
237
|
export type Image = {
|
|
238
|
+
cacheControl?: CreateRouterResponse2ResponsesCacheControl | undefined;
|
|
58
239
|
/**
|
|
59
240
|
* The detail level for image understanding.
|
|
60
241
|
*/
|
|
@@ -70,10 +251,70 @@ export type Image = {
|
|
|
70
251
|
type: "input_image";
|
|
71
252
|
};
|
|
72
253
|
|
|
254
|
+
/**
|
|
255
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
256
|
+
*
|
|
257
|
+
* @remarks
|
|
258
|
+
*
|
|
259
|
+
* - `5m`: 5 minutes
|
|
260
|
+
* - `1h`: 1 hour
|
|
261
|
+
*
|
|
262
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
263
|
+
*/
|
|
264
|
+
export const CreateRouterResponse2Ttl = {
|
|
265
|
+
Fivem: "5m",
|
|
266
|
+
Oneh: "1h",
|
|
267
|
+
} as const;
|
|
268
|
+
/**
|
|
269
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
270
|
+
*
|
|
271
|
+
* @remarks
|
|
272
|
+
*
|
|
273
|
+
* - `5m`: 5 minutes
|
|
274
|
+
* - `1h`: 1 hour
|
|
275
|
+
*
|
|
276
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
277
|
+
*/
|
|
278
|
+
export type CreateRouterResponse2Ttl = ClosedEnum<
|
|
279
|
+
typeof CreateRouterResponse2Ttl
|
|
280
|
+
>;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
284
|
+
*/
|
|
285
|
+
export const CreateRouterResponse2Type = {
|
|
286
|
+
Ephemeral: "ephemeral",
|
|
287
|
+
} as const;
|
|
288
|
+
/**
|
|
289
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
290
|
+
*/
|
|
291
|
+
export type CreateRouterResponse2Type = ClosedEnum<
|
|
292
|
+
typeof CreateRouterResponse2Type
|
|
293
|
+
>;
|
|
294
|
+
|
|
295
|
+
export type CreateRouterResponse2CacheControl = {
|
|
296
|
+
/**
|
|
297
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
298
|
+
*
|
|
299
|
+
* @remarks
|
|
300
|
+
*
|
|
301
|
+
* - `5m`: 5 minutes
|
|
302
|
+
* - `1h`: 1 hour
|
|
303
|
+
*
|
|
304
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
305
|
+
*/
|
|
306
|
+
ttl?: CreateRouterResponse2Ttl | undefined;
|
|
307
|
+
/**
|
|
308
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
309
|
+
*/
|
|
310
|
+
type: CreateRouterResponse2Type;
|
|
311
|
+
};
|
|
312
|
+
|
|
73
313
|
/**
|
|
74
314
|
* A text content part.
|
|
75
315
|
*/
|
|
76
316
|
export type TwoText = {
|
|
317
|
+
cacheControl?: CreateRouterResponse2CacheControl | undefined;
|
|
77
318
|
/**
|
|
78
319
|
* The text content.
|
|
79
320
|
*/
|
|
@@ -193,11 +434,17 @@ export type PlainText = {
|
|
|
193
434
|
*/
|
|
194
435
|
export type CreateRouterResponseFormat = PlainText | FormatJSONSchema;
|
|
195
436
|
|
|
437
|
+
/**
|
|
438
|
+
* Controls the verbosity of the model output.
|
|
439
|
+
*/
|
|
196
440
|
export const Verbosity = {
|
|
197
441
|
Low: "low",
|
|
198
442
|
Medium: "medium",
|
|
199
443
|
High: "high",
|
|
200
444
|
} as const;
|
|
445
|
+
/**
|
|
446
|
+
* Controls the verbosity of the model output.
|
|
447
|
+
*/
|
|
201
448
|
export type Verbosity = ClosedEnum<typeof Verbosity>;
|
|
202
449
|
|
|
203
450
|
/**
|
|
@@ -208,6 +455,9 @@ export type CreateRouterResponseText = {
|
|
|
208
455
|
* The output format: plain text or structured JSON schema.
|
|
209
456
|
*/
|
|
210
457
|
format?: PlainText | FormatJSONSchema | undefined;
|
|
458
|
+
/**
|
|
459
|
+
* Controls the verbosity of the model output.
|
|
460
|
+
*/
|
|
211
461
|
verbosity?: Verbosity | undefined;
|
|
212
462
|
};
|
|
213
463
|
|
|
@@ -291,7 +541,7 @@ export type ToolsMCPTool = {
|
|
|
291
541
|
/**
|
|
292
542
|
* The orq.ai tool type.
|
|
293
543
|
*/
|
|
294
|
-
export const
|
|
544
|
+
export const CreateRouterResponseToolsResponsesType = {
|
|
295
545
|
OrqCurrentDate: "orq:current_date",
|
|
296
546
|
OrqGoogleSearch: "orq:google_search",
|
|
297
547
|
OrqWebScraper: "orq:web_scraper",
|
|
@@ -302,8 +552,8 @@ export const CreateRouterResponseToolsType = {
|
|
|
302
552
|
/**
|
|
303
553
|
* The orq.ai tool type.
|
|
304
554
|
*/
|
|
305
|
-
export type
|
|
306
|
-
typeof
|
|
555
|
+
export type CreateRouterResponseToolsResponsesType = ClosedEnum<
|
|
556
|
+
typeof CreateRouterResponseToolsResponsesType
|
|
307
557
|
>;
|
|
308
558
|
|
|
309
559
|
/**
|
|
@@ -317,13 +567,69 @@ export type OrqAiTool = {
|
|
|
317
567
|
/**
|
|
318
568
|
* The orq.ai tool type.
|
|
319
569
|
*/
|
|
320
|
-
type:
|
|
570
|
+
type: CreateRouterResponseToolsResponsesType;
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
575
|
+
*
|
|
576
|
+
* @remarks
|
|
577
|
+
*
|
|
578
|
+
* - `5m`: 5 minutes
|
|
579
|
+
* - `1h`: 1 hour
|
|
580
|
+
*
|
|
581
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
582
|
+
*/
|
|
583
|
+
export const ToolsTtl = {
|
|
584
|
+
Fivem: "5m",
|
|
585
|
+
Oneh: "1h",
|
|
586
|
+
} as const;
|
|
587
|
+
/**
|
|
588
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
589
|
+
*
|
|
590
|
+
* @remarks
|
|
591
|
+
*
|
|
592
|
+
* - `5m`: 5 minutes
|
|
593
|
+
* - `1h`: 1 hour
|
|
594
|
+
*
|
|
595
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
596
|
+
*/
|
|
597
|
+
export type ToolsTtl = ClosedEnum<typeof ToolsTtl>;
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
601
|
+
*/
|
|
602
|
+
export const ToolsType = {
|
|
603
|
+
Ephemeral: "ephemeral",
|
|
604
|
+
} as const;
|
|
605
|
+
/**
|
|
606
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
607
|
+
*/
|
|
608
|
+
export type ToolsType = ClosedEnum<typeof ToolsType>;
|
|
609
|
+
|
|
610
|
+
export type ToolsCacheControl = {
|
|
611
|
+
/**
|
|
612
|
+
* The time-to-live for the cache control breakpoint. This may be one of the following values:
|
|
613
|
+
*
|
|
614
|
+
* @remarks
|
|
615
|
+
*
|
|
616
|
+
* - `5m`: 5 minutes
|
|
617
|
+
* - `1h`: 1 hour
|
|
618
|
+
*
|
|
619
|
+
* Defaults to `5m`. Only supported by Anthropic Claude models.
|
|
620
|
+
*/
|
|
621
|
+
ttl?: ToolsTtl | undefined;
|
|
622
|
+
/**
|
|
623
|
+
* Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
|
|
624
|
+
*/
|
|
625
|
+
type: ToolsType;
|
|
321
626
|
};
|
|
322
627
|
|
|
323
628
|
/**
|
|
324
629
|
* A function tool the model can call.
|
|
325
630
|
*/
|
|
326
631
|
export type ToolsFunction = {
|
|
632
|
+
cacheControl?: ToolsCacheControl | undefined;
|
|
327
633
|
/**
|
|
328
634
|
* A description of what the function does.
|
|
329
635
|
*/
|
|
@@ -357,6 +663,10 @@ export type CreateRouterResponseTools =
|
|
|
357
663
|
| ToolsMCPTool;
|
|
358
664
|
|
|
359
665
|
export type CreateRouterResponseRequestBody = {
|
|
666
|
+
/**
|
|
667
|
+
* Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
|
|
668
|
+
*/
|
|
669
|
+
cacheControl?: CreateRouterResponseCacheControl | undefined;
|
|
360
670
|
conversation?: components.ConversationParam | undefined;
|
|
361
671
|
/**
|
|
362
672
|
* Fallback models to try if the primary model fails. Each entry specifies a model in provider/model format.
|
|
@@ -475,62 +785,107 @@ export type CreateRouterResponseRequestBody = {
|
|
|
475
785
|
};
|
|
476
786
|
|
|
477
787
|
/**
|
|
478
|
-
* The event
|
|
788
|
+
* A server-sent event in the response stream. The frame's `event` field selects the payload shape carried in `data`.
|
|
479
789
|
*/
|
|
480
|
-
export
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
790
|
+
export type CreateRouterResponseResponsesResponseBody =
|
|
791
|
+
| components.ResponseErrorStreamEvent
|
|
792
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
793
|
+
event: "response.code_interpreter_call.completed";
|
|
794
|
+
})
|
|
795
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
796
|
+
event: "response.code_interpreter_call.in_progress";
|
|
797
|
+
})
|
|
798
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
799
|
+
event: "response.code_interpreter_call.interpreting";
|
|
800
|
+
})
|
|
801
|
+
| components.ResponseCodeInterpreterCodeDeltaStreamEvent
|
|
802
|
+
| components.ResponseCodeInterpreterCodeDoneStreamEvent
|
|
803
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.completed" })
|
|
804
|
+
| (components.ResponseContentPartStreamEvent & {
|
|
805
|
+
event: "response.content_part.added";
|
|
806
|
+
})
|
|
807
|
+
| (components.ResponseContentPartStreamEvent & {
|
|
808
|
+
event: "response.content_part.done";
|
|
809
|
+
})
|
|
810
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.created" })
|
|
811
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.failed" })
|
|
812
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
813
|
+
event: "response.file_search_call.completed";
|
|
814
|
+
})
|
|
815
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
816
|
+
event: "response.file_search_call.in_progress";
|
|
817
|
+
})
|
|
818
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
819
|
+
event: "response.file_search_call.searching";
|
|
820
|
+
})
|
|
821
|
+
| components.ResponseFunctionCallArgumentsDeltaStreamEvent
|
|
822
|
+
| components.ResponseFunctionCallArgumentsDoneStreamEvent
|
|
823
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
824
|
+
event: "response.image_generation_call.completed";
|
|
825
|
+
})
|
|
826
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
827
|
+
event: "response.image_generation_call.generating";
|
|
828
|
+
})
|
|
829
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
830
|
+
event: "response.image_generation_call.in_progress";
|
|
831
|
+
})
|
|
832
|
+
| components.ResponseImageGenerationPartialImageStreamEvent
|
|
833
|
+
| (components.ResponseLifecycleStreamEvent & {
|
|
834
|
+
event: "response.in_progress";
|
|
835
|
+
})
|
|
836
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.incomplete" })
|
|
837
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
838
|
+
event: "response.mcp_call.completed";
|
|
839
|
+
})
|
|
840
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
841
|
+
event: "response.mcp_call.failed";
|
|
842
|
+
})
|
|
843
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
844
|
+
event: "response.mcp_call.in_progress";
|
|
845
|
+
})
|
|
846
|
+
| components.ResponseMcpCallArgumentsDeltaStreamEvent
|
|
847
|
+
| components.ResponseMcpCallArgumentsDoneStreamEvent
|
|
848
|
+
| (components.ResponseOutputItemStreamEvent & {
|
|
849
|
+
event: "response.output_item.added";
|
|
850
|
+
})
|
|
851
|
+
| (components.ResponseOutputItemStreamEvent & {
|
|
852
|
+
event: "response.output_item.done";
|
|
853
|
+
})
|
|
854
|
+
| components.ResponseOutputTextAnnotationAddedStreamEvent
|
|
855
|
+
| components.ResponseOutputTextDeltaStreamEvent
|
|
856
|
+
| components.ResponseOutputTextDoneStreamEvent
|
|
857
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.queued" })
|
|
858
|
+
| (components.ResponseReasoningDeltaStreamEvent & {
|
|
859
|
+
event: "response.reasoning.delta";
|
|
860
|
+
})
|
|
861
|
+
| (components.ResponseReasoningDoneStreamEvent & {
|
|
862
|
+
event: "response.reasoning.done";
|
|
863
|
+
})
|
|
864
|
+
| (components.ResponseReasoningSummaryPartStreamEvent & {
|
|
865
|
+
event: "response.reasoning_summary_part.added";
|
|
866
|
+
})
|
|
867
|
+
| (components.ResponseReasoningSummaryPartStreamEvent & {
|
|
868
|
+
event: "response.reasoning_summary_part.done";
|
|
869
|
+
})
|
|
870
|
+
| components.ResponseReasoningSummaryTextDeltaStreamEvent
|
|
871
|
+
| components.ResponseReasoningSummaryTextDoneStreamEvent
|
|
872
|
+
| (components.ResponseReasoningDeltaStreamEvent & {
|
|
873
|
+
event: "response.reasoning_text.delta";
|
|
874
|
+
})
|
|
875
|
+
| (components.ResponseReasoningDoneStreamEvent & {
|
|
876
|
+
event: "response.reasoning_text.done";
|
|
877
|
+
})
|
|
878
|
+
| components.ResponseRefusalDeltaStreamEvent
|
|
879
|
+
| components.ResponseRefusalDoneStreamEvent
|
|
880
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
881
|
+
event: "response.web_search_call.completed";
|
|
882
|
+
})
|
|
883
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
884
|
+
event: "response.web_search_call.in_progress";
|
|
885
|
+
})
|
|
886
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
887
|
+
event: "response.web_search_call.searching";
|
|
888
|
+
});
|
|
534
889
|
|
|
535
890
|
export const ServiceTier = {
|
|
536
891
|
Auto: "auto",
|
|
@@ -624,10 +979,192 @@ export type CreateRouterResponseResponseBody = {
|
|
|
624
979
|
|
|
625
980
|
export type CreateRouterResponseResponse =
|
|
626
981
|
| CreateRouterResponseResponseBody
|
|
627
|
-
| EventStream<
|
|
982
|
+
| EventStream<
|
|
983
|
+
| components.ResponseErrorStreamEvent
|
|
984
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
985
|
+
event: "response.code_interpreter_call.completed";
|
|
986
|
+
})
|
|
987
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
988
|
+
event: "response.code_interpreter_call.in_progress";
|
|
989
|
+
})
|
|
990
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
991
|
+
event: "response.code_interpreter_call.interpreting";
|
|
992
|
+
})
|
|
993
|
+
| components.ResponseCodeInterpreterCodeDeltaStreamEvent
|
|
994
|
+
| components.ResponseCodeInterpreterCodeDoneStreamEvent
|
|
995
|
+
| (components.ResponseLifecycleStreamEvent & {
|
|
996
|
+
event: "response.completed";
|
|
997
|
+
})
|
|
998
|
+
| (components.ResponseContentPartStreamEvent & {
|
|
999
|
+
event: "response.content_part.added";
|
|
1000
|
+
})
|
|
1001
|
+
| (components.ResponseContentPartStreamEvent & {
|
|
1002
|
+
event: "response.content_part.done";
|
|
1003
|
+
})
|
|
1004
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.created" })
|
|
1005
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.failed" })
|
|
1006
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1007
|
+
event: "response.file_search_call.completed";
|
|
1008
|
+
})
|
|
1009
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1010
|
+
event: "response.file_search_call.in_progress";
|
|
1011
|
+
})
|
|
1012
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1013
|
+
event: "response.file_search_call.searching";
|
|
1014
|
+
})
|
|
1015
|
+
| components.ResponseFunctionCallArgumentsDeltaStreamEvent
|
|
1016
|
+
| components.ResponseFunctionCallArgumentsDoneStreamEvent
|
|
1017
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1018
|
+
event: "response.image_generation_call.completed";
|
|
1019
|
+
})
|
|
1020
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1021
|
+
event: "response.image_generation_call.generating";
|
|
1022
|
+
})
|
|
1023
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1024
|
+
event: "response.image_generation_call.in_progress";
|
|
1025
|
+
})
|
|
1026
|
+
| components.ResponseImageGenerationPartialImageStreamEvent
|
|
1027
|
+
| (components.ResponseLifecycleStreamEvent & {
|
|
1028
|
+
event: "response.in_progress";
|
|
1029
|
+
})
|
|
1030
|
+
| (components.ResponseLifecycleStreamEvent & {
|
|
1031
|
+
event: "response.incomplete";
|
|
1032
|
+
})
|
|
1033
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1034
|
+
event: "response.mcp_call.completed";
|
|
1035
|
+
})
|
|
1036
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1037
|
+
event: "response.mcp_call.failed";
|
|
1038
|
+
})
|
|
1039
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1040
|
+
event: "response.mcp_call.in_progress";
|
|
1041
|
+
})
|
|
1042
|
+
| components.ResponseMcpCallArgumentsDeltaStreamEvent
|
|
1043
|
+
| components.ResponseMcpCallArgumentsDoneStreamEvent
|
|
1044
|
+
| (components.ResponseOutputItemStreamEvent & {
|
|
1045
|
+
event: "response.output_item.added";
|
|
1046
|
+
})
|
|
1047
|
+
| (components.ResponseOutputItemStreamEvent & {
|
|
1048
|
+
event: "response.output_item.done";
|
|
1049
|
+
})
|
|
1050
|
+
| components.ResponseOutputTextAnnotationAddedStreamEvent
|
|
1051
|
+
| components.ResponseOutputTextDeltaStreamEvent
|
|
1052
|
+
| components.ResponseOutputTextDoneStreamEvent
|
|
1053
|
+
| (components.ResponseLifecycleStreamEvent & { event: "response.queued" })
|
|
1054
|
+
| (components.ResponseReasoningDeltaStreamEvent & {
|
|
1055
|
+
event: "response.reasoning.delta";
|
|
1056
|
+
})
|
|
1057
|
+
| (components.ResponseReasoningDoneStreamEvent & {
|
|
1058
|
+
event: "response.reasoning.done";
|
|
1059
|
+
})
|
|
1060
|
+
| (components.ResponseReasoningSummaryPartStreamEvent & {
|
|
1061
|
+
event: "response.reasoning_summary_part.added";
|
|
1062
|
+
})
|
|
1063
|
+
| (components.ResponseReasoningSummaryPartStreamEvent & {
|
|
1064
|
+
event: "response.reasoning_summary_part.done";
|
|
1065
|
+
})
|
|
1066
|
+
| components.ResponseReasoningSummaryTextDeltaStreamEvent
|
|
1067
|
+
| components.ResponseReasoningSummaryTextDoneStreamEvent
|
|
1068
|
+
| (components.ResponseReasoningDeltaStreamEvent & {
|
|
1069
|
+
event: "response.reasoning_text.delta";
|
|
1070
|
+
})
|
|
1071
|
+
| (components.ResponseReasoningDoneStreamEvent & {
|
|
1072
|
+
event: "response.reasoning_text.done";
|
|
1073
|
+
})
|
|
1074
|
+
| components.ResponseRefusalDeltaStreamEvent
|
|
1075
|
+
| components.ResponseRefusalDoneStreamEvent
|
|
1076
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1077
|
+
event: "response.web_search_call.completed";
|
|
1078
|
+
})
|
|
1079
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1080
|
+
event: "response.web_search_call.in_progress";
|
|
1081
|
+
})
|
|
1082
|
+
| (components.ResponseHostedToolCallStreamEvent & {
|
|
1083
|
+
event: "response.web_search_call.searching";
|
|
1084
|
+
})
|
|
1085
|
+
>;
|
|
1086
|
+
|
|
1087
|
+
/** @internal */
|
|
1088
|
+
export const CreateRouterResponseTtl$outboundSchema: z.ZodNativeEnum<
|
|
1089
|
+
typeof CreateRouterResponseTtl
|
|
1090
|
+
> = z.nativeEnum(CreateRouterResponseTtl);
|
|
1091
|
+
|
|
1092
|
+
/** @internal */
|
|
1093
|
+
export const CreateRouterResponseType$outboundSchema: z.ZodNativeEnum<
|
|
1094
|
+
typeof CreateRouterResponseType
|
|
1095
|
+
> = z.nativeEnum(CreateRouterResponseType);
|
|
1096
|
+
|
|
1097
|
+
/** @internal */
|
|
1098
|
+
export type CreateRouterResponseCacheControl$Outbound = {
|
|
1099
|
+
ttl: string;
|
|
1100
|
+
type: string;
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
/** @internal */
|
|
1104
|
+
export const CreateRouterResponseCacheControl$outboundSchema: z.ZodType<
|
|
1105
|
+
CreateRouterResponseCacheControl$Outbound,
|
|
1106
|
+
z.ZodTypeDef,
|
|
1107
|
+
CreateRouterResponseCacheControl
|
|
1108
|
+
> = z.object({
|
|
1109
|
+
ttl: CreateRouterResponseTtl$outboundSchema.default("5m"),
|
|
1110
|
+
type: CreateRouterResponseType$outboundSchema,
|
|
1111
|
+
});
|
|
1112
|
+
|
|
1113
|
+
export function createRouterResponseCacheControlToJSON(
|
|
1114
|
+
createRouterResponseCacheControl: CreateRouterResponseCacheControl,
|
|
1115
|
+
): string {
|
|
1116
|
+
return JSON.stringify(
|
|
1117
|
+
CreateRouterResponseCacheControl$outboundSchema.parse(
|
|
1118
|
+
createRouterResponseCacheControl,
|
|
1119
|
+
),
|
|
1120
|
+
);
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/** @internal */
|
|
1124
|
+
export const CreateRouterResponse2ResponsesRequestTtl$outboundSchema:
|
|
1125
|
+
z.ZodNativeEnum<typeof CreateRouterResponse2ResponsesRequestTtl> = z
|
|
1126
|
+
.nativeEnum(CreateRouterResponse2ResponsesRequestTtl);
|
|
1127
|
+
|
|
1128
|
+
/** @internal */
|
|
1129
|
+
export const CreateRouterResponse2ResponsesRequestRequestBodyInputType$outboundSchema:
|
|
1130
|
+
z.ZodNativeEnum<
|
|
1131
|
+
typeof CreateRouterResponse2ResponsesRequestRequestBodyInputType
|
|
1132
|
+
> = z.nativeEnum(CreateRouterResponse2ResponsesRequestRequestBodyInputType);
|
|
1133
|
+
|
|
1134
|
+
/** @internal */
|
|
1135
|
+
export type CreateRouterResponse2ResponsesRequestCacheControl$Outbound = {
|
|
1136
|
+
ttl: string;
|
|
1137
|
+
type: string;
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
/** @internal */
|
|
1141
|
+
export const CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema:
|
|
1142
|
+
z.ZodType<
|
|
1143
|
+
CreateRouterResponse2ResponsesRequestCacheControl$Outbound,
|
|
1144
|
+
z.ZodTypeDef,
|
|
1145
|
+
CreateRouterResponse2ResponsesRequestCacheControl
|
|
1146
|
+
> = z.object({
|
|
1147
|
+
ttl: CreateRouterResponse2ResponsesRequestTtl$outboundSchema.default("5m"),
|
|
1148
|
+
type:
|
|
1149
|
+
CreateRouterResponse2ResponsesRequestRequestBodyInputType$outboundSchema,
|
|
1150
|
+
});
|
|
1151
|
+
|
|
1152
|
+
export function createRouterResponse2ResponsesRequestCacheControlToJSON(
|
|
1153
|
+
createRouterResponse2ResponsesRequestCacheControl:
|
|
1154
|
+
CreateRouterResponse2ResponsesRequestCacheControl,
|
|
1155
|
+
): string {
|
|
1156
|
+
return JSON.stringify(
|
|
1157
|
+
CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema.parse(
|
|
1158
|
+
createRouterResponse2ResponsesRequestCacheControl,
|
|
1159
|
+
),
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
628
1162
|
|
|
629
1163
|
/** @internal */
|
|
630
1164
|
export type TwoFile$Outbound = {
|
|
1165
|
+
cache_control?:
|
|
1166
|
+
| CreateRouterResponse2ResponsesRequestCacheControl$Outbound
|
|
1167
|
+
| undefined;
|
|
631
1168
|
file_data?: string | undefined;
|
|
632
1169
|
file_id?: string | undefined;
|
|
633
1170
|
file_url?: string | undefined;
|
|
@@ -642,6 +1179,9 @@ export const TwoFile$outboundSchema: z.ZodType<
|
|
|
642
1179
|
z.ZodTypeDef,
|
|
643
1180
|
TwoFile
|
|
644
1181
|
> = z.object({
|
|
1182
|
+
cacheControl: z.lazy(() =>
|
|
1183
|
+
CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema
|
|
1184
|
+
).optional(),
|
|
645
1185
|
fileData: z.string().optional(),
|
|
646
1186
|
fileId: z.string().optional(),
|
|
647
1187
|
fileUrl: z.string().optional(),
|
|
@@ -650,6 +1190,7 @@ export const TwoFile$outboundSchema: z.ZodType<
|
|
|
650
1190
|
type: z.literal("input_file"),
|
|
651
1191
|
}).transform((v) => {
|
|
652
1192
|
return remap$(v, {
|
|
1193
|
+
cacheControl: "cache_control",
|
|
653
1194
|
fileData: "file_data",
|
|
654
1195
|
fileId: "file_id",
|
|
655
1196
|
fileUrl: "file_url",
|
|
@@ -661,12 +1202,53 @@ export function twoFileToJSON(twoFile: TwoFile): string {
|
|
|
661
1202
|
return JSON.stringify(TwoFile$outboundSchema.parse(twoFile));
|
|
662
1203
|
}
|
|
663
1204
|
|
|
1205
|
+
/** @internal */
|
|
1206
|
+
export const CreateRouterResponse2ResponsesTtl$outboundSchema: z.ZodNativeEnum<
|
|
1207
|
+
typeof CreateRouterResponse2ResponsesTtl
|
|
1208
|
+
> = z.nativeEnum(CreateRouterResponse2ResponsesTtl);
|
|
1209
|
+
|
|
1210
|
+
/** @internal */
|
|
1211
|
+
export const CreateRouterResponse2ResponsesRequestType$outboundSchema:
|
|
1212
|
+
z.ZodNativeEnum<typeof CreateRouterResponse2ResponsesRequestType> = z
|
|
1213
|
+
.nativeEnum(CreateRouterResponse2ResponsesRequestType);
|
|
1214
|
+
|
|
1215
|
+
/** @internal */
|
|
1216
|
+
export type CreateRouterResponse2ResponsesCacheControl$Outbound = {
|
|
1217
|
+
ttl: string;
|
|
1218
|
+
type: string;
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
/** @internal */
|
|
1222
|
+
export const CreateRouterResponse2ResponsesCacheControl$outboundSchema:
|
|
1223
|
+
z.ZodType<
|
|
1224
|
+
CreateRouterResponse2ResponsesCacheControl$Outbound,
|
|
1225
|
+
z.ZodTypeDef,
|
|
1226
|
+
CreateRouterResponse2ResponsesCacheControl
|
|
1227
|
+
> = z.object({
|
|
1228
|
+
ttl: CreateRouterResponse2ResponsesTtl$outboundSchema.default("5m"),
|
|
1229
|
+
type: CreateRouterResponse2ResponsesRequestType$outboundSchema,
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
export function createRouterResponse2ResponsesCacheControlToJSON(
|
|
1233
|
+
createRouterResponse2ResponsesCacheControl:
|
|
1234
|
+
CreateRouterResponse2ResponsesCacheControl,
|
|
1235
|
+
): string {
|
|
1236
|
+
return JSON.stringify(
|
|
1237
|
+
CreateRouterResponse2ResponsesCacheControl$outboundSchema.parse(
|
|
1238
|
+
createRouterResponse2ResponsesCacheControl,
|
|
1239
|
+
),
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
664
1243
|
/** @internal */
|
|
665
1244
|
export const Detail$outboundSchema: z.ZodNativeEnum<typeof Detail> = z
|
|
666
1245
|
.nativeEnum(Detail);
|
|
667
1246
|
|
|
668
1247
|
/** @internal */
|
|
669
1248
|
export type Image$Outbound = {
|
|
1249
|
+
cache_control?:
|
|
1250
|
+
| CreateRouterResponse2ResponsesCacheControl$Outbound
|
|
1251
|
+
| undefined;
|
|
670
1252
|
detail?: string | undefined;
|
|
671
1253
|
file_id?: string | undefined;
|
|
672
1254
|
image_url?: string | undefined;
|
|
@@ -679,12 +1261,16 @@ export const Image$outboundSchema: z.ZodType<
|
|
|
679
1261
|
z.ZodTypeDef,
|
|
680
1262
|
Image
|
|
681
1263
|
> = z.object({
|
|
1264
|
+
cacheControl: z.lazy(() =>
|
|
1265
|
+
CreateRouterResponse2ResponsesCacheControl$outboundSchema
|
|
1266
|
+
).optional(),
|
|
682
1267
|
detail: Detail$outboundSchema.optional(),
|
|
683
1268
|
fileId: z.string().optional(),
|
|
684
1269
|
imageUrl: z.string().optional(),
|
|
685
1270
|
type: z.literal("input_image"),
|
|
686
1271
|
}).transform((v) => {
|
|
687
1272
|
return remap$(v, {
|
|
1273
|
+
cacheControl: "cache_control",
|
|
688
1274
|
fileId: "file_id",
|
|
689
1275
|
imageUrl: "image_url",
|
|
690
1276
|
});
|
|
@@ -694,8 +1280,45 @@ export function imageToJSON(image: Image): string {
|
|
|
694
1280
|
return JSON.stringify(Image$outboundSchema.parse(image));
|
|
695
1281
|
}
|
|
696
1282
|
|
|
1283
|
+
/** @internal */
|
|
1284
|
+
export const CreateRouterResponse2Ttl$outboundSchema: z.ZodNativeEnum<
|
|
1285
|
+
typeof CreateRouterResponse2Ttl
|
|
1286
|
+
> = z.nativeEnum(CreateRouterResponse2Ttl);
|
|
1287
|
+
|
|
1288
|
+
/** @internal */
|
|
1289
|
+
export const CreateRouterResponse2Type$outboundSchema: z.ZodNativeEnum<
|
|
1290
|
+
typeof CreateRouterResponse2Type
|
|
1291
|
+
> = z.nativeEnum(CreateRouterResponse2Type);
|
|
1292
|
+
|
|
1293
|
+
/** @internal */
|
|
1294
|
+
export type CreateRouterResponse2CacheControl$Outbound = {
|
|
1295
|
+
ttl: string;
|
|
1296
|
+
type: string;
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
/** @internal */
|
|
1300
|
+
export const CreateRouterResponse2CacheControl$outboundSchema: z.ZodType<
|
|
1301
|
+
CreateRouterResponse2CacheControl$Outbound,
|
|
1302
|
+
z.ZodTypeDef,
|
|
1303
|
+
CreateRouterResponse2CacheControl
|
|
1304
|
+
> = z.object({
|
|
1305
|
+
ttl: CreateRouterResponse2Ttl$outboundSchema.default("5m"),
|
|
1306
|
+
type: CreateRouterResponse2Type$outboundSchema,
|
|
1307
|
+
});
|
|
1308
|
+
|
|
1309
|
+
export function createRouterResponse2CacheControlToJSON(
|
|
1310
|
+
createRouterResponse2CacheControl: CreateRouterResponse2CacheControl,
|
|
1311
|
+
): string {
|
|
1312
|
+
return JSON.stringify(
|
|
1313
|
+
CreateRouterResponse2CacheControl$outboundSchema.parse(
|
|
1314
|
+
createRouterResponse2CacheControl,
|
|
1315
|
+
),
|
|
1316
|
+
);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
697
1319
|
/** @internal */
|
|
698
1320
|
export type TwoText$Outbound = {
|
|
1321
|
+
cache_control?: CreateRouterResponse2CacheControl$Outbound | undefined;
|
|
699
1322
|
text: string;
|
|
700
1323
|
type: "input_text";
|
|
701
1324
|
};
|
|
@@ -706,8 +1329,14 @@ export const TwoText$outboundSchema: z.ZodType<
|
|
|
706
1329
|
z.ZodTypeDef,
|
|
707
1330
|
TwoText
|
|
708
1331
|
> = z.object({
|
|
1332
|
+
cacheControl: z.lazy(() => CreateRouterResponse2CacheControl$outboundSchema)
|
|
1333
|
+
.optional(),
|
|
709
1334
|
text: z.string(),
|
|
710
1335
|
type: z.literal("input_text"),
|
|
1336
|
+
}).transform((v) => {
|
|
1337
|
+
return remap$(v, {
|
|
1338
|
+
cacheControl: "cache_control",
|
|
1339
|
+
});
|
|
711
1340
|
});
|
|
712
1341
|
|
|
713
1342
|
export function twoTextToJSON(twoText: TwoText): string {
|
|
@@ -1080,9 +1709,10 @@ export function toolsMCPToolToJSON(toolsMCPTool: ToolsMCPTool): string {
|
|
|
1080
1709
|
}
|
|
1081
1710
|
|
|
1082
1711
|
/** @internal */
|
|
1083
|
-
export const
|
|
1084
|
-
typeof
|
|
1085
|
-
|
|
1712
|
+
export const CreateRouterResponseToolsResponsesType$outboundSchema:
|
|
1713
|
+
z.ZodNativeEnum<typeof CreateRouterResponseToolsResponsesType> = z.nativeEnum(
|
|
1714
|
+
CreateRouterResponseToolsResponsesType,
|
|
1715
|
+
);
|
|
1086
1716
|
|
|
1087
1717
|
/** @internal */
|
|
1088
1718
|
export type OrqAiTool$Outbound = {
|
|
@@ -1097,7 +1727,7 @@ export const OrqAiTool$outboundSchema: z.ZodType<
|
|
|
1097
1727
|
OrqAiTool
|
|
1098
1728
|
> = z.object({
|
|
1099
1729
|
toolId: z.string().optional(),
|
|
1100
|
-
type:
|
|
1730
|
+
type: CreateRouterResponseToolsResponsesType$outboundSchema,
|
|
1101
1731
|
}).transform((v) => {
|
|
1102
1732
|
return remap$(v, {
|
|
1103
1733
|
toolId: "tool_id",
|
|
@@ -1108,8 +1738,41 @@ export function orqAiToolToJSON(orqAiTool: OrqAiTool): string {
|
|
|
1108
1738
|
return JSON.stringify(OrqAiTool$outboundSchema.parse(orqAiTool));
|
|
1109
1739
|
}
|
|
1110
1740
|
|
|
1741
|
+
/** @internal */
|
|
1742
|
+
export const ToolsTtl$outboundSchema: z.ZodNativeEnum<typeof ToolsTtl> = z
|
|
1743
|
+
.nativeEnum(ToolsTtl);
|
|
1744
|
+
|
|
1745
|
+
/** @internal */
|
|
1746
|
+
export const ToolsType$outboundSchema: z.ZodNativeEnum<typeof ToolsType> = z
|
|
1747
|
+
.nativeEnum(ToolsType);
|
|
1748
|
+
|
|
1749
|
+
/** @internal */
|
|
1750
|
+
export type ToolsCacheControl$Outbound = {
|
|
1751
|
+
ttl: string;
|
|
1752
|
+
type: string;
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
/** @internal */
|
|
1756
|
+
export const ToolsCacheControl$outboundSchema: z.ZodType<
|
|
1757
|
+
ToolsCacheControl$Outbound,
|
|
1758
|
+
z.ZodTypeDef,
|
|
1759
|
+
ToolsCacheControl
|
|
1760
|
+
> = z.object({
|
|
1761
|
+
ttl: ToolsTtl$outboundSchema.default("5m"),
|
|
1762
|
+
type: ToolsType$outboundSchema,
|
|
1763
|
+
});
|
|
1764
|
+
|
|
1765
|
+
export function toolsCacheControlToJSON(
|
|
1766
|
+
toolsCacheControl: ToolsCacheControl,
|
|
1767
|
+
): string {
|
|
1768
|
+
return JSON.stringify(
|
|
1769
|
+
ToolsCacheControl$outboundSchema.parse(toolsCacheControl),
|
|
1770
|
+
);
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1111
1773
|
/** @internal */
|
|
1112
1774
|
export type ToolsFunction$Outbound = {
|
|
1775
|
+
cache_control?: ToolsCacheControl$Outbound | undefined;
|
|
1113
1776
|
description?: string | undefined;
|
|
1114
1777
|
name: string;
|
|
1115
1778
|
parameters?: { [k: string]: any } | undefined;
|
|
@@ -1123,11 +1786,16 @@ export const ToolsFunction$outboundSchema: z.ZodType<
|
|
|
1123
1786
|
z.ZodTypeDef,
|
|
1124
1787
|
ToolsFunction
|
|
1125
1788
|
> = z.object({
|
|
1789
|
+
cacheControl: z.lazy(() => ToolsCacheControl$outboundSchema).optional(),
|
|
1126
1790
|
description: z.string().optional(),
|
|
1127
1791
|
name: z.string(),
|
|
1128
1792
|
parameters: z.record(z.any()).optional(),
|
|
1129
1793
|
strict: z.boolean().optional(),
|
|
1130
1794
|
type: z.literal("function"),
|
|
1795
|
+
}).transform((v) => {
|
|
1796
|
+
return remap$(v, {
|
|
1797
|
+
cacheControl: "cache_control",
|
|
1798
|
+
});
|
|
1131
1799
|
});
|
|
1132
1800
|
|
|
1133
1801
|
export function toolsFunctionToJSON(toolsFunction: ToolsFunction): string {
|
|
@@ -1183,6 +1851,7 @@ export function createRouterResponseToolsToJSON(
|
|
|
1183
1851
|
|
|
1184
1852
|
/** @internal */
|
|
1185
1853
|
export type CreateRouterResponseRequestBody$Outbound = {
|
|
1854
|
+
cache_control?: CreateRouterResponseCacheControl$Outbound | undefined;
|
|
1186
1855
|
conversation?: components.ConversationParam$Outbound | undefined;
|
|
1187
1856
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
1188
1857
|
frequency_penalty?: number | undefined;
|
|
@@ -1234,6 +1903,8 @@ export const CreateRouterResponseRequestBody$outboundSchema: z.ZodType<
|
|
|
1234
1903
|
z.ZodTypeDef,
|
|
1235
1904
|
CreateRouterResponseRequestBody
|
|
1236
1905
|
> = z.object({
|
|
1906
|
+
cacheControl: z.lazy(() => CreateRouterResponseCacheControl$outboundSchema)
|
|
1907
|
+
.optional(),
|
|
1237
1908
|
conversation: components.ConversationParam$outboundSchema.optional(),
|
|
1238
1909
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
1239
1910
|
.optional(),
|
|
@@ -1298,6 +1969,7 @@ export const CreateRouterResponseRequestBody$outboundSchema: z.ZodType<
|
|
|
1298
1969
|
variables: z.record(z.any()).optional(),
|
|
1299
1970
|
}).transform((v) => {
|
|
1300
1971
|
return remap$(v, {
|
|
1972
|
+
cacheControl: "cache_control",
|
|
1301
1973
|
frequencyPenalty: "frequency_penalty",
|
|
1302
1974
|
maxOutputTokens: "max_output_tokens",
|
|
1303
1975
|
maxToolCalls: "max_tool_calls",
|
|
@@ -1324,52 +1996,127 @@ export function createRouterResponseRequestBodyToJSON(
|
|
|
1324
1996
|
);
|
|
1325
1997
|
}
|
|
1326
1998
|
|
|
1327
|
-
/** @internal */
|
|
1328
|
-
export const CreateRouterResponseType$inboundSchema: z.ZodNativeEnum<
|
|
1329
|
-
typeof CreateRouterResponseType
|
|
1330
|
-
> = z.nativeEnum(CreateRouterResponseType);
|
|
1331
|
-
|
|
1332
|
-
/** @internal */
|
|
1333
|
-
export const CreateRouterResponseData$inboundSchema: z.ZodType<
|
|
1334
|
-
CreateRouterResponseData,
|
|
1335
|
-
z.ZodTypeDef,
|
|
1336
|
-
unknown
|
|
1337
|
-
> = z.object({
|
|
1338
|
-
sequence_number: z.number().int(),
|
|
1339
|
-
type: CreateRouterResponseType$inboundSchema,
|
|
1340
|
-
}).transform((v) => {
|
|
1341
|
-
return remap$(v, {
|
|
1342
|
-
"sequence_number": "sequenceNumber",
|
|
1343
|
-
});
|
|
1344
|
-
});
|
|
1345
|
-
|
|
1346
|
-
export function createRouterResponseDataFromJSON(
|
|
1347
|
-
jsonString: string,
|
|
1348
|
-
): SafeParseResult<CreateRouterResponseData, SDKValidationError> {
|
|
1349
|
-
return safeParse(
|
|
1350
|
-
jsonString,
|
|
1351
|
-
(x) => CreateRouterResponseData$inboundSchema.parse(JSON.parse(x)),
|
|
1352
|
-
`Failed to parse 'CreateRouterResponseData' from JSON`,
|
|
1353
|
-
);
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
1999
|
/** @internal */
|
|
1357
2000
|
export const CreateRouterResponseResponsesResponseBody$inboundSchema: z.ZodType<
|
|
1358
2001
|
CreateRouterResponseResponsesResponseBody,
|
|
1359
2002
|
z.ZodTypeDef,
|
|
1360
2003
|
unknown
|
|
1361
|
-
> = z.
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
2004
|
+
> = z.union([
|
|
2005
|
+
components.ResponseErrorStreamEvent$inboundSchema,
|
|
2006
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2007
|
+
z.object({ event: z.literal("response.code_interpreter_call.completed") }),
|
|
2008
|
+
),
|
|
2009
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2010
|
+
z.object({
|
|
2011
|
+
event: z.literal("response.code_interpreter_call.in_progress"),
|
|
2012
|
+
}),
|
|
2013
|
+
),
|
|
2014
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2015
|
+
z.object({
|
|
2016
|
+
event: z.literal("response.code_interpreter_call.interpreting"),
|
|
2017
|
+
}),
|
|
2018
|
+
),
|
|
2019
|
+
components.ResponseCodeInterpreterCodeDeltaStreamEvent$inboundSchema,
|
|
2020
|
+
components.ResponseCodeInterpreterCodeDoneStreamEvent$inboundSchema,
|
|
2021
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2022
|
+
z.object({ event: z.literal("response.completed") }),
|
|
2023
|
+
),
|
|
2024
|
+
components.ResponseContentPartStreamEvent$inboundSchema.and(
|
|
2025
|
+
z.object({ event: z.literal("response.content_part.added") }),
|
|
2026
|
+
),
|
|
2027
|
+
components.ResponseContentPartStreamEvent$inboundSchema.and(
|
|
2028
|
+
z.object({ event: z.literal("response.content_part.done") }),
|
|
2029
|
+
),
|
|
2030
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2031
|
+
z.object({ event: z.literal("response.created") }),
|
|
2032
|
+
),
|
|
2033
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2034
|
+
z.object({ event: z.literal("response.failed") }),
|
|
2035
|
+
),
|
|
2036
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2037
|
+
z.object({ event: z.literal("response.file_search_call.completed") }),
|
|
2038
|
+
),
|
|
2039
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2040
|
+
z.object({ event: z.literal("response.file_search_call.in_progress") }),
|
|
2041
|
+
),
|
|
2042
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2043
|
+
z.object({ event: z.literal("response.file_search_call.searching") }),
|
|
2044
|
+
),
|
|
2045
|
+
components.ResponseFunctionCallArgumentsDeltaStreamEvent$inboundSchema,
|
|
2046
|
+
components.ResponseFunctionCallArgumentsDoneStreamEvent$inboundSchema,
|
|
2047
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2048
|
+
z.object({ event: z.literal("response.image_generation_call.completed") }),
|
|
2049
|
+
),
|
|
2050
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2051
|
+
z.object({ event: z.literal("response.image_generation_call.generating") }),
|
|
2052
|
+
),
|
|
2053
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2054
|
+
z.object({
|
|
2055
|
+
event: z.literal("response.image_generation_call.in_progress"),
|
|
2056
|
+
}),
|
|
2057
|
+
),
|
|
2058
|
+
components.ResponseImageGenerationPartialImageStreamEvent$inboundSchema,
|
|
2059
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2060
|
+
z.object({ event: z.literal("response.in_progress") }),
|
|
2061
|
+
),
|
|
2062
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2063
|
+
z.object({ event: z.literal("response.incomplete") }),
|
|
2064
|
+
),
|
|
2065
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2066
|
+
z.object({ event: z.literal("response.mcp_call.completed") }),
|
|
2067
|
+
),
|
|
2068
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2069
|
+
z.object({ event: z.literal("response.mcp_call.failed") }),
|
|
2070
|
+
),
|
|
2071
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2072
|
+
z.object({ event: z.literal("response.mcp_call.in_progress") }),
|
|
2073
|
+
),
|
|
2074
|
+
components.ResponseMcpCallArgumentsDeltaStreamEvent$inboundSchema,
|
|
2075
|
+
components.ResponseMcpCallArgumentsDoneStreamEvent$inboundSchema,
|
|
2076
|
+
components.ResponseOutputItemStreamEvent$inboundSchema.and(
|
|
2077
|
+
z.object({ event: z.literal("response.output_item.added") }),
|
|
2078
|
+
),
|
|
2079
|
+
components.ResponseOutputItemStreamEvent$inboundSchema.and(
|
|
2080
|
+
z.object({ event: z.literal("response.output_item.done") }),
|
|
2081
|
+
),
|
|
2082
|
+
components.ResponseOutputTextAnnotationAddedStreamEvent$inboundSchema,
|
|
2083
|
+
components.ResponseOutputTextDeltaStreamEvent$inboundSchema,
|
|
2084
|
+
components.ResponseOutputTextDoneStreamEvent$inboundSchema,
|
|
2085
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2086
|
+
z.object({ event: z.literal("response.queued") }),
|
|
2087
|
+
),
|
|
2088
|
+
components.ResponseReasoningDeltaStreamEvent$inboundSchema.and(
|
|
2089
|
+
z.object({ event: z.literal("response.reasoning.delta") }),
|
|
2090
|
+
),
|
|
2091
|
+
components.ResponseReasoningDoneStreamEvent$inboundSchema.and(
|
|
2092
|
+
z.object({ event: z.literal("response.reasoning.done") }),
|
|
2093
|
+
),
|
|
2094
|
+
components.ResponseReasoningSummaryPartStreamEvent$inboundSchema.and(
|
|
2095
|
+
z.object({ event: z.literal("response.reasoning_summary_part.added") }),
|
|
2096
|
+
),
|
|
2097
|
+
components.ResponseReasoningSummaryPartStreamEvent$inboundSchema.and(
|
|
2098
|
+
z.object({ event: z.literal("response.reasoning_summary_part.done") }),
|
|
2099
|
+
),
|
|
2100
|
+
components.ResponseReasoningSummaryTextDeltaStreamEvent$inboundSchema,
|
|
2101
|
+
components.ResponseReasoningSummaryTextDoneStreamEvent$inboundSchema,
|
|
2102
|
+
components.ResponseReasoningDeltaStreamEvent$inboundSchema.and(
|
|
2103
|
+
z.object({ event: z.literal("response.reasoning_text.delta") }),
|
|
2104
|
+
),
|
|
2105
|
+
components.ResponseReasoningDoneStreamEvent$inboundSchema.and(
|
|
2106
|
+
z.object({ event: z.literal("response.reasoning_text.done") }),
|
|
2107
|
+
),
|
|
2108
|
+
components.ResponseRefusalDeltaStreamEvent$inboundSchema,
|
|
2109
|
+
components.ResponseRefusalDoneStreamEvent$inboundSchema,
|
|
2110
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2111
|
+
z.object({ event: z.literal("response.web_search_call.completed") }),
|
|
2112
|
+
),
|
|
2113
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2114
|
+
z.object({ event: z.literal("response.web_search_call.in_progress") }),
|
|
2115
|
+
),
|
|
2116
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2117
|
+
z.object({ event: z.literal("response.web_search_call.searching") }),
|
|
2118
|
+
),
|
|
2119
|
+
]);
|
|
1373
2120
|
|
|
1374
2121
|
export function createRouterResponseResponsesResponseBodyFromJSON(
|
|
1375
2122
|
jsonString: string,
|
|
@@ -1487,11 +2234,155 @@ export const CreateRouterResponseResponse$inboundSchema: z.ZodType<
|
|
|
1487
2234
|
if (rawEvent.data === "[DONE]") return { done: true, value: undefined };
|
|
1488
2235
|
return {
|
|
1489
2236
|
done: false,
|
|
1490
|
-
value: z.
|
|
1491
|
-
|
|
1492
|
-
|
|
2237
|
+
value: z.union([
|
|
2238
|
+
components.ResponseErrorStreamEvent$inboundSchema,
|
|
2239
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2240
|
+
z.object({
|
|
2241
|
+
event: z.literal("response.code_interpreter_call.completed"),
|
|
2242
|
+
}),
|
|
2243
|
+
),
|
|
2244
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2245
|
+
z.object({
|
|
2246
|
+
event: z.literal("response.code_interpreter_call.in_progress"),
|
|
2247
|
+
}),
|
|
2248
|
+
),
|
|
2249
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2250
|
+
z.object({
|
|
2251
|
+
event: z.literal("response.code_interpreter_call.interpreting"),
|
|
2252
|
+
}),
|
|
2253
|
+
),
|
|
2254
|
+
components
|
|
2255
|
+
.ResponseCodeInterpreterCodeDeltaStreamEvent$inboundSchema,
|
|
2256
|
+
components.ResponseCodeInterpreterCodeDoneStreamEvent$inboundSchema,
|
|
2257
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2258
|
+
z.object({ event: z.literal("response.completed") }),
|
|
2259
|
+
),
|
|
2260
|
+
components.ResponseContentPartStreamEvent$inboundSchema.and(
|
|
2261
|
+
z.object({ event: z.literal("response.content_part.added") }),
|
|
2262
|
+
),
|
|
2263
|
+
components.ResponseContentPartStreamEvent$inboundSchema.and(
|
|
2264
|
+
z.object({ event: z.literal("response.content_part.done") }),
|
|
2265
|
+
),
|
|
2266
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2267
|
+
z.object({ event: z.literal("response.created") }),
|
|
2268
|
+
),
|
|
2269
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2270
|
+
z.object({ event: z.literal("response.failed") }),
|
|
2271
|
+
),
|
|
2272
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2273
|
+
z.object({
|
|
2274
|
+
event: z.literal("response.file_search_call.completed"),
|
|
2275
|
+
}),
|
|
2276
|
+
),
|
|
2277
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2278
|
+
z.object({
|
|
2279
|
+
event: z.literal("response.file_search_call.in_progress"),
|
|
2280
|
+
}),
|
|
2281
|
+
),
|
|
2282
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2283
|
+
z.object({
|
|
2284
|
+
event: z.literal("response.file_search_call.searching"),
|
|
2285
|
+
}),
|
|
2286
|
+
),
|
|
2287
|
+
components
|
|
2288
|
+
.ResponseFunctionCallArgumentsDeltaStreamEvent$inboundSchema,
|
|
2289
|
+
components
|
|
2290
|
+
.ResponseFunctionCallArgumentsDoneStreamEvent$inboundSchema,
|
|
2291
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2292
|
+
z.object({
|
|
2293
|
+
event: z.literal("response.image_generation_call.completed"),
|
|
2294
|
+
}),
|
|
2295
|
+
),
|
|
2296
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2297
|
+
z.object({
|
|
2298
|
+
event: z.literal("response.image_generation_call.generating"),
|
|
2299
|
+
}),
|
|
2300
|
+
),
|
|
2301
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2302
|
+
z.object({
|
|
2303
|
+
event: z.literal("response.image_generation_call.in_progress"),
|
|
2304
|
+
}),
|
|
2305
|
+
),
|
|
2306
|
+
components
|
|
2307
|
+
.ResponseImageGenerationPartialImageStreamEvent$inboundSchema,
|
|
2308
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2309
|
+
z.object({ event: z.literal("response.in_progress") }),
|
|
2310
|
+
),
|
|
2311
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2312
|
+
z.object({ event: z.literal("response.incomplete") }),
|
|
2313
|
+
),
|
|
2314
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2315
|
+
z.object({ event: z.literal("response.mcp_call.completed") }),
|
|
2316
|
+
),
|
|
2317
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2318
|
+
z.object({ event: z.literal("response.mcp_call.failed") }),
|
|
2319
|
+
),
|
|
2320
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2321
|
+
z.object({ event: z.literal("response.mcp_call.in_progress") }),
|
|
2322
|
+
),
|
|
2323
|
+
components.ResponseMcpCallArgumentsDeltaStreamEvent$inboundSchema,
|
|
2324
|
+
components.ResponseMcpCallArgumentsDoneStreamEvent$inboundSchema,
|
|
2325
|
+
components.ResponseOutputItemStreamEvent$inboundSchema.and(
|
|
2326
|
+
z.object({ event: z.literal("response.output_item.added") }),
|
|
2327
|
+
),
|
|
2328
|
+
components.ResponseOutputItemStreamEvent$inboundSchema.and(
|
|
2329
|
+
z.object({ event: z.literal("response.output_item.done") }),
|
|
2330
|
+
),
|
|
2331
|
+
components
|
|
2332
|
+
.ResponseOutputTextAnnotationAddedStreamEvent$inboundSchema,
|
|
2333
|
+
components.ResponseOutputTextDeltaStreamEvent$inboundSchema,
|
|
2334
|
+
components.ResponseOutputTextDoneStreamEvent$inboundSchema,
|
|
2335
|
+
components.ResponseLifecycleStreamEvent$inboundSchema.and(
|
|
2336
|
+
z.object({ event: z.literal("response.queued") }),
|
|
2337
|
+
),
|
|
2338
|
+
components.ResponseReasoningDeltaStreamEvent$inboundSchema.and(
|
|
2339
|
+
z.object({ event: z.literal("response.reasoning.delta") }),
|
|
2340
|
+
),
|
|
2341
|
+
components.ResponseReasoningDoneStreamEvent$inboundSchema.and(
|
|
2342
|
+
z.object({ event: z.literal("response.reasoning.done") }),
|
|
2343
|
+
),
|
|
2344
|
+
components.ResponseReasoningSummaryPartStreamEvent$inboundSchema
|
|
2345
|
+
.and(
|
|
2346
|
+
z.object({
|
|
2347
|
+
event: z.literal("response.reasoning_summary_part.added"),
|
|
2348
|
+
}),
|
|
2349
|
+
),
|
|
2350
|
+
components.ResponseReasoningSummaryPartStreamEvent$inboundSchema
|
|
2351
|
+
.and(
|
|
2352
|
+
z.object({
|
|
2353
|
+
event: z.literal("response.reasoning_summary_part.done"),
|
|
2354
|
+
}),
|
|
2355
|
+
),
|
|
2356
|
+
components
|
|
2357
|
+
.ResponseReasoningSummaryTextDeltaStreamEvent$inboundSchema,
|
|
2358
|
+
components
|
|
2359
|
+
.ResponseReasoningSummaryTextDoneStreamEvent$inboundSchema,
|
|
2360
|
+
components.ResponseReasoningDeltaStreamEvent$inboundSchema.and(
|
|
2361
|
+
z.object({ event: z.literal("response.reasoning_text.delta") }),
|
|
2362
|
+
),
|
|
2363
|
+
components.ResponseReasoningDoneStreamEvent$inboundSchema.and(
|
|
2364
|
+
z.object({ event: z.literal("response.reasoning_text.done") }),
|
|
2365
|
+
),
|
|
2366
|
+
components.ResponseRefusalDeltaStreamEvent$inboundSchema,
|
|
2367
|
+
components.ResponseRefusalDoneStreamEvent$inboundSchema,
|
|
2368
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2369
|
+
z.object({
|
|
2370
|
+
event: z.literal("response.web_search_call.completed"),
|
|
2371
|
+
}),
|
|
2372
|
+
),
|
|
2373
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2374
|
+
z.object({
|
|
2375
|
+
event: z.literal("response.web_search_call.in_progress"),
|
|
2376
|
+
}),
|
|
2377
|
+
),
|
|
2378
|
+
components.ResponseHostedToolCallStreamEvent$inboundSchema.and(
|
|
2379
|
+
z.object({
|
|
2380
|
+
event: z.literal("response.web_search_call.searching"),
|
|
2381
|
+
}),
|
|
2382
|
+
),
|
|
2383
|
+
]).parse(rawEvent),
|
|
1493
2384
|
};
|
|
1494
|
-
}
|
|
2385
|
+
});
|
|
1495
2386
|
}),
|
|
1496
2387
|
]);
|
|
1497
2388
|
|