@openrouter/sdk 0.8.0 → 0.9.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/esm/funcs/chatSend.d.ts +3 -3
  2. package/esm/funcs/chatSend.js +18 -2
  3. package/esm/lib/config.d.ts +2 -2
  4. package/esm/lib/config.js +2 -2
  5. package/esm/models/assistantmessage.d.ts +47 -36
  6. package/esm/models/assistantmessage.js +35 -47
  7. package/esm/models/assistantmessageimages.d.ts +33 -0
  8. package/esm/models/assistantmessageimages.js +44 -0
  9. package/esm/models/chatgenerationparams.d.ts +453 -126
  10. package/esm/models/chatgenerationparams.js +238 -97
  11. package/esm/models/chatgenerationtokenusage.d.ts +48 -0
  12. package/esm/models/chatmessagecontentitem.d.ts +15 -10
  13. package/esm/models/chatmessagecontentitem.js +25 -4
  14. package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
  15. package/esm/models/chatmessagecontentitemaudio.js +9 -2
  16. package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
  17. package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
  18. package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
  19. package/esm/models/chatmessagecontentitemimage.js +12 -2
  20. package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
  21. package/esm/models/chatmessagecontentitemtext.js +9 -2
  22. package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
  23. package/esm/models/chatmessagecontentitemvideo.js +5 -72
  24. package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
  25. package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
  26. package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
  27. package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
  28. package/esm/models/chatmessagetoolcall.d.ts +23 -2
  29. package/esm/models/chatmessagetoolcall.js +9 -2
  30. package/esm/models/chatresponse.d.ts +29 -1
  31. package/esm/models/chatresponse.js +6 -1
  32. package/esm/models/chatresponsechoice.d.ts +13 -2
  33. package/esm/models/chatresponsechoice.js +1 -2
  34. package/esm/models/chatstreamingchoice.d.ts +13 -2
  35. package/esm/models/chatstreamingchoice.js +1 -2
  36. package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
  37. package/esm/models/chatstreamingmessagechunk.js +5 -2
  38. package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
  39. package/esm/models/chatstreamingmessagetoolcall.js +9 -1
  40. package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
  41. package/esm/models/chatstreamingresponsechunk.js +11 -25
  42. package/esm/models/chatstreamoptions.d.ts +8 -0
  43. package/esm/models/debugoptions.d.ts +18 -0
  44. package/esm/models/debugoptions.js +18 -0
  45. package/esm/models/developermessage.d.ts +12 -0
  46. package/esm/models/errors/index.d.ts +0 -1
  47. package/esm/models/errors/index.js +0 -1
  48. package/esm/models/index.d.ts +12 -8
  49. package/esm/models/index.js +12 -8
  50. package/esm/models/jsonschemaconfig.d.ts +17 -2
  51. package/esm/models/jsonschemaconfig.js +1 -1
  52. package/esm/models/message.d.ts +9 -2
  53. package/esm/models/message.js +1 -1
  54. package/esm/models/modelscountresponse.d.ts +4 -4
  55. package/esm/models/modelscountresponse.js +4 -4
  56. package/esm/models/namedtoolchoice.d.ts +15 -2
  57. package/esm/models/namedtoolchoice.js +6 -1
  58. package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
  59. package/esm/models/openairesponsesreasoningconfig.js +1 -1
  60. package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
  61. package/esm/models/openresponsesnonstreamingresponse.js +3 -3
  62. package/esm/models/openresponsesreasoning.d.ts +2 -2
  63. package/esm/models/openresponsesreasoning.js +1 -1
  64. package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
  65. package/esm/models/openresponsesreasoningconfig.js +1 -1
  66. package/esm/models/openresponsesrequest.d.ts +62 -32
  67. package/esm/models/openresponsesrequest.js +61 -36
  68. package/esm/models/operations/createauthkeyscode.d.ts +24 -0
  69. package/esm/models/operations/createauthkeyscode.js +14 -0
  70. package/esm/models/operations/getgeneration.d.ts +2 -0
  71. package/esm/models/operations/getgeneration.js +2 -0
  72. package/esm/models/operations/sendchatcompletionrequest.d.ts +12 -3
  73. package/esm/models/operations/sendchatcompletionrequest.js +20 -2
  74. package/esm/models/providername.d.ts +2 -0
  75. package/esm/models/providername.js +2 -0
  76. package/esm/models/providerpreferences.d.ts +45 -14
  77. package/esm/models/providerpreferences.js +29 -15
  78. package/esm/models/providersort.d.ts +6 -0
  79. package/esm/models/providersort.js +3 -0
  80. package/esm/models/providersortconfig.d.ts +30 -2
  81. package/esm/models/providersortconfig.js +15 -2
  82. package/esm/models/reasoningdetailencrypted.d.ts +42 -0
  83. package/esm/models/reasoningdetailencrypted.js +42 -0
  84. package/esm/models/reasoningdetailsummary.d.ts +42 -0
  85. package/esm/models/reasoningdetailsummary.js +42 -0
  86. package/esm/models/reasoningdetailtext.d.ts +44 -0
  87. package/esm/models/reasoningdetailtext.js +44 -0
  88. package/esm/models/reasoningdetailunion.d.ts +19 -0
  89. package/esm/models/reasoningdetailunion.js +28 -0
  90. package/esm/models/responseformatjsonobject.d.ts +20 -0
  91. package/esm/models/responseformatjsonobject.js +21 -0
  92. package/esm/models/responseformatjsonschema.d.ts +6 -0
  93. package/esm/models/responseformattext.d.ts +15 -0
  94. package/esm/models/responseformattext.js +13 -0
  95. package/esm/models/responseformattextconfig.d.ts +3 -3
  96. package/esm/models/responseformattextconfig.js +3 -3
  97. package/esm/models/responseformattextgrammar.d.ts +6 -0
  98. package/esm/models/responseformattextpython.d.ts +15 -0
  99. package/esm/models/responseformattextpython.js +13 -0
  100. package/esm/models/responseserrorfield.d.ts +4 -4
  101. package/esm/models/responseserrorfield.js +4 -4
  102. package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
  103. package/esm/models/responsesoutputitemreasoning.js +2 -2
  104. package/esm/models/systemmessage.d.ts +12 -0
  105. package/esm/models/toolchoiceoption.d.ts +31 -0
  106. package/esm/models/toolchoiceoption.js +32 -0
  107. package/esm/models/tooldefinitionjson.d.ts +38 -4
  108. package/esm/models/tooldefinitionjson.js +14 -2
  109. package/esm/models/toolresponsemessage.d.ts +12 -0
  110. package/esm/models/usermessage.d.ts +12 -0
  111. package/esm/models/videoinput.d.ts +23 -0
  112. package/esm/models/videoinput.js +22 -0
  113. package/esm/sdk/chat.d.ts +1 -1
  114. package/esm/sdk/sdk.d.ts +2 -2
  115. package/esm/sdk/sdk.js +3 -3
  116. package/jsr.json +1 -1
  117. package/package.json +1 -1
  118. package/esm/models/chaterror.d.ts +0 -17
  119. package/esm/models/chaterror.js +0 -25
  120. package/esm/models/errors/chaterror.d.ts +0 -19
  121. package/esm/models/errors/chaterror.js +0 -32
  122. package/esm/models/providersortunion.d.ts +0 -10
  123. package/esm/models/providersortunion.js +0 -13
  124. package/esm/models/responsesformatjsonobject.d.ts +0 -20
  125. package/esm/models/responsesformatjsonobject.js +0 -21
  126. package/esm/models/schema10.d.ts +0 -33
  127. package/esm/models/schema10.js +0 -30
  128. package/esm/models/schema14.d.ts +0 -8
  129. package/esm/models/schema14.js +0 -12
  130. package/esm/models/schema17.d.ts +0 -102
  131. package/esm/models/schema17.js +0 -95
  132. package/esm/models/schema19.d.ts +0 -92
  133. package/esm/models/schema19.js +0 -109
  134. package/esm/models/schema5.d.ts +0 -86
  135. package/esm/models/schema5.js +0 -89
@@ -1,102 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
- export type Schema17ResponseHealing = {
4
- id: "response-healing";
5
- enabled?: boolean | undefined;
6
- };
7
- export declare const PdfEngine: {
8
- readonly MistralOcr: "mistral-ocr";
9
- readonly PdfText: "pdf-text";
10
- readonly Native: "native";
11
- };
12
- export type PdfEngine = OpenEnum<typeof PdfEngine>;
13
- export type Pdf = {
14
- engine?: PdfEngine | undefined;
15
- };
16
- export type Schema17FileParser = {
17
- id: "file-parser";
18
- enabled?: boolean | undefined;
19
- pdf?: Pdf | undefined;
20
- };
21
- export declare const Engine: {
22
- readonly Native: "native";
23
- readonly Exa: "exa";
24
- };
25
- export type Engine = OpenEnum<typeof Engine>;
26
- export type Schema17Web = {
27
- id: "web";
28
- enabled?: boolean | undefined;
29
- maxResults?: number | undefined;
30
- searchPrompt?: string | undefined;
31
- engine?: Engine | undefined;
32
- };
33
- export type Schema17Moderation = {
34
- id: "moderation";
35
- };
36
- export type Schema17AutoRouter = {
37
- id: "auto-router";
38
- enabled?: boolean | undefined;
39
- allowedModels?: Array<string> | undefined;
40
- };
41
- export type Schema17 = Schema17AutoRouter | Schema17Moderation | Schema17Web | Schema17FileParser | Schema17ResponseHealing;
42
- /** @internal */
43
- export type Schema17ResponseHealing$Outbound = {
44
- id: "response-healing";
45
- enabled?: boolean | undefined;
46
- };
47
- /** @internal */
48
- export declare const Schema17ResponseHealing$outboundSchema: z.ZodType<Schema17ResponseHealing$Outbound, Schema17ResponseHealing>;
49
- export declare function schema17ResponseHealingToJSON(schema17ResponseHealing: Schema17ResponseHealing): string;
50
- /** @internal */
51
- export declare const PdfEngine$outboundSchema: z.ZodType<string, PdfEngine>;
52
- /** @internal */
53
- export type Pdf$Outbound = {
54
- engine?: string | undefined;
55
- };
56
- /** @internal */
57
- export declare const Pdf$outboundSchema: z.ZodType<Pdf$Outbound, Pdf>;
58
- export declare function pdfToJSON(pdf: Pdf): string;
59
- /** @internal */
60
- export type Schema17FileParser$Outbound = {
61
- id: "file-parser";
62
- enabled?: boolean | undefined;
63
- pdf?: Pdf$Outbound | undefined;
64
- };
65
- /** @internal */
66
- export declare const Schema17FileParser$outboundSchema: z.ZodType<Schema17FileParser$Outbound, Schema17FileParser>;
67
- export declare function schema17FileParserToJSON(schema17FileParser: Schema17FileParser): string;
68
- /** @internal */
69
- export declare const Engine$outboundSchema: z.ZodType<string, Engine>;
70
- /** @internal */
71
- export type Schema17Web$Outbound = {
72
- id: "web";
73
- enabled?: boolean | undefined;
74
- max_results?: number | undefined;
75
- search_prompt?: string | undefined;
76
- engine?: string | undefined;
77
- };
78
- /** @internal */
79
- export declare const Schema17Web$outboundSchema: z.ZodType<Schema17Web$Outbound, Schema17Web>;
80
- export declare function schema17WebToJSON(schema17Web: Schema17Web): string;
81
- /** @internal */
82
- export type Schema17Moderation$Outbound = {
83
- id: "moderation";
84
- };
85
- /** @internal */
86
- export declare const Schema17Moderation$outboundSchema: z.ZodType<Schema17Moderation$Outbound, Schema17Moderation>;
87
- export declare function schema17ModerationToJSON(schema17Moderation: Schema17Moderation): string;
88
- /** @internal */
89
- export type Schema17AutoRouter$Outbound = {
90
- id: "auto-router";
91
- enabled?: boolean | undefined;
92
- allowed_models?: Array<string> | undefined;
93
- };
94
- /** @internal */
95
- export declare const Schema17AutoRouter$outboundSchema: z.ZodType<Schema17AutoRouter$Outbound, Schema17AutoRouter>;
96
- export declare function schema17AutoRouterToJSON(schema17AutoRouter: Schema17AutoRouter): string;
97
- /** @internal */
98
- export type Schema17$Outbound = Schema17AutoRouter$Outbound | Schema17Moderation$Outbound | Schema17Web$Outbound | Schema17FileParser$Outbound | Schema17ResponseHealing$Outbound;
99
- /** @internal */
100
- export declare const Schema17$outboundSchema: z.ZodType<Schema17$Outbound, Schema17>;
101
- export declare function schema17ToJSON(schema17: Schema17): string;
102
- //# sourceMappingURL=schema17.d.ts.map
@@ -1,95 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: f882e1dc50da
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import * as openEnums from "../types/enums.js";
8
- export const PdfEngine = {
9
- MistralOcr: "mistral-ocr",
10
- PdfText: "pdf-text",
11
- Native: "native",
12
- };
13
- export const Engine = {
14
- Native: "native",
15
- Exa: "exa",
16
- };
17
- /** @internal */
18
- export const Schema17ResponseHealing$outboundSchema = z.object({
19
- id: z.literal("response-healing"),
20
- enabled: z.boolean().optional(),
21
- });
22
- export function schema17ResponseHealingToJSON(schema17ResponseHealing) {
23
- return JSON.stringify(Schema17ResponseHealing$outboundSchema.parse(schema17ResponseHealing));
24
- }
25
- /** @internal */
26
- export const PdfEngine$outboundSchema = openEnums
27
- .outboundSchema(PdfEngine);
28
- /** @internal */
29
- export const Pdf$outboundSchema = z.object({
30
- engine: PdfEngine$outboundSchema.optional(),
31
- });
32
- export function pdfToJSON(pdf) {
33
- return JSON.stringify(Pdf$outboundSchema.parse(pdf));
34
- }
35
- /** @internal */
36
- export const Schema17FileParser$outboundSchema = z.object({
37
- id: z.literal("file-parser"),
38
- enabled: z.boolean().optional(),
39
- pdf: z.lazy(() => Pdf$outboundSchema).optional(),
40
- });
41
- export function schema17FileParserToJSON(schema17FileParser) {
42
- return JSON.stringify(Schema17FileParser$outboundSchema.parse(schema17FileParser));
43
- }
44
- /** @internal */
45
- export const Engine$outboundSchema = openEnums
46
- .outboundSchema(Engine);
47
- /** @internal */
48
- export const Schema17Web$outboundSchema = z.object({
49
- id: z.literal("web"),
50
- enabled: z.boolean().optional(),
51
- maxResults: z.number().optional(),
52
- searchPrompt: z.string().optional(),
53
- engine: Engine$outboundSchema.optional(),
54
- }).transform((v) => {
55
- return remap$(v, {
56
- maxResults: "max_results",
57
- searchPrompt: "search_prompt",
58
- });
59
- });
60
- export function schema17WebToJSON(schema17Web) {
61
- return JSON.stringify(Schema17Web$outboundSchema.parse(schema17Web));
62
- }
63
- /** @internal */
64
- export const Schema17Moderation$outboundSchema = z.object({
65
- id: z.literal("moderation"),
66
- });
67
- export function schema17ModerationToJSON(schema17Moderation) {
68
- return JSON.stringify(Schema17Moderation$outboundSchema.parse(schema17Moderation));
69
- }
70
- /** @internal */
71
- export const Schema17AutoRouter$outboundSchema = z.object({
72
- id: z.literal("auto-router"),
73
- enabled: z.boolean().optional(),
74
- allowedModels: z.array(z.string()).optional(),
75
- }).transform((v) => {
76
- return remap$(v, {
77
- allowedModels: "allowed_models",
78
- });
79
- });
80
- export function schema17AutoRouterToJSON(schema17AutoRouter) {
81
- return JSON.stringify(Schema17AutoRouter$outboundSchema.parse(schema17AutoRouter));
82
- }
83
- /** @internal */
84
- export const Schema17$outboundSchema = z
85
- .union([
86
- z.lazy(() => Schema17AutoRouter$outboundSchema),
87
- z.lazy(() => Schema17Moderation$outboundSchema),
88
- z.lazy(() => Schema17Web$outboundSchema),
89
- z.lazy(() => Schema17FileParser$outboundSchema),
90
- z.lazy(() => Schema17ResponseHealing$outboundSchema),
91
- ]);
92
- export function schema17ToJSON(schema17) {
93
- return JSON.stringify(Schema17$outboundSchema.parse(schema17));
94
- }
95
- //# sourceMappingURL=schema17.js.map
@@ -1,92 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
- import { Result as SafeParseResult } from "../types/fp.js";
4
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- export declare const Schema21: {
6
- readonly Unknown: "unknown";
7
- readonly OpenaiResponsesV1: "openai-responses-v1";
8
- readonly AzureOpenaiResponsesV1: "azure-openai-responses-v1";
9
- readonly XaiResponsesV1: "xai-responses-v1";
10
- readonly AnthropicClaudeV1: "anthropic-claude-v1";
11
- readonly GoogleGeminiV1: "google-gemini-v1";
12
- };
13
- export type Schema21 = OpenEnum<typeof Schema21>;
14
- export type Schema19ReasoningText = {
15
- type: "reasoning.text";
16
- text?: string | null | undefined;
17
- signature?: string | null | undefined;
18
- id?: string | null | undefined;
19
- format?: Schema21 | null | undefined;
20
- index?: number | undefined;
21
- };
22
- export type Schema19ReasoningEncrypted = {
23
- type: "reasoning.encrypted";
24
- data: string;
25
- id?: string | null | undefined;
26
- format?: Schema21 | null | undefined;
27
- index?: number | undefined;
28
- };
29
- export type Schema19ReasoningSummary = {
30
- type: "reasoning.summary";
31
- summary: string;
32
- id?: string | null | undefined;
33
- format?: Schema21 | null | undefined;
34
- index?: number | undefined;
35
- };
36
- export type Schema19 = Schema19ReasoningSummary | Schema19ReasoningEncrypted | Schema19ReasoningText;
37
- /** @internal */
38
- export declare const Schema21$inboundSchema: z.ZodType<Schema21, unknown>;
39
- /** @internal */
40
- export declare const Schema21$outboundSchema: z.ZodType<string, Schema21>;
41
- /** @internal */
42
- export declare const Schema19ReasoningText$inboundSchema: z.ZodType<Schema19ReasoningText, unknown>;
43
- /** @internal */
44
- export type Schema19ReasoningText$Outbound = {
45
- type: "reasoning.text";
46
- text?: string | null | undefined;
47
- signature?: string | null | undefined;
48
- id?: string | null | undefined;
49
- format?: string | null | undefined;
50
- index?: number | undefined;
51
- };
52
- /** @internal */
53
- export declare const Schema19ReasoningText$outboundSchema: z.ZodType<Schema19ReasoningText$Outbound, Schema19ReasoningText>;
54
- export declare function schema19ReasoningTextToJSON(schema19ReasoningText: Schema19ReasoningText): string;
55
- export declare function schema19ReasoningTextFromJSON(jsonString: string): SafeParseResult<Schema19ReasoningText, SDKValidationError>;
56
- /** @internal */
57
- export declare const Schema19ReasoningEncrypted$inboundSchema: z.ZodType<Schema19ReasoningEncrypted, unknown>;
58
- /** @internal */
59
- export type Schema19ReasoningEncrypted$Outbound = {
60
- type: "reasoning.encrypted";
61
- data: string;
62
- id?: string | null | undefined;
63
- format?: string | null | undefined;
64
- index?: number | undefined;
65
- };
66
- /** @internal */
67
- export declare const Schema19ReasoningEncrypted$outboundSchema: z.ZodType<Schema19ReasoningEncrypted$Outbound, Schema19ReasoningEncrypted>;
68
- export declare function schema19ReasoningEncryptedToJSON(schema19ReasoningEncrypted: Schema19ReasoningEncrypted): string;
69
- export declare function schema19ReasoningEncryptedFromJSON(jsonString: string): SafeParseResult<Schema19ReasoningEncrypted, SDKValidationError>;
70
- /** @internal */
71
- export declare const Schema19ReasoningSummary$inboundSchema: z.ZodType<Schema19ReasoningSummary, unknown>;
72
- /** @internal */
73
- export type Schema19ReasoningSummary$Outbound = {
74
- type: "reasoning.summary";
75
- summary: string;
76
- id?: string | null | undefined;
77
- format?: string | null | undefined;
78
- index?: number | undefined;
79
- };
80
- /** @internal */
81
- export declare const Schema19ReasoningSummary$outboundSchema: z.ZodType<Schema19ReasoningSummary$Outbound, Schema19ReasoningSummary>;
82
- export declare function schema19ReasoningSummaryToJSON(schema19ReasoningSummary: Schema19ReasoningSummary): string;
83
- export declare function schema19ReasoningSummaryFromJSON(jsonString: string): SafeParseResult<Schema19ReasoningSummary, SDKValidationError>;
84
- /** @internal */
85
- export declare const Schema19$inboundSchema: z.ZodType<Schema19, unknown>;
86
- /** @internal */
87
- export type Schema19$Outbound = Schema19ReasoningSummary$Outbound | Schema19ReasoningEncrypted$Outbound | Schema19ReasoningText$Outbound;
88
- /** @internal */
89
- export declare const Schema19$outboundSchema: z.ZodType<Schema19$Outbound, Schema19>;
90
- export declare function schema19ToJSON(schema19: Schema19): string;
91
- export declare function schema19FromJSON(jsonString: string): SafeParseResult<Schema19, SDKValidationError>;
92
- //# sourceMappingURL=schema19.d.ts.map
@@ -1,109 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 81bc92589adb
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- import * as openEnums from "../types/enums.js";
8
- export const Schema21 = {
9
- Unknown: "unknown",
10
- OpenaiResponsesV1: "openai-responses-v1",
11
- AzureOpenaiResponsesV1: "azure-openai-responses-v1",
12
- XaiResponsesV1: "xai-responses-v1",
13
- AnthropicClaudeV1: "anthropic-claude-v1",
14
- GoogleGeminiV1: "google-gemini-v1",
15
- };
16
- /** @internal */
17
- export const Schema21$inboundSchema = openEnums
18
- .inboundSchema(Schema21);
19
- /** @internal */
20
- export const Schema21$outboundSchema = openEnums
21
- .outboundSchema(Schema21);
22
- /** @internal */
23
- export const Schema19ReasoningText$inboundSchema = z.object({
24
- type: z.literal("reasoning.text"),
25
- text: z.nullable(z.string()).optional(),
26
- signature: z.nullable(z.string()).optional(),
27
- id: z.nullable(z.string()).optional(),
28
- format: z.nullable(Schema21$inboundSchema).optional(),
29
- index: z.number().optional(),
30
- });
31
- /** @internal */
32
- export const Schema19ReasoningText$outboundSchema = z.object({
33
- type: z.literal("reasoning.text"),
34
- text: z.nullable(z.string()).optional(),
35
- signature: z.nullable(z.string()).optional(),
36
- id: z.nullable(z.string()).optional(),
37
- format: z.nullable(Schema21$outboundSchema).optional(),
38
- index: z.number().optional(),
39
- });
40
- export function schema19ReasoningTextToJSON(schema19ReasoningText) {
41
- return JSON.stringify(Schema19ReasoningText$outboundSchema.parse(schema19ReasoningText));
42
- }
43
- export function schema19ReasoningTextFromJSON(jsonString) {
44
- return safeParse(jsonString, (x) => Schema19ReasoningText$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema19ReasoningText' from JSON`);
45
- }
46
- /** @internal */
47
- export const Schema19ReasoningEncrypted$inboundSchema = z.object({
48
- type: z.literal("reasoning.encrypted"),
49
- data: z.string(),
50
- id: z.nullable(z.string()).optional(),
51
- format: z.nullable(Schema21$inboundSchema).optional(),
52
- index: z.number().optional(),
53
- });
54
- /** @internal */
55
- export const Schema19ReasoningEncrypted$outboundSchema = z.object({
56
- type: z.literal("reasoning.encrypted"),
57
- data: z.string(),
58
- id: z.nullable(z.string()).optional(),
59
- format: z.nullable(Schema21$outboundSchema).optional(),
60
- index: z.number().optional(),
61
- });
62
- export function schema19ReasoningEncryptedToJSON(schema19ReasoningEncrypted) {
63
- return JSON.stringify(Schema19ReasoningEncrypted$outboundSchema.parse(schema19ReasoningEncrypted));
64
- }
65
- export function schema19ReasoningEncryptedFromJSON(jsonString) {
66
- return safeParse(jsonString, (x) => Schema19ReasoningEncrypted$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema19ReasoningEncrypted' from JSON`);
67
- }
68
- /** @internal */
69
- export const Schema19ReasoningSummary$inboundSchema = z.object({
70
- type: z.literal("reasoning.summary"),
71
- summary: z.string(),
72
- id: z.nullable(z.string()).optional(),
73
- format: z.nullable(Schema21$inboundSchema).optional(),
74
- index: z.number().optional(),
75
- });
76
- /** @internal */
77
- export const Schema19ReasoningSummary$outboundSchema = z.object({
78
- type: z.literal("reasoning.summary"),
79
- summary: z.string(),
80
- id: z.nullable(z.string()).optional(),
81
- format: z.nullable(Schema21$outboundSchema).optional(),
82
- index: z.number().optional(),
83
- });
84
- export function schema19ReasoningSummaryToJSON(schema19ReasoningSummary) {
85
- return JSON.stringify(Schema19ReasoningSummary$outboundSchema.parse(schema19ReasoningSummary));
86
- }
87
- export function schema19ReasoningSummaryFromJSON(jsonString) {
88
- return safeParse(jsonString, (x) => Schema19ReasoningSummary$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema19ReasoningSummary' from JSON`);
89
- }
90
- /** @internal */
91
- export const Schema19$inboundSchema = z.union([
92
- z.lazy(() => Schema19ReasoningSummary$inboundSchema),
93
- z.lazy(() => Schema19ReasoningEncrypted$inboundSchema),
94
- z.lazy(() => Schema19ReasoningText$inboundSchema),
95
- ]);
96
- /** @internal */
97
- export const Schema19$outboundSchema = z
98
- .union([
99
- z.lazy(() => Schema19ReasoningSummary$outboundSchema),
100
- z.lazy(() => Schema19ReasoningEncrypted$outboundSchema),
101
- z.lazy(() => Schema19ReasoningText$outboundSchema),
102
- ]);
103
- export function schema19ToJSON(schema19) {
104
- return JSON.stringify(Schema19$outboundSchema.parse(schema19));
105
- }
106
- export function schema19FromJSON(jsonString) {
107
- return safeParse(jsonString, (x) => Schema19$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schema19' from JSON`);
108
- }
109
- //# sourceMappingURL=schema19.js.map
@@ -1,86 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
3
- export declare const Schema5Enum: {
4
- readonly Ai21: "AI21";
5
- readonly AionLabs: "AionLabs";
6
- readonly Alibaba: "Alibaba";
7
- readonly Ambient: "Ambient";
8
- readonly AmazonBedrock: "Amazon Bedrock";
9
- readonly AmazonNova: "Amazon Nova";
10
- readonly Anthropic: "Anthropic";
11
- readonly ArceeAI: "Arcee AI";
12
- readonly AtlasCloud: "AtlasCloud";
13
- readonly Avian: "Avian";
14
- readonly Azure: "Azure";
15
- readonly BaseTen: "BaseTen";
16
- readonly BytePlus: "BytePlus";
17
- readonly BlackForestLabs: "Black Forest Labs";
18
- readonly Cerebras: "Cerebras";
19
- readonly Chutes: "Chutes";
20
- readonly Cirrascale: "Cirrascale";
21
- readonly Clarifai: "Clarifai";
22
- readonly Cloudflare: "Cloudflare";
23
- readonly Cohere: "Cohere";
24
- readonly Crusoe: "Crusoe";
25
- readonly DeepInfra: "DeepInfra";
26
- readonly DeepSeek: "DeepSeek";
27
- readonly Featherless: "Featherless";
28
- readonly Fireworks: "Fireworks";
29
- readonly Friendli: "Friendli";
30
- readonly GMICloud: "GMICloud";
31
- readonly Google: "Google";
32
- readonly GoogleAIStudio: "Google AI Studio";
33
- readonly Groq: "Groq";
34
- readonly Hyperbolic: "Hyperbolic";
35
- readonly Inception: "Inception";
36
- readonly Inceptron: "Inceptron";
37
- readonly InferenceNet: "InferenceNet";
38
- readonly Infermatic: "Infermatic";
39
- readonly Inflection: "Inflection";
40
- readonly Liquid: "Liquid";
41
- readonly Mara: "Mara";
42
- readonly Mancer2: "Mancer 2";
43
- readonly Minimax: "Minimax";
44
- readonly ModelRun: "ModelRun";
45
- readonly Mistral: "Mistral";
46
- readonly Modular: "Modular";
47
- readonly MoonshotAI: "Moonshot AI";
48
- readonly Morph: "Morph";
49
- readonly NCompass: "NCompass";
50
- readonly Nebius: "Nebius";
51
- readonly NextBit: "NextBit";
52
- readonly Novita: "Novita";
53
- readonly Nvidia: "Nvidia";
54
- readonly OpenAI: "OpenAI";
55
- readonly OpenInference: "OpenInference";
56
- readonly Parasail: "Parasail";
57
- readonly Perplexity: "Perplexity";
58
- readonly Phala: "Phala";
59
- readonly Relace: "Relace";
60
- readonly SambaNova: "SambaNova";
61
- readonly Seed: "Seed";
62
- readonly SiliconFlow: "SiliconFlow";
63
- readonly Sourceful: "Sourceful";
64
- readonly StepFun: "StepFun";
65
- readonly Stealth: "Stealth";
66
- readonly StreamLake: "StreamLake";
67
- readonly Switchpoint: "Switchpoint";
68
- readonly Together: "Together";
69
- readonly Upstage: "Upstage";
70
- readonly Venice: "Venice";
71
- readonly WandB: "WandB";
72
- readonly Xiaomi: "Xiaomi";
73
- readonly XAI: "xAI";
74
- readonly ZAi: "Z.AI";
75
- readonly FakeProvider: "FakeProvider";
76
- };
77
- export type Schema5Enum = OpenEnum<typeof Schema5Enum>;
78
- export type Schema5 = Schema5Enum | string;
79
- /** @internal */
80
- export declare const Schema5Enum$outboundSchema: z.ZodType<string, Schema5Enum>;
81
- /** @internal */
82
- export type Schema5$Outbound = string | string;
83
- /** @internal */
84
- export declare const Schema5$outboundSchema: z.ZodType<Schema5$Outbound, Schema5>;
85
- export declare function schema5ToJSON(schema5: Schema5): string;
86
- //# sourceMappingURL=schema5.d.ts.map
@@ -1,89 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: ceb3f15ca425
4
- */
5
- import * as z from "zod/v4";
6
- import * as openEnums from "../types/enums.js";
7
- export const Schema5Enum = {
8
- Ai21: "AI21",
9
- AionLabs: "AionLabs",
10
- Alibaba: "Alibaba",
11
- Ambient: "Ambient",
12
- AmazonBedrock: "Amazon Bedrock",
13
- AmazonNova: "Amazon Nova",
14
- Anthropic: "Anthropic",
15
- ArceeAI: "Arcee AI",
16
- AtlasCloud: "AtlasCloud",
17
- Avian: "Avian",
18
- Azure: "Azure",
19
- BaseTen: "BaseTen",
20
- BytePlus: "BytePlus",
21
- BlackForestLabs: "Black Forest Labs",
22
- Cerebras: "Cerebras",
23
- Chutes: "Chutes",
24
- Cirrascale: "Cirrascale",
25
- Clarifai: "Clarifai",
26
- Cloudflare: "Cloudflare",
27
- Cohere: "Cohere",
28
- Crusoe: "Crusoe",
29
- DeepInfra: "DeepInfra",
30
- DeepSeek: "DeepSeek",
31
- Featherless: "Featherless",
32
- Fireworks: "Fireworks",
33
- Friendli: "Friendli",
34
- GMICloud: "GMICloud",
35
- Google: "Google",
36
- GoogleAIStudio: "Google AI Studio",
37
- Groq: "Groq",
38
- Hyperbolic: "Hyperbolic",
39
- Inception: "Inception",
40
- Inceptron: "Inceptron",
41
- InferenceNet: "InferenceNet",
42
- Infermatic: "Infermatic",
43
- Inflection: "Inflection",
44
- Liquid: "Liquid",
45
- Mara: "Mara",
46
- Mancer2: "Mancer 2",
47
- Minimax: "Minimax",
48
- ModelRun: "ModelRun",
49
- Mistral: "Mistral",
50
- Modular: "Modular",
51
- MoonshotAI: "Moonshot AI",
52
- Morph: "Morph",
53
- NCompass: "NCompass",
54
- Nebius: "Nebius",
55
- NextBit: "NextBit",
56
- Novita: "Novita",
57
- Nvidia: "Nvidia",
58
- OpenAI: "OpenAI",
59
- OpenInference: "OpenInference",
60
- Parasail: "Parasail",
61
- Perplexity: "Perplexity",
62
- Phala: "Phala",
63
- Relace: "Relace",
64
- SambaNova: "SambaNova",
65
- Seed: "Seed",
66
- SiliconFlow: "SiliconFlow",
67
- Sourceful: "Sourceful",
68
- StepFun: "StepFun",
69
- Stealth: "Stealth",
70
- StreamLake: "StreamLake",
71
- Switchpoint: "Switchpoint",
72
- Together: "Together",
73
- Upstage: "Upstage",
74
- Venice: "Venice",
75
- WandB: "WandB",
76
- Xiaomi: "Xiaomi",
77
- XAI: "xAI",
78
- ZAi: "Z.AI",
79
- FakeProvider: "FakeProvider",
80
- };
81
- /** @internal */
82
- export const Schema5Enum$outboundSchema = openEnums.outboundSchema(Schema5Enum);
83
- /** @internal */
84
- export const Schema5$outboundSchema = z
85
- .union([Schema5Enum$outboundSchema, z.string()]);
86
- export function schema5ToJSON(schema5) {
87
- return JSON.stringify(Schema5$outboundSchema.parse(schema5));
88
- }
89
- //# sourceMappingURL=schema5.js.map