@openrouter/sdk 1.5.46 → 1.5.48

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 (37) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/byokproviderslug.d.ts +1 -0
  4. package/esm/models/byokproviderslug.js +1 -0
  5. package/esm/models/index.d.ts +0 -7
  6. package/esm/models/index.js +0 -7
  7. package/esm/models/operations/createkeys.d.ts +1 -1
  8. package/esm/models/operations/gettaskclassifications.d.ts +4 -4
  9. package/esm/models/operations/gettaskclassifications.js +3 -3
  10. package/esm/models/operations/index.d.ts +0 -1
  11. package/esm/models/operations/index.js +0 -1
  12. package/esm/models/operations/listbyokkeys.d.ts +1 -0
  13. package/esm/models/operations/listbyokkeys.js +1 -0
  14. package/esm/models/videogenerationrequest.d.ts +36 -2
  15. package/esm/models/videogenerationrequest.js +21 -0
  16. package/esm/sdk/providers.d.ts +0 -8
  17. package/esm/sdk/providers.js +0 -10
  18. package/jsr.json +1 -1
  19. package/package.json +5 -5
  20. package/esm/funcs/providersListProviderEndpoints.d.ts +0 -19
  21. package/esm/funcs/providersListProviderEndpoints.js +0 -108
  22. package/esm/models/endpointsummary.d.ts +0 -65
  23. package/esm/models/endpointsummary.js +0 -48
  24. package/esm/models/endpointtestprofile.d.ts +0 -271
  25. package/esm/models/endpointtestprofile.js +0 -252
  26. package/esm/models/operations/listproviderendpoints.d.ts +0 -106
  27. package/esm/models/operations/listproviderendpoints.js +0 -55
  28. package/esm/models/providerendpoints.d.ts +0 -34
  29. package/esm/models/providerendpoints.js +0 -32
  30. package/esm/models/providerendpointsresponse.d.ts +0 -11
  31. package/esm/models/providerendpointsresponse.js +0 -15
  32. package/esm/models/providerendpointstats.d.ts +0 -11
  33. package/esm/models/providerendpointstats.js +0 -17
  34. package/esm/models/providerendpointstatsavailable.d.ts +0 -66
  35. package/esm/models/providerendpointstatsavailable.js +0 -51
  36. package/esm/models/providerendpointstatsunavailable.d.ts +0 -10
  37. package/esm/models/providerendpointstatsunavailable.js +0 -14
@@ -1,271 +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
- /**
6
- * Reasoning return mechanism the endpoint uses when neither its features nor the model set one
7
- */
8
- export declare const DefaultReasoningReturnMechanism: {
9
- readonly ContentString: "content-string";
10
- readonly ReasoningContent: "reasoning-content";
11
- readonly Reasoning: "reasoning";
12
- readonly None: "none";
13
- };
14
- /**
15
- * Reasoning return mechanism the endpoint uses when neither its features nor the model set one
16
- */
17
- export type DefaultReasoningReturnMechanism = OpenEnum<typeof DefaultReasoningReturnMechanism>;
18
- /**
19
- * How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
20
- */
21
- export declare const InstructionRoleSupport: {
22
- readonly Developer: "developer";
23
- readonly System: "system";
24
- readonly UserOnly: "user-only";
25
- };
26
- /**
27
- * How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
28
- */
29
- export type InstructionRoleSupport = OpenEnum<typeof InstructionRoleSupport>;
30
- export type ChatTemplateConfig = {
31
- /**
32
- * How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
33
- */
34
- instructionRoleSupport?: InstructionRoleSupport | null | undefined;
35
- /**
36
- * Whether to hoist and merge system messages
37
- */
38
- shouldHoistAndMergeSystemMessages?: boolean | null | undefined;
39
- /**
40
- * Whether the model accepts system/developer messages that appear after the first user/assistant turn. When false, mid-session instruction messages are downgraded to wrapped user messages. Overridable per-endpoint.
41
- */
42
- supportsMidSessionSystem?: boolean | null | undefined;
43
- };
44
- export declare const FeaturesDefaultReasoningEffort: {
45
- readonly Max: "max";
46
- readonly Xhigh: "xhigh";
47
- readonly High: "high";
48
- readonly Medium: "medium";
49
- readonly Low: "low";
50
- readonly Minimal: "minimal";
51
- };
52
- export type FeaturesDefaultReasoningEffort = OpenEnum<typeof FeaturesDefaultReasoningEffort>;
53
- /**
54
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
55
- */
56
- export declare const FeaturesReasoningReturnMechanism: {
57
- readonly ContentString: "content-string";
58
- readonly ReasoningContent: "reasoning-content";
59
- readonly Reasoning: "reasoning";
60
- readonly None: "none";
61
- };
62
- /**
63
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
64
- */
65
- export type FeaturesReasoningReturnMechanism = OpenEnum<typeof FeaturesReasoningReturnMechanism>;
66
- export declare const FeaturesSupportedReasoningEffort: {
67
- readonly Max: "max";
68
- readonly Xhigh: "xhigh";
69
- readonly High: "high";
70
- readonly Medium: "medium";
71
- readonly Low: "low";
72
- readonly Minimal: "minimal";
73
- };
74
- export type FeaturesSupportedReasoningEffort = OpenEnum<typeof FeaturesSupportedReasoningEffort>;
75
- export type FeaturesReasoningConfig = {
76
- defaultReasoningEffort?: FeaturesDefaultReasoningEffort | null | undefined;
77
- /**
78
- * Default reasoning enabled state for the model. When true, reasoning is enabled by default; when false, disabled by default. User-specified values always override this.
79
- */
80
- defaultReasoningEnabled?: boolean | null | undefined;
81
- endToken?: string | null | undefined;
82
- isMandatoryReasoning?: boolean | null | undefined;
83
- /**
84
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
85
- */
86
- reasoningReturnMechanism?: FeaturesReasoningReturnMechanism | null | undefined;
87
- startToken?: string | null | undefined;
88
- /**
89
- * List of reasoning effort values the model accepts upstream
90
- */
91
- supportedReasoningEfforts?: Array<FeaturesSupportedReasoningEffort> | null | undefined;
92
- /**
93
- * Whether the model supports reasoning effort
94
- */
95
- supportsReasoningEffort?: boolean | null | undefined;
96
- /**
97
- * Whether the model supports reasoning max tokens
98
- */
99
- supportsReasoningMaxTokens?: boolean | null | undefined;
100
- systemPrompt?: string | null | undefined;
101
- };
102
- export declare const RequiredInputModality: {
103
- readonly Text: "text";
104
- readonly Image: "image";
105
- readonly Audio: "audio";
106
- readonly Video: "video";
107
- };
108
- export type RequiredInputModality = OpenEnum<typeof RequiredInputModality>;
109
- export type Features = {
110
- chatTemplateConfig?: ChatTemplateConfig | null | undefined;
111
- reasoningConfig?: FeaturesReasoningConfig | null | undefined;
112
- /**
113
- * Input modalities every request to the model must include, e.g. ["video"] for video-to-video-only models. Requests missing a required modality are rejected before dispatch. A required text modality is satisfied by the prompt. Currently enforced on the video generation request path.
114
- */
115
- requiredInputModalities?: Array<RequiredInputModality> | null | undefined;
116
- };
117
- export declare const EndpointTestProfileInputModality: {
118
- readonly Text: "text";
119
- readonly Image: "image";
120
- readonly File: "file";
121
- readonly Audio: "audio";
122
- readonly Video: "video";
123
- };
124
- export type EndpointTestProfileInputModality = OpenEnum<typeof EndpointTestProfileInputModality>;
125
- export declare const EndpointTestProfileOutputModality: {
126
- readonly Text: "text";
127
- readonly Image: "image";
128
- readonly Embeddings: "embeddings";
129
- readonly Audio: "audio";
130
- readonly Video: "video";
131
- readonly Rerank: "rerank";
132
- readonly Decisions: "decisions";
133
- readonly Speech: "speech";
134
- readonly Transcription: "transcription";
135
- };
136
- export type EndpointTestProfileOutputModality = OpenEnum<typeof EndpointTestProfileOutputModality>;
137
- export declare const DefaultReasoningEffort: {
138
- readonly Max: "max";
139
- readonly Xhigh: "xhigh";
140
- readonly High: "high";
141
- readonly Medium: "medium";
142
- readonly Low: "low";
143
- readonly Minimal: "minimal";
144
- };
145
- export type DefaultReasoningEffort = OpenEnum<typeof DefaultReasoningEffort>;
146
- /**
147
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
148
- */
149
- export declare const ReasoningReturnMechanism: {
150
- readonly ContentString: "content-string";
151
- readonly ReasoningContent: "reasoning-content";
152
- readonly Reasoning: "reasoning";
153
- readonly None: "none";
154
- };
155
- /**
156
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
157
- */
158
- export type ReasoningReturnMechanism = OpenEnum<typeof ReasoningReturnMechanism>;
159
- export declare const SupportedReasoningEffort: {
160
- readonly Max: "max";
161
- readonly Xhigh: "xhigh";
162
- readonly High: "high";
163
- readonly Medium: "medium";
164
- readonly Low: "low";
165
- readonly Minimal: "minimal";
166
- };
167
- export type SupportedReasoningEffort = OpenEnum<typeof SupportedReasoningEffort>;
168
- export type EndpointTestProfileReasoningConfig = {
169
- defaultReasoningEffort?: DefaultReasoningEffort | null | undefined;
170
- /**
171
- * Default reasoning enabled state for the model. When true, reasoning is enabled by default; when false, disabled by default. User-specified values always override this.
172
- */
173
- defaultReasoningEnabled?: boolean | null | undefined;
174
- endToken?: string | null | undefined;
175
- isMandatoryReasoning?: boolean | null | undefined;
176
- /**
177
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
178
- */
179
- reasoningReturnMechanism?: ReasoningReturnMechanism | null | undefined;
180
- startToken?: string | null | undefined;
181
- /**
182
- * List of reasoning effort values the model accepts upstream
183
- */
184
- supportedReasoningEfforts?: Array<SupportedReasoningEffort> | null | undefined;
185
- /**
186
- * Whether the model supports reasoning effort
187
- */
188
- supportsReasoningEffort?: boolean | null | undefined;
189
- /**
190
- * Whether the model supports reasoning max tokens
191
- */
192
- supportsReasoningMaxTokens?: boolean | null | undefined;
193
- systemPrompt?: string | null | undefined;
194
- };
195
- export type EndpointTestProfileModel = {
196
- features: Features | null;
197
- inputModalities: Array<EndpointTestProfileInputModality>;
198
- outputModalities: Array<EndpointTestProfileOutputModality>;
199
- reasoningConfig: EndpointTestProfileReasoningConfig | null;
200
- /**
201
- * Public model slug
202
- */
203
- slug: string;
204
- supportsReasoning: boolean;
205
- };
206
- export type EndpointTestProfile = {
207
- /**
208
- * Context length the endpoint serves: its override, else the model's
209
- */
210
- contextLength: number | null;
211
- /**
212
- * Reasoning return mechanism the endpoint uses when neither its features nor the model set one
213
- */
214
- defaultReasoningReturnMechanism: DefaultReasoningReturnMechanism | null;
215
- /**
216
- * Adapter the endpoint is served through: its provider override, else the provider's; null when unresolved
217
- */
218
- effectiveAdapterName: string | null;
219
- /**
220
- * Endpoint feature flags; null when unset or invalid
221
- */
222
- endpointFeatures: {
223
- [k: string]: any;
224
- } | null;
225
- /**
226
- * Whether the endpoint serves a closed lab model through the lab or an official partner
227
- */
228
- isLabTrusted: boolean;
229
- model: EndpointTestProfileModel;
230
- };
231
- /** @internal */
232
- export declare const DefaultReasoningReturnMechanism$inboundSchema: z.ZodType<DefaultReasoningReturnMechanism, unknown>;
233
- /** @internal */
234
- export declare const InstructionRoleSupport$inboundSchema: z.ZodType<InstructionRoleSupport, unknown>;
235
- /** @internal */
236
- export declare const ChatTemplateConfig$inboundSchema: z.ZodType<ChatTemplateConfig, unknown>;
237
- export declare function chatTemplateConfigFromJSON(jsonString: string): SafeParseResult<ChatTemplateConfig, SDKValidationError>;
238
- /** @internal */
239
- export declare const FeaturesDefaultReasoningEffort$inboundSchema: z.ZodType<FeaturesDefaultReasoningEffort, unknown>;
240
- /** @internal */
241
- export declare const FeaturesReasoningReturnMechanism$inboundSchema: z.ZodType<FeaturesReasoningReturnMechanism, unknown>;
242
- /** @internal */
243
- export declare const FeaturesSupportedReasoningEffort$inboundSchema: z.ZodType<FeaturesSupportedReasoningEffort, unknown>;
244
- /** @internal */
245
- export declare const FeaturesReasoningConfig$inboundSchema: z.ZodType<FeaturesReasoningConfig, unknown>;
246
- export declare function featuresReasoningConfigFromJSON(jsonString: string): SafeParseResult<FeaturesReasoningConfig, SDKValidationError>;
247
- /** @internal */
248
- export declare const RequiredInputModality$inboundSchema: z.ZodType<RequiredInputModality, unknown>;
249
- /** @internal */
250
- export declare const Features$inboundSchema: z.ZodType<Features, unknown>;
251
- export declare function featuresFromJSON(jsonString: string): SafeParseResult<Features, SDKValidationError>;
252
- /** @internal */
253
- export declare const EndpointTestProfileInputModality$inboundSchema: z.ZodType<EndpointTestProfileInputModality, unknown>;
254
- /** @internal */
255
- export declare const EndpointTestProfileOutputModality$inboundSchema: z.ZodType<EndpointTestProfileOutputModality, unknown>;
256
- /** @internal */
257
- export declare const DefaultReasoningEffort$inboundSchema: z.ZodType<DefaultReasoningEffort, unknown>;
258
- /** @internal */
259
- export declare const ReasoningReturnMechanism$inboundSchema: z.ZodType<ReasoningReturnMechanism, unknown>;
260
- /** @internal */
261
- export declare const SupportedReasoningEffort$inboundSchema: z.ZodType<SupportedReasoningEffort, unknown>;
262
- /** @internal */
263
- export declare const EndpointTestProfileReasoningConfig$inboundSchema: z.ZodType<EndpointTestProfileReasoningConfig, unknown>;
264
- export declare function endpointTestProfileReasoningConfigFromJSON(jsonString: string): SafeParseResult<EndpointTestProfileReasoningConfig, SDKValidationError>;
265
- /** @internal */
266
- export declare const EndpointTestProfileModel$inboundSchema: z.ZodType<EndpointTestProfileModel, unknown>;
267
- export declare function endpointTestProfileModelFromJSON(jsonString: string): SafeParseResult<EndpointTestProfileModel, SDKValidationError>;
268
- /** @internal */
269
- export declare const EndpointTestProfile$inboundSchema: z.ZodType<EndpointTestProfile, unknown>;
270
- export declare function endpointTestProfileFromJSON(jsonString: string): SafeParseResult<EndpointTestProfile, SDKValidationError>;
271
- //# sourceMappingURL=endpointtestprofile.d.ts.map
@@ -1,252 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: ed343fe8be16
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import * as openEnums from "../types/enums.js";
9
- /**
10
- * Reasoning return mechanism the endpoint uses when neither its features nor the model set one
11
- */
12
- export const DefaultReasoningReturnMechanism = {
13
- ContentString: "content-string",
14
- ReasoningContent: "reasoning-content",
15
- Reasoning: "reasoning",
16
- None: "none",
17
- };
18
- /**
19
- * How leading instruction (developer/system) messages are mapped before reaching a chat-completions provider. 'developer' keeps the developer role, 'system' downgrades developer to system, 'user-only' downgrades both to a wrapped user message. Overridable per-endpoint.
20
- */
21
- export const InstructionRoleSupport = {
22
- Developer: "developer",
23
- System: "system",
24
- UserOnly: "user-only",
25
- };
26
- export const FeaturesDefaultReasoningEffort = {
27
- Max: "max",
28
- Xhigh: "xhigh",
29
- High: "high",
30
- Medium: "medium",
31
- Low: "low",
32
- Minimal: "minimal",
33
- };
34
- /**
35
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
36
- */
37
- export const FeaturesReasoningReturnMechanism = {
38
- ContentString: "content-string",
39
- ReasoningContent: "reasoning-content",
40
- Reasoning: "reasoning",
41
- None: "none",
42
- };
43
- export const FeaturesSupportedReasoningEffort = {
44
- Max: "max",
45
- Xhigh: "xhigh",
46
- High: "high",
47
- Medium: "medium",
48
- Low: "low",
49
- Minimal: "minimal",
50
- };
51
- export const RequiredInputModality = {
52
- Text: "text",
53
- Image: "image",
54
- Audio: "audio",
55
- Video: "video",
56
- };
57
- export const EndpointTestProfileInputModality = {
58
- Text: "text",
59
- Image: "image",
60
- File: "file",
61
- Audio: "audio",
62
- Video: "video",
63
- };
64
- export const EndpointTestProfileOutputModality = {
65
- Text: "text",
66
- Image: "image",
67
- Embeddings: "embeddings",
68
- Audio: "audio",
69
- Video: "video",
70
- Rerank: "rerank",
71
- Decisions: "decisions",
72
- Speech: "speech",
73
- Transcription: "transcription",
74
- };
75
- export const DefaultReasoningEffort = {
76
- Max: "max",
77
- Xhigh: "xhigh",
78
- High: "high",
79
- Medium: "medium",
80
- Low: "low",
81
- Minimal: "minimal",
82
- };
83
- /**
84
- * Default mechanism for returning reasoning tokens. Can be overridden per-endpoint via endpoint features.
85
- */
86
- export const ReasoningReturnMechanism = {
87
- ContentString: "content-string",
88
- ReasoningContent: "reasoning-content",
89
- Reasoning: "reasoning",
90
- None: "none",
91
- };
92
- export const SupportedReasoningEffort = {
93
- Max: "max",
94
- Xhigh: "xhigh",
95
- High: "high",
96
- Medium: "medium",
97
- Low: "low",
98
- Minimal: "minimal",
99
- };
100
- /** @internal */
101
- export const DefaultReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(DefaultReasoningReturnMechanism);
102
- /** @internal */
103
- export const InstructionRoleSupport$inboundSchema = openEnums.inboundSchema(InstructionRoleSupport);
104
- /** @internal */
105
- export const ChatTemplateConfig$inboundSchema = z.object({
106
- instruction_role_support: z.nullable(InstructionRoleSupport$inboundSchema)
107
- .optional(),
108
- should_hoist_and_merge_system_messages: z.nullable(z.boolean()).optional(),
109
- supports_mid_session_system: z.nullable(z.boolean()).optional(),
110
- }).transform((v) => {
111
- return remap$(v, {
112
- "instruction_role_support": "instructionRoleSupport",
113
- "should_hoist_and_merge_system_messages": "shouldHoistAndMergeSystemMessages",
114
- "supports_mid_session_system": "supportsMidSessionSystem",
115
- });
116
- });
117
- export function chatTemplateConfigFromJSON(jsonString) {
118
- return safeParse(jsonString, (x) => ChatTemplateConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ChatTemplateConfig' from JSON`);
119
- }
120
- /** @internal */
121
- export const FeaturesDefaultReasoningEffort$inboundSchema = openEnums.inboundSchema(FeaturesDefaultReasoningEffort);
122
- /** @internal */
123
- export const FeaturesReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(FeaturesReasoningReturnMechanism);
124
- /** @internal */
125
- export const FeaturesSupportedReasoningEffort$inboundSchema = openEnums.inboundSchema(FeaturesSupportedReasoningEffort);
126
- /** @internal */
127
- export const FeaturesReasoningConfig$inboundSchema = z.object({
128
- default_reasoning_effort: z.nullable(FeaturesDefaultReasoningEffort$inboundSchema).optional(),
129
- default_reasoning_enabled: z.nullable(z.boolean()).optional(),
130
- end_token: z.nullable(z.string()).optional(),
131
- is_mandatory_reasoning: z.nullable(z.boolean()).optional(),
132
- reasoning_return_mechanism: z.nullable(FeaturesReasoningReturnMechanism$inboundSchema).optional(),
133
- start_token: z.nullable(z.string()).optional(),
134
- supported_reasoning_efforts: z.nullable(z.array(FeaturesSupportedReasoningEffort$inboundSchema)).optional(),
135
- supports_reasoning_effort: z.nullable(z.boolean()).optional(),
136
- supports_reasoning_max_tokens: z.nullable(z.boolean()).optional(),
137
- system_prompt: z.nullable(z.string()).optional(),
138
- }).transform((v) => {
139
- return remap$(v, {
140
- "default_reasoning_effort": "defaultReasoningEffort",
141
- "default_reasoning_enabled": "defaultReasoningEnabled",
142
- "end_token": "endToken",
143
- "is_mandatory_reasoning": "isMandatoryReasoning",
144
- "reasoning_return_mechanism": "reasoningReturnMechanism",
145
- "start_token": "startToken",
146
- "supported_reasoning_efforts": "supportedReasoningEfforts",
147
- "supports_reasoning_effort": "supportsReasoningEffort",
148
- "supports_reasoning_max_tokens": "supportsReasoningMaxTokens",
149
- "system_prompt": "systemPrompt",
150
- });
151
- });
152
- export function featuresReasoningConfigFromJSON(jsonString) {
153
- return safeParse(jsonString, (x) => FeaturesReasoningConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeaturesReasoningConfig' from JSON`);
154
- }
155
- /** @internal */
156
- export const RequiredInputModality$inboundSchema = openEnums.inboundSchema(RequiredInputModality);
157
- /** @internal */
158
- export const Features$inboundSchema = z.object({
159
- chat_template_config: z.nullable(z.lazy(() => ChatTemplateConfig$inboundSchema)).optional(),
160
- reasoning_config: z.nullable(z.lazy(() => FeaturesReasoningConfig$inboundSchema)).optional(),
161
- required_input_modalities: z.nullable(z.array(RequiredInputModality$inboundSchema)).optional(),
162
- }).transform((v) => {
163
- return remap$(v, {
164
- "chat_template_config": "chatTemplateConfig",
165
- "reasoning_config": "reasoningConfig",
166
- "required_input_modalities": "requiredInputModalities",
167
- });
168
- });
169
- export function featuresFromJSON(jsonString) {
170
- return safeParse(jsonString, (x) => Features$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Features' from JSON`);
171
- }
172
- /** @internal */
173
- export const EndpointTestProfileInputModality$inboundSchema = openEnums.inboundSchema(EndpointTestProfileInputModality);
174
- /** @internal */
175
- export const EndpointTestProfileOutputModality$inboundSchema = openEnums.inboundSchema(EndpointTestProfileOutputModality);
176
- /** @internal */
177
- export const DefaultReasoningEffort$inboundSchema = openEnums.inboundSchema(DefaultReasoningEffort);
178
- /** @internal */
179
- export const ReasoningReturnMechanism$inboundSchema = openEnums.inboundSchema(ReasoningReturnMechanism);
180
- /** @internal */
181
- export const SupportedReasoningEffort$inboundSchema = openEnums.inboundSchema(SupportedReasoningEffort);
182
- /** @internal */
183
- export const EndpointTestProfileReasoningConfig$inboundSchema = z.object({
184
- default_reasoning_effort: z.nullable(DefaultReasoningEffort$inboundSchema)
185
- .optional(),
186
- default_reasoning_enabled: z.nullable(z.boolean()).optional(),
187
- end_token: z.nullable(z.string()).optional(),
188
- is_mandatory_reasoning: z.nullable(z.boolean()).optional(),
189
- reasoning_return_mechanism: z.nullable(ReasoningReturnMechanism$inboundSchema)
190
- .optional(),
191
- start_token: z.nullable(z.string()).optional(),
192
- supported_reasoning_efforts: z.nullable(z.array(SupportedReasoningEffort$inboundSchema)).optional(),
193
- supports_reasoning_effort: z.nullable(z.boolean()).optional(),
194
- supports_reasoning_max_tokens: z.nullable(z.boolean()).optional(),
195
- system_prompt: z.nullable(z.string()).optional(),
196
- }).transform((v) => {
197
- return remap$(v, {
198
- "default_reasoning_effort": "defaultReasoningEffort",
199
- "default_reasoning_enabled": "defaultReasoningEnabled",
200
- "end_token": "endToken",
201
- "is_mandatory_reasoning": "isMandatoryReasoning",
202
- "reasoning_return_mechanism": "reasoningReturnMechanism",
203
- "start_token": "startToken",
204
- "supported_reasoning_efforts": "supportedReasoningEfforts",
205
- "supports_reasoning_effort": "supportsReasoningEffort",
206
- "supports_reasoning_max_tokens": "supportsReasoningMaxTokens",
207
- "system_prompt": "systemPrompt",
208
- });
209
- });
210
- export function endpointTestProfileReasoningConfigFromJSON(jsonString) {
211
- return safeParse(jsonString, (x) => EndpointTestProfileReasoningConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfileReasoningConfig' from JSON`);
212
- }
213
- /** @internal */
214
- export const EndpointTestProfileModel$inboundSchema = z.object({
215
- features: z.nullable(z.lazy(() => Features$inboundSchema)),
216
- input_modalities: z.array(EndpointTestProfileInputModality$inboundSchema),
217
- output_modalities: z.array(EndpointTestProfileOutputModality$inboundSchema),
218
- reasoning_config: z.nullable(z.lazy(() => EndpointTestProfileReasoningConfig$inboundSchema)),
219
- slug: z.string(),
220
- supports_reasoning: z.boolean(),
221
- }).transform((v) => {
222
- return remap$(v, {
223
- "input_modalities": "inputModalities",
224
- "output_modalities": "outputModalities",
225
- "reasoning_config": "reasoningConfig",
226
- "supports_reasoning": "supportsReasoning",
227
- });
228
- });
229
- export function endpointTestProfileModelFromJSON(jsonString) {
230
- return safeParse(jsonString, (x) => EndpointTestProfileModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfileModel' from JSON`);
231
- }
232
- /** @internal */
233
- export const EndpointTestProfile$inboundSchema = z.object({
234
- context_length: z.nullable(z.int()),
235
- default_reasoning_return_mechanism: z.nullable(DefaultReasoningReturnMechanism$inboundSchema),
236
- effective_adapter_name: z.nullable(z.string()),
237
- endpoint_features: z.nullable(z.record(z.string(), z.any())),
238
- is_lab_trusted: z.boolean(),
239
- model: z.lazy(() => EndpointTestProfileModel$inboundSchema),
240
- }).transform((v) => {
241
- return remap$(v, {
242
- "context_length": "contextLength",
243
- "default_reasoning_return_mechanism": "defaultReasoningReturnMechanism",
244
- "effective_adapter_name": "effectiveAdapterName",
245
- "endpoint_features": "endpointFeatures",
246
- "is_lab_trusted": "isLabTrusted",
247
- });
248
- });
249
- export function endpointTestProfileFromJSON(jsonString) {
250
- return safeParse(jsonString, (x) => EndpointTestProfile$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EndpointTestProfile' from JSON`);
251
- }
252
- //# sourceMappingURL=endpointtestprofile.js.map
@@ -1,106 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { OpenEnum } from "../../types/enums.js";
3
- export type ListProviderEndpointsGlobals = {
4
- /**
5
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
- *
7
- * @remarks
8
- * This is used to track API usage per application.
9
- */
10
- httpReferer?: string | undefined;
11
- /**
12
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
- *
14
- * @remarks
15
- */
16
- appTitle?: string | undefined;
17
- /**
18
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
- *
20
- * @remarks
21
- */
22
- appCategories?: string | undefined;
23
- };
24
- /**
25
- * Time window the provider-wide stats cover
26
- */
27
- export declare const ListProviderEndpointsWindow: {
28
- readonly Onehr: "1hr";
29
- readonly Oned: "1d";
30
- readonly Onew: "1w";
31
- readonly Onemo: "1mo";
32
- readonly Oney: "1y";
33
- };
34
- /**
35
- * Time window the provider-wide stats cover
36
- */
37
- export type ListProviderEndpointsWindow = OpenEnum<typeof ListProviderEndpointsWindow>;
38
- /**
39
- * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
40
- */
41
- export declare const PerfWorkload: {
42
- readonly TextGeneration: "text_generation";
43
- readonly ImageGeneration: "image_generation";
44
- readonly VideoGeneration: "video_generation";
45
- readonly Embeddings: "embeddings";
46
- readonly Rerank: "rerank";
47
- readonly TTS: "tts";
48
- readonly STT: "stt";
49
- readonly Decisions: "decisions";
50
- readonly Extractions: "extractions";
51
- readonly Unknown: "unknown";
52
- };
53
- /**
54
- * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
55
- */
56
- export type PerfWorkload = OpenEnum<typeof PerfWorkload>;
57
- export type ListProviderEndpointsRequest = {
58
- /**
59
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
60
- *
61
- * @remarks
62
- * This is used to track API usage per application.
63
- */
64
- httpReferer?: string | undefined;
65
- /**
66
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
67
- *
68
- * @remarks
69
- */
70
- appTitle?: string | undefined;
71
- /**
72
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
73
- *
74
- * @remarks
75
- */
76
- appCategories?: string | undefined;
77
- /**
78
- * URL-friendly provider identifier (e.g. "openai", "fireworks")
79
- */
80
- providerSlug: string;
81
- /**
82
- * Time window the provider-wide stats cover
83
- */
84
- window?: ListProviderEndpointsWindow | undefined;
85
- /**
86
- * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
87
- */
88
- perfWorkload?: PerfWorkload | undefined;
89
- };
90
- /** @internal */
91
- export declare const ListProviderEndpointsWindow$outboundSchema: z.ZodType<string, ListProviderEndpointsWindow>;
92
- /** @internal */
93
- export declare const PerfWorkload$outboundSchema: z.ZodType<string, PerfWorkload>;
94
- /** @internal */
95
- export type ListProviderEndpointsRequest$Outbound = {
96
- "HTTP-Referer"?: string | undefined;
97
- appTitle?: string | undefined;
98
- appCategories?: string | undefined;
99
- provider_slug: string;
100
- window: string;
101
- perf_workload?: string | undefined;
102
- };
103
- /** @internal */
104
- export declare const ListProviderEndpointsRequest$outboundSchema: z.ZodType<ListProviderEndpointsRequest$Outbound, ListProviderEndpointsRequest>;
105
- export declare function listProviderEndpointsRequestToJSON(listProviderEndpointsRequest: ListProviderEndpointsRequest): string;
106
- //# sourceMappingURL=listproviderendpoints.d.ts.map
@@ -1,55 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 11ea9fe75522
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
- /**
9
- * Time window the provider-wide stats cover
10
- */
11
- export const ListProviderEndpointsWindow = {
12
- Onehr: "1hr",
13
- Oned: "1d",
14
- Onew: "1w",
15
- Onemo: "1mo",
16
- Oney: "1y",
17
- };
18
- /**
19
- * Workload the latency and throughput stats measure; defaults to the workload most of the endpoints serve
20
- */
21
- export const PerfWorkload = {
22
- TextGeneration: "text_generation",
23
- ImageGeneration: "image_generation",
24
- VideoGeneration: "video_generation",
25
- Embeddings: "embeddings",
26
- Rerank: "rerank",
27
- TTS: "tts",
28
- STT: "stt",
29
- Decisions: "decisions",
30
- Extractions: "extractions",
31
- Unknown: "unknown",
32
- };
33
- /** @internal */
34
- export const ListProviderEndpointsWindow$outboundSchema = openEnums.outboundSchema(ListProviderEndpointsWindow);
35
- /** @internal */
36
- export const PerfWorkload$outboundSchema = openEnums.outboundSchema(PerfWorkload);
37
- /** @internal */
38
- export const ListProviderEndpointsRequest$outboundSchema = z.object({
39
- httpReferer: z.string().optional(),
40
- appTitle: z.string().optional(),
41
- appCategories: z.string().optional(),
42
- providerSlug: z.string(),
43
- window: ListProviderEndpointsWindow$outboundSchema.default("1mo"),
44
- perfWorkload: PerfWorkload$outboundSchema.optional(),
45
- }).transform((v) => {
46
- return remap$(v, {
47
- httpReferer: "HTTP-Referer",
48
- providerSlug: "provider_slug",
49
- perfWorkload: "perf_workload",
50
- });
51
- });
52
- export function listProviderEndpointsRequestToJSON(listProviderEndpointsRequest) {
53
- return JSON.stringify(ListProviderEndpointsRequest$outboundSchema.parse(listProviderEndpointsRequest));
54
- }
55
- //# sourceMappingURL=listproviderendpoints.js.map