@orq-ai/node 4.17.0-rc.15 → 4.17.0-rc.17
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/funcs/routerAudioTranscriptionsCreate.js +3 -0
- package/funcs/routerAudioTranscriptionsCreate.js.map +1 -1
- package/funcs/routerAudioTranslationsCreate.js +3 -0
- package/funcs/routerAudioTranslationsCreate.js.map +1 -1
- package/funcs/routerImagesEditsCreate.js +3 -0
- package/funcs/routerImagesEditsCreate.js.map +1 -1
- package/funcs/routerImagesVariationsCreate.js +3 -0
- package/funcs/routerImagesVariationsCreate.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/modelsconfig.d.ts +2 -0
- package/models/components/modelsconfig.d.ts.map +1 -1
- package/models/components/modelsconfig.js +11 -0
- package/models/components/modelsconfig.js.map +1 -1
- package/models/components/reasoningpart.js +1 -1
- package/models/components/routingrulemodelsconfig.d.ts +5 -0
- package/models/components/routingrulemodelsconfig.d.ts.map +1 -1
- package/models/components/routingrulemodelsconfig.js +11 -0
- package/models/components/routingrulemodelsconfig.js.map +1 -1
- package/models/operations/createagentrequest.d.ts +18 -0
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +8 -0
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createchatcompletion.d.ts +10 -0
- package/models/operations/createchatcompletion.d.ts.map +1 -1
- package/models/operations/createchatcompletion.js +4 -0
- package/models/operations/createchatcompletion.js.map +1 -1
- package/models/operations/createclassify.d.ts +5 -0
- package/models/operations/createclassify.d.ts.map +1 -1
- package/models/operations/createclassify.js +6 -0
- package/models/operations/createclassify.js.map +1 -1
- package/models/operations/createcompletion.d.ts +10 -0
- package/models/operations/createcompletion.d.ts.map +1 -1
- package/models/operations/createcompletion.js +4 -0
- package/models/operations/createcompletion.js.map +1 -1
- package/models/operations/createdecisions.d.ts +5 -0
- package/models/operations/createdecisions.d.ts.map +1 -1
- package/models/operations/createdecisions.js +6 -0
- package/models/operations/createdecisions.js.map +1 -1
- package/models/operations/createembedding.d.ts +5 -0
- package/models/operations/createembedding.d.ts.map +1 -1
- package/models/operations/createembedding.js +2 -0
- package/models/operations/createembedding.js.map +1 -1
- package/models/operations/createimage.d.ts +10 -0
- package/models/operations/createimage.d.ts.map +1 -1
- package/models/operations/createimage.js +4 -0
- package/models/operations/createimage.js.map +1 -1
- package/models/operations/createimageedit.d.ts +10 -0
- package/models/operations/createimageedit.d.ts.map +1 -1
- package/models/operations/createimageedit.js +4 -0
- package/models/operations/createimageedit.js.map +1 -1
- package/models/operations/createimagevariation.d.ts +10 -0
- package/models/operations/createimagevariation.d.ts.map +1 -1
- package/models/operations/createimagevariation.js +4 -0
- package/models/operations/createimagevariation.js.map +1 -1
- package/models/operations/createprompt.d.ts +9 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +4 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/creatererank.d.ts +10 -0
- package/models/operations/creatererank.d.ts.map +1 -1
- package/models/operations/creatererank.js +4 -0
- package/models/operations/creatererank.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +5 -0
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +2 -0
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createspeech.d.ts +10 -0
- package/models/operations/createspeech.d.ts.map +1 -1
- package/models/operations/createspeech.js +4 -0
- package/models/operations/createspeech.js.map +1 -1
- package/models/operations/createtool.js +4 -4
- package/models/operations/createtranscription.d.ts +10 -0
- package/models/operations/createtranscription.d.ts.map +1 -1
- package/models/operations/createtranscription.js +4 -0
- package/models/operations/createtranscription.js.map +1 -1
- package/models/operations/createtranslation.d.ts +10 -0
- package/models/operations/createtranslation.d.ts.map +1 -1
- package/models/operations/createtranslation.js +4 -0
- package/models/operations/createtranslation.js.map +1 -1
- package/models/operations/getallprompts.d.ts +4 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +2 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +4 -4
- package/models/operations/getoneprompt.d.ts +4 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +2 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +4 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +2 -0
- 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 +8 -0
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +4 -0
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +4 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +2 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +4 -4
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +8 -0
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +4 -0
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievetool.js +4 -4
- package/models/operations/runagent.d.ts +10 -0
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +5 -1
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +10 -0
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +5 -1
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +18 -0
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +8 -0
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updateprompt.d.ts +9 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +4 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +4 -4
- package/package.json +6 -6
- package/src/funcs/routerAudioTranscriptionsCreate.ts +3 -0
- package/src/funcs/routerAudioTranslationsCreate.ts +3 -0
- package/src/funcs/routerImagesEditsCreate.ts +3 -0
- package/src/funcs/routerImagesVariationsCreate.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/modelsconfig.ts +13 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/routingrulemodelsconfig.ts +16 -0
- package/src/models/operations/createagentrequest.ts +26 -0
- package/src/models/operations/createchatcompletion.ts +14 -0
- package/src/models/operations/createclassify.ts +11 -0
- package/src/models/operations/createcompletion.ts +14 -0
- package/src/models/operations/createdecisions.ts +11 -0
- package/src/models/operations/createembedding.ts +7 -0
- package/src/models/operations/createimage.ts +14 -0
- package/src/models/operations/createimageedit.ts +14 -0
- package/src/models/operations/createimagevariation.ts +14 -0
- package/src/models/operations/createprompt.ts +13 -0
- package/src/models/operations/creatererank.ts +14 -0
- package/src/models/operations/createrouterresponse.ts +7 -0
- package/src/models/operations/createspeech.ts +14 -0
- package/src/models/operations/createtool.ts +4 -4
- package/src/models/operations/createtranscription.ts +14 -0
- package/src/models/operations/createtranslation.ts +14 -0
- package/src/models/operations/getallprompts.ts +6 -0
- package/src/models/operations/getalltools.ts +4 -4
- package/src/models/operations/getoneprompt.ts +6 -0
- package/src/models/operations/getpromptversion.ts +6 -0
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listagents.ts +12 -0
- package/src/models/operations/listpromptversions.ts +6 -0
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +4 -4
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +12 -0
- package/src/models/operations/retrievetool.ts +4 -4
- package/src/models/operations/runagent.ts +15 -1
- package/src/models/operations/streamrunagent.ts +15 -1
- package/src/models/operations/updateagent.ts +26 -0
- package/src/models/operations/updateprompt.ts +13 -0
- package/src/models/operations/updatetool.ts +4 -4
|
@@ -411,6 +411,10 @@ export type ParametersT = {
|
|
|
411
411
|
| components.TraceScrubbingPlugin
|
|
412
412
|
>
|
|
413
413
|
| undefined;
|
|
414
|
+
/**
|
|
415
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
416
|
+
*/
|
|
417
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
414
418
|
/**
|
|
415
419
|
* Array of fallback models to use if primary model fails
|
|
416
420
|
*/
|
|
@@ -906,6 +910,10 @@ export type FallbackModelConfigurationParameters = {
|
|
|
906
910
|
| components.TraceScrubbingPlugin
|
|
907
911
|
>
|
|
908
912
|
| undefined;
|
|
913
|
+
/**
|
|
914
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
915
|
+
*/
|
|
916
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
909
917
|
/**
|
|
910
918
|
* Array of fallback models to use if primary model fails
|
|
911
919
|
*/
|
|
@@ -1847,6 +1855,10 @@ export type CreateAgentRequestParameters = {
|
|
|
1847
1855
|
| components.TraceScrubbingPlugin
|
|
1848
1856
|
>
|
|
1849
1857
|
| undefined;
|
|
1858
|
+
/**
|
|
1859
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
1860
|
+
*/
|
|
1861
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
1850
1862
|
/**
|
|
1851
1863
|
* Array of fallback models to use if primary model fails
|
|
1852
1864
|
*/
|
|
@@ -2335,6 +2347,10 @@ export type CreateAgentRequestFallbackModelConfigurationParameters = {
|
|
|
2335
2347
|
| components.TraceScrubbingPlugin
|
|
2336
2348
|
>
|
|
2337
2349
|
| undefined;
|
|
2350
|
+
/**
|
|
2351
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
2352
|
+
*/
|
|
2353
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
2338
2354
|
/**
|
|
2339
2355
|
* Array of fallback models to use if primary model fails
|
|
2340
2356
|
*/
|
|
@@ -2978,6 +2994,7 @@ export type ParametersT$Outbound = {
|
|
|
2978
2994
|
| components.TraceScrubbingPlugin$Outbound
|
|
2979
2995
|
>
|
|
2980
2996
|
| undefined;
|
|
2997
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
2981
2998
|
fallbacks?: Array<Fallbacks$Outbound> | undefined;
|
|
2982
2999
|
cache?: Cache$Outbound | undefined;
|
|
2983
3000
|
load_balancer?: LoadBalancer1$Outbound | undefined;
|
|
@@ -3030,6 +3047,7 @@ export const ParametersT$outboundSchema: z.ZodType<
|
|
|
3030
3047
|
components.TraceScrubbingPlugin$outboundSchema,
|
|
3031
3048
|
]),
|
|
3032
3049
|
).optional(),
|
|
3050
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
3033
3051
|
fallbacks: z.array(z.lazy(() => Fallbacks$outboundSchema)).optional(),
|
|
3034
3052
|
cache: z.lazy(() => Cache$outboundSchema).optional(),
|
|
3035
3053
|
loadBalancer: z.lazy(() => LoadBalancer1$outboundSchema).optional(),
|
|
@@ -3049,6 +3067,7 @@ export const ParametersT$outboundSchema: z.ZodType<
|
|
|
3049
3067
|
topK: "top_k",
|
|
3050
3068
|
toolChoice: "tool_choice",
|
|
3051
3069
|
parallelToolCalls: "parallel_tool_calls",
|
|
3070
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
3052
3071
|
loadBalancer: "load_balancer",
|
|
3053
3072
|
cacheControl: "cache_control",
|
|
3054
3073
|
promptCacheKey: "prompt_cache_key",
|
|
@@ -3730,6 +3749,7 @@ export type FallbackModelConfigurationParameters$Outbound = {
|
|
|
3730
3749
|
| components.TraceScrubbingPlugin$Outbound
|
|
3731
3750
|
>
|
|
3732
3751
|
| undefined;
|
|
3752
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
3733
3753
|
fallbacks?: Array<FallbackModelConfigurationFallbacks$Outbound> | undefined;
|
|
3734
3754
|
cache?: FallbackModelConfigurationCache$Outbound | undefined;
|
|
3735
3755
|
load_balancer?: CreateAgentRequestLoadBalancer1$Outbound | undefined;
|
|
@@ -3787,6 +3807,7 @@ export const FallbackModelConfigurationParameters$outboundSchema: z.ZodType<
|
|
|
3787
3807
|
components.TraceScrubbingPlugin$outboundSchema,
|
|
3788
3808
|
]),
|
|
3789
3809
|
).optional(),
|
|
3810
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
3790
3811
|
fallbacks: z.array(
|
|
3791
3812
|
z.lazy(() => FallbackModelConfigurationFallbacks$outboundSchema),
|
|
3792
3813
|
).optional(),
|
|
@@ -3812,6 +3833,7 @@ export const FallbackModelConfigurationParameters$outboundSchema: z.ZodType<
|
|
|
3812
3833
|
topK: "top_k",
|
|
3813
3834
|
toolChoice: "tool_choice",
|
|
3814
3835
|
parallelToolCalls: "parallel_tool_calls",
|
|
3836
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
3815
3837
|
loadBalancer: "load_balancer",
|
|
3816
3838
|
cacheControl: "cache_control",
|
|
3817
3839
|
promptCacheKey: "prompt_cache_key",
|
|
@@ -4972,6 +4994,7 @@ export const CreateAgentRequestParameters$inboundSchema: z.ZodType<
|
|
|
4972
4994
|
components.TraceScrubbingPlugin$inboundSchema,
|
|
4973
4995
|
]),
|
|
4974
4996
|
).optional(),
|
|
4997
|
+
fallback_on_codes: z.array(z.number().int()).optional(),
|
|
4975
4998
|
fallbacks: z.array(z.lazy(() => CreateAgentRequestFallbacks$inboundSchema))
|
|
4976
4999
|
.optional(),
|
|
4977
5000
|
cache: z.lazy(() => CreateAgentRequestCache$inboundSchema).optional(),
|
|
@@ -4994,6 +5017,7 @@ export const CreateAgentRequestParameters$inboundSchema: z.ZodType<
|
|
|
4994
5017
|
"top_k": "topK",
|
|
4995
5018
|
"tool_choice": "toolChoice",
|
|
4996
5019
|
"parallel_tool_calls": "parallelToolCalls",
|
|
5020
|
+
"fallback_on_codes": "fallbackOnCodes",
|
|
4997
5021
|
"load_balancer": "loadBalancer",
|
|
4998
5022
|
"cache_control": "cacheControl",
|
|
4999
5023
|
"prompt_cache_key": "promptCacheKey",
|
|
@@ -5700,6 +5724,7 @@ export const CreateAgentRequestFallbackModelConfigurationParameters$inboundSchem
|
|
|
5700
5724
|
components.TraceScrubbingPlugin$inboundSchema,
|
|
5701
5725
|
]),
|
|
5702
5726
|
).optional(),
|
|
5727
|
+
fallback_on_codes: z.array(z.number().int()).optional(),
|
|
5703
5728
|
fallbacks: z.array(
|
|
5704
5729
|
z.lazy(() =>
|
|
5705
5730
|
CreateAgentRequestFallbackModelConfigurationFallbacks$inboundSchema
|
|
@@ -5730,6 +5755,7 @@ export const CreateAgentRequestFallbackModelConfigurationParameters$inboundSchem
|
|
|
5730
5755
|
"top_k": "topK",
|
|
5731
5756
|
"tool_choice": "toolChoice",
|
|
5732
5757
|
"parallel_tool_calls": "parallelToolCalls",
|
|
5758
|
+
"fallback_on_codes": "fallbackOnCodes",
|
|
5733
5759
|
"load_balancer": "loadBalancer",
|
|
5734
5760
|
"cache_control": "cacheControl",
|
|
5735
5761
|
"prompt_cache_key": "promptCacheKey",
|
|
@@ -1408,6 +1408,10 @@ export type Orq = {
|
|
|
1408
1408
|
* Retry configuration for the request
|
|
1409
1409
|
*/
|
|
1410
1410
|
retry?: CreateChatCompletionRouterChatCompletionsRetry | undefined;
|
|
1411
|
+
/**
|
|
1412
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
1413
|
+
*/
|
|
1414
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
1411
1415
|
/**
|
|
1412
1416
|
* Array of fallback models to use if primary model fails
|
|
1413
1417
|
*/
|
|
@@ -1601,6 +1605,10 @@ export type CreateChatCompletionRequestBody = {
|
|
|
1601
1605
|
| components.TraceScrubbingPlugin
|
|
1602
1606
|
>
|
|
1603
1607
|
| undefined;
|
|
1608
|
+
/**
|
|
1609
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
1610
|
+
*/
|
|
1611
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
1604
1612
|
/**
|
|
1605
1613
|
* Array of fallback models to use if primary model fails
|
|
1606
1614
|
*/
|
|
@@ -5304,6 +5312,7 @@ export function createChatCompletionRouterChatCompletionsTimeoutToJSON(
|
|
|
5304
5312
|
export type Orq$Outbound = {
|
|
5305
5313
|
name?: string | undefined;
|
|
5306
5314
|
retry?: CreateChatCompletionRouterChatCompletionsRetry$Outbound | undefined;
|
|
5315
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
5307
5316
|
fallbacks?:
|
|
5308
5317
|
| Array<CreateChatCompletionRouterChatCompletionsFallbacks$Outbound>
|
|
5309
5318
|
| undefined;
|
|
@@ -5331,6 +5340,7 @@ export const Orq$outboundSchema: z.ZodType<Orq$Outbound, z.ZodTypeDef, Orq> = z
|
|
|
5331
5340
|
retry: z.lazy(() =>
|
|
5332
5341
|
CreateChatCompletionRouterChatCompletionsRetry$outboundSchema
|
|
5333
5342
|
).optional(),
|
|
5343
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
5334
5344
|
fallbacks: z.array(
|
|
5335
5345
|
z.lazy(() =>
|
|
5336
5346
|
CreateChatCompletionRouterChatCompletionsFallbacks$outboundSchema
|
|
@@ -5358,6 +5368,7 @@ export const Orq$outboundSchema: z.ZodType<Orq$Outbound, z.ZodTypeDef, Orq> = z
|
|
|
5358
5368
|
).optional(),
|
|
5359
5369
|
}).transform((v) => {
|
|
5360
5370
|
return remap$(v, {
|
|
5371
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
5361
5372
|
knowledgeBases: "knowledge_bases",
|
|
5362
5373
|
loadBalancer: "load_balancer",
|
|
5363
5374
|
});
|
|
@@ -5420,6 +5431,7 @@ export type CreateChatCompletionRequestBody$Outbound = {
|
|
|
5420
5431
|
| components.TraceScrubbingPlugin$Outbound
|
|
5421
5432
|
>
|
|
5422
5433
|
| undefined;
|
|
5434
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
5423
5435
|
fallbacks?: Array<CreateChatCompletionFallbacks$Outbound> | undefined;
|
|
5424
5436
|
retry?: CreateChatCompletionRetry$Outbound | undefined;
|
|
5425
5437
|
cache?: CreateChatCompletionCache$Outbound | undefined;
|
|
@@ -5503,6 +5515,7 @@ export const CreateChatCompletionRequestBody$outboundSchema: z.ZodType<
|
|
|
5503
5515
|
components.TraceScrubbingPlugin$outboundSchema,
|
|
5504
5516
|
]),
|
|
5505
5517
|
).optional(),
|
|
5518
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
5506
5519
|
fallbacks: z.array(z.lazy(() => CreateChatCompletionFallbacks$outboundSchema))
|
|
5507
5520
|
.optional(),
|
|
5508
5521
|
retry: z.lazy(() => CreateChatCompletionRetry$outboundSchema).optional(),
|
|
@@ -5530,6 +5543,7 @@ export const CreateChatCompletionRequestBody$outboundSchema: z.ZodType<
|
|
|
5530
5543
|
topK: "top_k",
|
|
5531
5544
|
toolChoice: "tool_choice",
|
|
5532
5545
|
parallelToolCalls: "parallel_tool_calls",
|
|
5546
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
5533
5547
|
loadBalancer: "load_balancer",
|
|
5534
5548
|
cacheControl: "cache_control",
|
|
5535
5549
|
promptCacheKey: "prompt_cache_key",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as components from "../components/index.js";
|
|
@@ -88,6 +89,10 @@ export type State = string | { [k: string]: any } | Array<any>;
|
|
|
88
89
|
|
|
89
90
|
export type CreateClassifyRequestBody = {
|
|
90
91
|
cache?: components.ClassifyCacheConfig | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.
|
|
94
|
+
*/
|
|
95
|
+
fallbackOnCodes?: Array<number> | null | undefined;
|
|
91
96
|
/**
|
|
92
97
|
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
|
|
93
98
|
*/
|
|
@@ -314,6 +319,7 @@ export function stateToJSON(state: State): string {
|
|
|
314
319
|
/** @internal */
|
|
315
320
|
export type CreateClassifyRequestBody$Outbound = {
|
|
316
321
|
cache?: components.ClassifyCacheConfig$Outbound | undefined;
|
|
322
|
+
fallback_on_codes?: Array<number> | null | undefined;
|
|
317
323
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
318
324
|
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
319
325
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -337,6 +343,7 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
337
343
|
CreateClassifyRequestBody
|
|
338
344
|
> = z.object({
|
|
339
345
|
cache: components.ClassifyCacheConfig$outboundSchema.optional(),
|
|
346
|
+
fallbackOnCodes: z.nullable(z.array(z.number().int())).optional(),
|
|
340
347
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
341
348
|
.optional(),
|
|
342
349
|
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
@@ -353,6 +360,10 @@ export const CreateClassifyRequestBody$outboundSchema: z.ZodType<
|
|
|
353
360
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
354
361
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
355
362
|
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
363
|
+
}).transform((v) => {
|
|
364
|
+
return remap$(v, {
|
|
365
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
366
|
+
});
|
|
356
367
|
});
|
|
357
368
|
|
|
358
369
|
export function createClassifyRequestBodyToJSON(
|
|
@@ -635,6 +635,10 @@ export type CreateCompletionOrq = {
|
|
|
635
635
|
* Retry configuration for the request
|
|
636
636
|
*/
|
|
637
637
|
retry?: CreateCompletionRouterCompletionsRetry | undefined;
|
|
638
|
+
/**
|
|
639
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
640
|
+
*/
|
|
641
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
638
642
|
/**
|
|
639
643
|
* Array of fallback models to use if primary model fails
|
|
640
644
|
*/
|
|
@@ -731,6 +735,10 @@ export type CreateCompletionRequestBody = {
|
|
|
731
735
|
* The name to display on the trace. If not specified, the default system name will be used.
|
|
732
736
|
*/
|
|
733
737
|
name?: string | undefined;
|
|
738
|
+
/**
|
|
739
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
740
|
+
*/
|
|
741
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
734
742
|
/**
|
|
735
743
|
* Array of fallback models to use if primary model fails
|
|
736
744
|
*/
|
|
@@ -2787,6 +2795,7 @@ export function createCompletionRouterCompletionsTimeoutToJSON(
|
|
|
2787
2795
|
export type CreateCompletionOrq$Outbound = {
|
|
2788
2796
|
name?: string | undefined;
|
|
2789
2797
|
retry?: CreateCompletionRouterCompletionsRetry$Outbound | undefined;
|
|
2798
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
2790
2799
|
fallbacks?:
|
|
2791
2800
|
| Array<CreateCompletionRouterCompletionsFallbacks$Outbound>
|
|
2792
2801
|
| undefined;
|
|
@@ -2815,6 +2824,7 @@ export const CreateCompletionOrq$outboundSchema: z.ZodType<
|
|
|
2815
2824
|
name: z.string().optional(),
|
|
2816
2825
|
retry: z.lazy(() => CreateCompletionRouterCompletionsRetry$outboundSchema)
|
|
2817
2826
|
.optional(),
|
|
2827
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
2818
2828
|
fallbacks: z.array(
|
|
2819
2829
|
z.lazy(() => CreateCompletionRouterCompletionsFallbacks$outboundSchema),
|
|
2820
2830
|
).optional(),
|
|
@@ -2838,6 +2848,7 @@ export const CreateCompletionOrq$outboundSchema: z.ZodType<
|
|
|
2838
2848
|
.optional(),
|
|
2839
2849
|
}).transform((v) => {
|
|
2840
2850
|
return remap$(v, {
|
|
2851
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
2841
2852
|
knowledgeBases: "knowledge_bases",
|
|
2842
2853
|
loadBalancer: "load_balancer",
|
|
2843
2854
|
});
|
|
@@ -2866,6 +2877,7 @@ export type CreateCompletionRequestBody$Outbound = {
|
|
|
2866
2877
|
n: number | null;
|
|
2867
2878
|
user?: string | undefined;
|
|
2868
2879
|
name?: string | undefined;
|
|
2880
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
2869
2881
|
fallbacks?: Array<CreateCompletionFallbacks$Outbound> | undefined;
|
|
2870
2882
|
retry?: CreateCompletionRetry$Outbound | undefined;
|
|
2871
2883
|
cache?: CreateCompletionCache$Outbound | undefined;
|
|
@@ -2901,6 +2913,7 @@ export const CreateCompletionRequestBody$outboundSchema: z.ZodType<
|
|
|
2901
2913
|
n: z.nullable(z.number().int().default(1)),
|
|
2902
2914
|
user: z.string().optional(),
|
|
2903
2915
|
name: z.string().optional(),
|
|
2916
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
2904
2917
|
fallbacks: z.array(z.lazy(() => CreateCompletionFallbacks$outboundSchema))
|
|
2905
2918
|
.optional(),
|
|
2906
2919
|
retry: z.lazy(() => CreateCompletionRetry$outboundSchema).optional(),
|
|
@@ -2924,6 +2937,7 @@ export const CreateCompletionRequestBody$outboundSchema: z.ZodType<
|
|
|
2924
2937
|
maxTokens: "max_tokens",
|
|
2925
2938
|
presencePenalty: "presence_penalty",
|
|
2926
2939
|
topP: "top_p",
|
|
2940
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
2927
2941
|
loadBalancer: "load_balancer",
|
|
2928
2942
|
});
|
|
2929
2943
|
});
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as components from "../components/index.js";
|
|
@@ -96,6 +97,10 @@ export type CreateDecisionsState = string | { [k: string]: any } | Array<any>;
|
|
|
96
97
|
|
|
97
98
|
export type CreateDecisionsRequestBody = {
|
|
98
99
|
cache?: components.ClassifyCacheConfig | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.
|
|
102
|
+
*/
|
|
103
|
+
fallbackOnCodes?: Array<number> | null | undefined;
|
|
99
104
|
/**
|
|
100
105
|
* Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
|
|
101
106
|
*/
|
|
@@ -368,6 +373,7 @@ export function createDecisionsStateToJSON(
|
|
|
368
373
|
/** @internal */
|
|
369
374
|
export type CreateDecisionsRequestBody$Outbound = {
|
|
370
375
|
cache?: components.ClassifyCacheConfig$Outbound | undefined;
|
|
376
|
+
fallback_on_codes?: Array<number> | null | undefined;
|
|
371
377
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
372
378
|
identity?: components.ResponseIdentity$Outbound | undefined;
|
|
373
379
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -391,6 +397,7 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
|
391
397
|
CreateDecisionsRequestBody
|
|
392
398
|
> = z.object({
|
|
393
399
|
cache: components.ClassifyCacheConfig$outboundSchema.optional(),
|
|
400
|
+
fallbackOnCodes: z.nullable(z.array(z.number().int())).optional(),
|
|
394
401
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
395
402
|
.optional(),
|
|
396
403
|
identity: components.ResponseIdentity$outboundSchema.optional(),
|
|
@@ -407,6 +414,10 @@ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
|
|
|
407
414
|
retry: components.ClassifyRetryConfig$outboundSchema.optional(),
|
|
408
415
|
state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
|
|
409
416
|
timeout: components.ClassifyTimeoutConfig$outboundSchema.optional(),
|
|
417
|
+
}).transform((v) => {
|
|
418
|
+
return remap$(v, {
|
|
419
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
420
|
+
});
|
|
410
421
|
});
|
|
411
422
|
|
|
412
423
|
export function createDecisionsRequestBodyToJSON(
|
|
@@ -39,6 +39,10 @@ export type CreateEmbeddingRequestBody = {
|
|
|
39
39
|
* The format to return the embeddings in. Can be either float or base64.
|
|
40
40
|
*/
|
|
41
41
|
encodingFormat?: EncodingFormat | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* HTTP status codes that trigger fallback. Defaults to [408,429,500,502,503,504,529]. Each code must be unique and between 400 and 599.
|
|
44
|
+
*/
|
|
45
|
+
fallbackOnCodes?: Array<number> | null | undefined;
|
|
42
46
|
/**
|
|
43
47
|
* Array of fallback models to use if primary model fails.
|
|
44
48
|
*/
|
|
@@ -146,6 +150,7 @@ export type CreateEmbeddingRequestBody$Outbound = {
|
|
|
146
150
|
cache?: components.EmbeddingCacheConfig$Outbound | undefined;
|
|
147
151
|
dimensions?: number | undefined;
|
|
148
152
|
encoding_format?: string | undefined;
|
|
153
|
+
fallback_on_codes?: Array<number> | null | undefined;
|
|
149
154
|
fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
|
|
150
155
|
input: string | Array<string | Array<number>>;
|
|
151
156
|
load_balancer?: components.EmbeddingLoadBalancerConfig$Outbound | undefined;
|
|
@@ -166,6 +171,7 @@ export const CreateEmbeddingRequestBody$outboundSchema: z.ZodType<
|
|
|
166
171
|
cache: components.EmbeddingCacheConfig$outboundSchema.optional(),
|
|
167
172
|
dimensions: z.number().int().optional(),
|
|
168
173
|
encodingFormat: EncodingFormat$outboundSchema.optional(),
|
|
174
|
+
fallbackOnCodes: z.nullable(z.array(z.number().int())).optional(),
|
|
169
175
|
fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
|
|
170
176
|
.optional(),
|
|
171
177
|
input: z.union([
|
|
@@ -183,6 +189,7 @@ export const CreateEmbeddingRequestBody$outboundSchema: z.ZodType<
|
|
|
183
189
|
}).transform((v) => {
|
|
184
190
|
return remap$(v, {
|
|
185
191
|
encodingFormat: "encoding_format",
|
|
192
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
186
193
|
loadBalancer: "load_balancer",
|
|
187
194
|
});
|
|
188
195
|
});
|
|
@@ -252,6 +252,10 @@ export type CreateImageOrq = {
|
|
|
252
252
|
* Retry configuration for the request
|
|
253
253
|
*/
|
|
254
254
|
retry?: CreateImageRouterImagesGenerationsRetry | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
257
|
+
*/
|
|
258
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
255
259
|
/**
|
|
256
260
|
* Array of fallback models to use if primary model fails
|
|
257
261
|
*/
|
|
@@ -336,6 +340,10 @@ export type CreateImageRequestBody = {
|
|
|
336
340
|
* The name to display on the trace. If not specified, the default system name will be used.
|
|
337
341
|
*/
|
|
338
342
|
name?: string | undefined;
|
|
343
|
+
/**
|
|
344
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
345
|
+
*/
|
|
346
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
339
347
|
/**
|
|
340
348
|
* Array of fallback models to use if primary model fails
|
|
341
349
|
*/
|
|
@@ -824,6 +832,7 @@ export function createImageRouterImagesGenerationsTimeoutToJSON(
|
|
|
824
832
|
export type CreateImageOrq$Outbound = {
|
|
825
833
|
name?: string | undefined;
|
|
826
834
|
retry?: CreateImageRouterImagesGenerationsRetry$Outbound | undefined;
|
|
835
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
827
836
|
fallbacks?:
|
|
828
837
|
| Array<CreateImageRouterImagesGenerationsFallbacks$Outbound>
|
|
829
838
|
| undefined;
|
|
@@ -845,6 +854,7 @@ export const CreateImageOrq$outboundSchema: z.ZodType<
|
|
|
845
854
|
name: z.string().optional(),
|
|
846
855
|
retry: z.lazy(() => CreateImageRouterImagesGenerationsRetry$outboundSchema)
|
|
847
856
|
.optional(),
|
|
857
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
848
858
|
fallbacks: z.array(
|
|
849
859
|
z.lazy(() => CreateImageRouterImagesGenerationsFallbacks$outboundSchema),
|
|
850
860
|
).optional(),
|
|
@@ -860,6 +870,7 @@ export const CreateImageOrq$outboundSchema: z.ZodType<
|
|
|
860
870
|
).optional(),
|
|
861
871
|
}).transform((v) => {
|
|
862
872
|
return remap$(v, {
|
|
873
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
863
874
|
loadBalancer: "load_balancer",
|
|
864
875
|
});
|
|
865
876
|
});
|
|
@@ -883,6 +894,7 @@ export type CreateImageRequestBody$Outbound = {
|
|
|
883
894
|
style?: string | null | undefined;
|
|
884
895
|
metadata?: { [k: string]: string } | undefined;
|
|
885
896
|
name?: string | undefined;
|
|
897
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
886
898
|
fallbacks?: Array<CreateImageFallbacks$Outbound> | undefined;
|
|
887
899
|
retry?: CreateImageRetry$Outbound | undefined;
|
|
888
900
|
cache?: CreateImageCache$Outbound | undefined;
|
|
@@ -912,6 +924,7 @@ export const CreateImageRequestBody$outboundSchema: z.ZodType<
|
|
|
912
924
|
style: z.nullable(Style$outboundSchema).optional(),
|
|
913
925
|
metadata: z.record(z.string()).optional(),
|
|
914
926
|
name: z.string().optional(),
|
|
927
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
915
928
|
fallbacks: z.array(z.lazy(() => CreateImageFallbacks$outboundSchema))
|
|
916
929
|
.optional(),
|
|
917
930
|
retry: z.lazy(() => CreateImageRetry$outboundSchema).optional(),
|
|
@@ -926,6 +939,7 @@ export const CreateImageRequestBody$outboundSchema: z.ZodType<
|
|
|
926
939
|
outputCompression: "output_compression",
|
|
927
940
|
outputFormat: "output_format",
|
|
928
941
|
responseFormat: "response_format",
|
|
942
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
929
943
|
loadBalancer: "load_balancer",
|
|
930
944
|
});
|
|
931
945
|
});
|
|
@@ -232,6 +232,10 @@ export type CreateImageEditOrq = {
|
|
|
232
232
|
* Retry configuration for the request
|
|
233
233
|
*/
|
|
234
234
|
retry?: CreateImageEditRouterImagesEditsRetry | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
237
|
+
*/
|
|
238
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
235
239
|
/**
|
|
236
240
|
* Array of fallback models to use if primary model fails
|
|
237
241
|
*/
|
|
@@ -301,6 +305,10 @@ export type CreateImageEditRequestBody = {
|
|
|
301
305
|
* The name to display on the trace. If not specified, the default system name will be used.
|
|
302
306
|
*/
|
|
303
307
|
name?: string | undefined;
|
|
308
|
+
/**
|
|
309
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
310
|
+
*/
|
|
311
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
304
312
|
/**
|
|
305
313
|
* Array of fallback models to use if primary model fails
|
|
306
314
|
*/
|
|
@@ -861,6 +869,7 @@ export function createImageEditRouterImagesEditsTimeoutToJSON(
|
|
|
861
869
|
export type CreateImageEditOrq$Outbound = {
|
|
862
870
|
name?: string | undefined;
|
|
863
871
|
retry?: CreateImageEditRouterImagesEditsRetry$Outbound | undefined;
|
|
872
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
864
873
|
fallbacks?:
|
|
865
874
|
| Array<CreateImageEditRouterImagesEditsFallbacks$Outbound>
|
|
866
875
|
| undefined;
|
|
@@ -883,6 +892,7 @@ export const CreateImageEditOrq$outboundSchema: z.ZodType<
|
|
|
883
892
|
name: z.string().optional(),
|
|
884
893
|
retry: z.lazy(() => CreateImageEditRouterImagesEditsRetry$outboundSchema)
|
|
885
894
|
.optional(),
|
|
895
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
886
896
|
fallbacks: z.array(
|
|
887
897
|
z.lazy(() => CreateImageEditRouterImagesEditsFallbacks$outboundSchema),
|
|
888
898
|
).optional(),
|
|
@@ -898,6 +908,7 @@ export const CreateImageEditOrq$outboundSchema: z.ZodType<
|
|
|
898
908
|
.optional(),
|
|
899
909
|
}).transform((v) => {
|
|
900
910
|
return remap$(v, {
|
|
911
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
901
912
|
loadBalancer: "load_balancer",
|
|
902
913
|
});
|
|
903
914
|
});
|
|
@@ -921,6 +932,7 @@ export type CreateImageEditRequestBody$Outbound = {
|
|
|
921
932
|
response_format?: string | undefined;
|
|
922
933
|
user?: string | undefined;
|
|
923
934
|
name?: string | undefined;
|
|
935
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
924
936
|
fallbacks?: Array<CreateImageEditFallbacks$Outbound> | undefined;
|
|
925
937
|
retry?: CreateImageEditRetry$Outbound | undefined;
|
|
926
938
|
cache?: CreateImageEditCache$Outbound | undefined;
|
|
@@ -944,6 +956,7 @@ export const CreateImageEditRequestBody$outboundSchema: z.ZodType<
|
|
|
944
956
|
responseFormat: CreateImageEditResponseFormat$outboundSchema.optional(),
|
|
945
957
|
user: z.string().optional(),
|
|
946
958
|
name: z.string().optional(),
|
|
959
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
947
960
|
fallbacks: z.array(z.lazy(() => CreateImageEditFallbacks$outboundSchema))
|
|
948
961
|
.optional(),
|
|
949
962
|
retry: z.lazy(() => CreateImageEditRetry$outboundSchema).optional(),
|
|
@@ -955,6 +968,7 @@ export const CreateImageEditRequestBody$outboundSchema: z.ZodType<
|
|
|
955
968
|
}).transform((v) => {
|
|
956
969
|
return remap$(v, {
|
|
957
970
|
responseFormat: "response_format",
|
|
971
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
958
972
|
loadBalancer: "load_balancer",
|
|
959
973
|
});
|
|
960
974
|
});
|
|
@@ -234,6 +234,10 @@ export type CreateImageVariationOrq = {
|
|
|
234
234
|
* Retry configuration for the request
|
|
235
235
|
*/
|
|
236
236
|
retry?: CreateImageVariationRouterImagesVariationsRetry | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
239
|
+
*/
|
|
240
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
237
241
|
/**
|
|
238
242
|
* Array of fallback models to use if primary model fails
|
|
239
243
|
*/
|
|
@@ -302,6 +306,10 @@ export type CreateImageVariationRequestBody = {
|
|
|
302
306
|
* The name to display on the trace. If not specified, the default system name will be used.
|
|
303
307
|
*/
|
|
304
308
|
name?: string | undefined;
|
|
309
|
+
/**
|
|
310
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
311
|
+
*/
|
|
312
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
305
313
|
/**
|
|
306
314
|
* Array of fallback models to use if primary model fails
|
|
307
315
|
*/
|
|
@@ -879,6 +887,7 @@ export function createImageVariationRouterImagesVariationsTimeoutToJSON(
|
|
|
879
887
|
export type CreateImageVariationOrq$Outbound = {
|
|
880
888
|
name?: string | undefined;
|
|
881
889
|
retry?: CreateImageVariationRouterImagesVariationsRetry$Outbound | undefined;
|
|
890
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
882
891
|
fallbacks?:
|
|
883
892
|
| Array<CreateImageVariationRouterImagesVariationsFallbacks$Outbound>
|
|
884
893
|
| undefined;
|
|
@@ -904,6 +913,7 @@ export const CreateImageVariationOrq$outboundSchema: z.ZodType<
|
|
|
904
913
|
retry: z.lazy(() =>
|
|
905
914
|
CreateImageVariationRouterImagesVariationsRetry$outboundSchema
|
|
906
915
|
).optional(),
|
|
916
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
907
917
|
fallbacks: z.array(
|
|
908
918
|
z.lazy(() =>
|
|
909
919
|
CreateImageVariationRouterImagesVariationsFallbacks$outboundSchema
|
|
@@ -923,6 +933,7 @@ export const CreateImageVariationOrq$outboundSchema: z.ZodType<
|
|
|
923
933
|
).optional(),
|
|
924
934
|
}).transform((v) => {
|
|
925
935
|
return remap$(v, {
|
|
936
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
926
937
|
loadBalancer: "load_balancer",
|
|
927
938
|
});
|
|
928
939
|
});
|
|
@@ -944,6 +955,7 @@ export type CreateImageVariationRequestBody$Outbound = {
|
|
|
944
955
|
size: string;
|
|
945
956
|
user?: string | undefined;
|
|
946
957
|
name?: string | undefined;
|
|
958
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
947
959
|
fallbacks?: Array<CreateImageVariationFallbacks$Outbound> | undefined;
|
|
948
960
|
retry?: CreateImageVariationRetry$Outbound | undefined;
|
|
949
961
|
cache?: CreateImageVariationCache$Outbound | undefined;
|
|
@@ -969,6 +981,7 @@ export const CreateImageVariationRequestBody$outboundSchema: z.ZodType<
|
|
|
969
981
|
size: Size$outboundSchema.default("1024x1024"),
|
|
970
982
|
user: z.string().optional(),
|
|
971
983
|
name: z.string().optional(),
|
|
984
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
972
985
|
fallbacks: z.array(z.lazy(() => CreateImageVariationFallbacks$outboundSchema))
|
|
973
986
|
.optional(),
|
|
974
987
|
retry: z.lazy(() => CreateImageVariationRetry$outboundSchema).optional(),
|
|
@@ -980,6 +993,7 @@ export const CreateImageVariationRequestBody$outboundSchema: z.ZodType<
|
|
|
980
993
|
}).transform((v) => {
|
|
981
994
|
return remap$(v, {
|
|
982
995
|
responseFormat: "response_format",
|
|
996
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
983
997
|
loadBalancer: "load_balancer",
|
|
984
998
|
});
|
|
985
999
|
});
|
|
@@ -933,6 +933,10 @@ export type PromptInput = {
|
|
|
933
933
|
| components.TraceScrubbingPlugin
|
|
934
934
|
>
|
|
935
935
|
| undefined;
|
|
936
|
+
/**
|
|
937
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
938
|
+
*/
|
|
939
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
936
940
|
/**
|
|
937
941
|
* Array of fallback models to use if primary model fails
|
|
938
942
|
*/
|
|
@@ -2454,6 +2458,10 @@ export type PromptField = {
|
|
|
2454
2458
|
| components.TraceScrubbingPlugin
|
|
2455
2459
|
>
|
|
2456
2460
|
| undefined;
|
|
2461
|
+
/**
|
|
2462
|
+
* HTTP status codes that trigger fallback. Enter up to 20 unique integers from 400 to 599. When omitted or empty, defaults to [408, 429, 500, 502, 503, 504, 529].
|
|
2463
|
+
*/
|
|
2464
|
+
fallbackOnCodes?: Array<number> | undefined;
|
|
2457
2465
|
/**
|
|
2458
2466
|
* Array of fallback models to use if primary model fails
|
|
2459
2467
|
*/
|
|
@@ -3950,6 +3958,7 @@ export type PromptInput$Outbound = {
|
|
|
3950
3958
|
| components.TraceScrubbingPlugin$Outbound
|
|
3951
3959
|
>
|
|
3952
3960
|
| undefined;
|
|
3961
|
+
fallback_on_codes?: Array<number> | undefined;
|
|
3953
3962
|
fallbacks?: Array<CreatePromptFallbacks$Outbound> | undefined;
|
|
3954
3963
|
retry?: CreatePromptRetry$Outbound | undefined;
|
|
3955
3964
|
cache?: CreatePromptCache$Outbound | undefined;
|
|
@@ -4020,6 +4029,7 @@ export const PromptInput$outboundSchema: z.ZodType<
|
|
|
4020
4029
|
components.TraceScrubbingPlugin$outboundSchema,
|
|
4021
4030
|
]),
|
|
4022
4031
|
).optional(),
|
|
4032
|
+
fallbackOnCodes: z.array(z.number().int()).optional(),
|
|
4023
4033
|
fallbacks: z.array(z.lazy(() => CreatePromptFallbacks$outboundSchema))
|
|
4024
4034
|
.optional(),
|
|
4025
4035
|
retry: z.lazy(() => CreatePromptRetry$outboundSchema).optional(),
|
|
@@ -4044,6 +4054,7 @@ export const PromptInput$outboundSchema: z.ZodType<
|
|
|
4044
4054
|
topK: "top_k",
|
|
4045
4055
|
toolChoice: "tool_choice",
|
|
4046
4056
|
parallelToolCalls: "parallel_tool_calls",
|
|
4057
|
+
fallbackOnCodes: "fallback_on_codes",
|
|
4047
4058
|
loadBalancer: "load_balancer",
|
|
4048
4059
|
cacheControl: "cache_control",
|
|
4049
4060
|
promptCacheKey: "prompt_cache_key",
|
|
@@ -5891,6 +5902,7 @@ export const PromptField$inboundSchema: z.ZodType<
|
|
|
5891
5902
|
components.TraceScrubbingPlugin$inboundSchema,
|
|
5892
5903
|
]),
|
|
5893
5904
|
).optional(),
|
|
5905
|
+
fallback_on_codes: z.array(z.number().int()).optional(),
|
|
5894
5906
|
fallbacks: z.array(z.lazy(() => CreatePromptPromptsFallbacks$inboundSchema))
|
|
5895
5907
|
.optional(),
|
|
5896
5908
|
retry: z.lazy(() => CreatePromptPromptsRetry$inboundSchema).optional(),
|
|
@@ -5925,6 +5937,7 @@ export const PromptField$inboundSchema: z.ZodType<
|
|
|
5925
5937
|
"top_k": "topK",
|
|
5926
5938
|
"tool_choice": "toolChoice",
|
|
5927
5939
|
"parallel_tool_calls": "parallelToolCalls",
|
|
5940
|
+
"fallback_on_codes": "fallbackOnCodes",
|
|
5928
5941
|
"load_balancer": "loadBalancer",
|
|
5929
5942
|
"cache_control": "cacheControl",
|
|
5930
5943
|
"prompt_cache_key": "promptCacheKey",
|