Skip to content

Commit 63883d2

Browse files
committed
ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.662.0
1 parent ba0fb90 commit 63883d2

22 files changed

+641
-302
lines changed

.speakeasy/gen.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ id: 8b6cd71c-ea04-44da-af45-e43968b5928d
33
management:
44
docChecksum: 0ecf8d42d5f305a124cbca4ffbda5eee
55
docVersion: 1.0.0
6-
speakeasyVersion: 1.660.0
7-
generationVersion: 2.760.2
8-
releaseVersion: 0.1.27
9-
configChecksum: 2c451c32d0e42b790ff08709ef1011b4
6+
speakeasyVersion: 1.662.0
7+
generationVersion: 2.763.3
8+
releaseVersion: 0.1.28
9+
configChecksum: f8bcbefa2b5a513bdd565c65c97113ca
1010
repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git
1111
installationURL: https://github.com/OpenRouterTeam/typescript-sdk
1212
published: true
@@ -15,7 +15,7 @@ features:
1515
acceptHeaders: 2.81.2
1616
additionalDependencies: 0.1.0
1717
constsAndDefaults: 0.1.12
18-
core: 3.26.9
18+
core: 3.26.10
1919
customCodeRegions: 0.1.0
2020
defaultEnabledRetries: 0.1.0
2121
deprecations: 2.81.1

.speakeasy/gen.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ generation:
3030
generateNewTests: true
3131
skipResponseBodyAssertions: false
3232
typescript:
33-
version: 0.1.27
33+
version: 0.1.28
3434
acceptHeaderEnum: false
3535
additionalDependencies:
3636
dependencies: {}
@@ -71,6 +71,7 @@ typescript:
7171
exportZodModelNamespace: false
7272
flattenGlobalSecurity: true
7373
flatteningOrder: parameters-first
74+
formStringArrayEncodeMode: encoded-string
7475
forwardCompatibleEnumsByDefault: false
7576
generateExamples: true
7677
imports:
@@ -82,6 +83,7 @@ typescript:
8283
shared: models
8384
webhooks: models/webhooks
8485
inferSSEOverload: true
86+
inferUnionDiscriminators: true
8587
inputModelSuffix: input
8688
jsonpath: rfc9535
8789
laxMode: strict

.speakeasy/workflow.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
speakeasyVersion: 1.660.0
1+
speakeasyVersion: 1.662.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
55
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
66
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
77
tags:
88
- latest
9-
- matt-cache-control
9+
- speakeasy-sdk-regen-1762734783
1010
- 1.0.0
1111
targets:
1212
openrouter:
@@ -15,7 +15,7 @@ targets:
1515
sourceRevisionDigest: sha256:01256c8494de6bfc13c36d82ae316a6a13d402194f844618bcd4d59e34f325f3
1616
sourceBlobDigest: sha256:4c80e48fd5e1cd030e68d664eb93984b4d5946867252ff1755a2bd2a05eccd4e
1717
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
18-
codeSamplesRevisionDigest: sha256:b9f865c93ad3b73a288706cfe0cdbb54a0a2fe160c405b59bc45f567118e554a
18+
codeSamplesRevisionDigest: sha256:4fb983d31ef998eb30f12c38e07fb278a3054a1def2a61c418d71d553c648a66
1919
workflow:
2020
workflowVersion: 1.0.0
2121
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,14 @@ Based on:
146146
### Generated
147147
- [typescript v0.1.2] .
148148
### Releases
149-
- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - .
149+
- [NPM v0.1.2] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.2 - .
150+
151+
## 2025-11-28 00:30:11
152+
### Changes
153+
Based on:
154+
- OpenAPI Doc
155+
- Speakeasy CLI 1.662.0 (2.763.3) https://github.com/speakeasy-api/speakeasy
156+
### Generated
157+
- [typescript v0.1.28] .
158+
### Releases
159+
- [NPM v0.1.28] https://www.npmjs.com/package/@openrouter/sdk/v/0.1.28 - .

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
"name": "@openrouter/sdk",
5-
"version": "0.1.27",
5+
"version": "0.1.28",
66
"exports": {
77
".": "./src/index.ts",
88
"./models/errors": "./src/models/errors/index.ts",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openrouter/sdk",
3-
"version": "0.1.27",
3+
"version": "0.1.28",
44
"author": "OpenRouter",
55
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
66
"keywords": [

src/lib/config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6969
export const SDK_METADATA = {
7070
language: "typescript",
7171
openapiDocVersion: "1.0.0",
72-
sdkVersion: "0.1.27",
73-
genVersion: "2.760.2",
74-
userAgent: "speakeasy-sdk/typescript 0.1.27 2.760.2 1.0.0 @openrouter/sdk",
72+
sdkVersion: "0.1.28",
73+
genVersion: "2.763.3",
74+
userAgent: "speakeasy-sdk/typescript 0.1.28 2.763.3 1.0.0 @openrouter/sdk",
7575
} as const;

src/lib/encodings.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ export function encodeLabel(
102102
});
103103
encValue = mapped?.join("").slice(1);
104104
} else {
105-
const k =
106-
options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : "";
105+
const k = options?.explode && isPlainObject(value)
106+
? `${encodeString(pk)}=`
107+
: "";
107108
encValue = `${k}${encodeValue(pv)}`;
108109
}
109110

@@ -440,7 +441,7 @@ type BulkQueryEncoder = (
440441
) => string;
441442

442443
export function queryEncoder(f: QueryEncoder): BulkQueryEncoder {
443-
const bulkEncode = function (
444+
const bulkEncode = function(
444445
values: Record<string, unknown>,
445446
options?: QueryEncoderOptions,
446447
): string {

src/models/chatgenerationparams.ts

Lines changed: 53 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ export type ChatGenerationParamsResponseFormatText = {
6363
};
6464

6565
export type ChatGenerationParamsResponseFormatUnion =
66-
| ResponseFormatJSONSchema
67-
| ResponseFormatTextGrammar
68-
| ChatGenerationParamsResponseFormatText
69-
| ChatGenerationParamsResponseFormatJSONObject
70-
| ChatGenerationParamsResponseFormatPython;
66+
| (ResponseFormatJSONSchema & { type: "json_schema" })
67+
| (ResponseFormatTextGrammar & { type: "grammar" })
68+
| (ChatGenerationParamsResponseFormatText & { type: "text" })
69+
| (ChatGenerationParamsResponseFormatJSONObject & { type: "json_object" })
70+
| (ChatGenerationParamsResponseFormatPython & { type: "python" });
7171

7272
export type ChatGenerationParamsStop = string | Array<string>;
7373

@@ -85,11 +85,11 @@ export type ChatGenerationParams = {
8585
presencePenalty?: number | null | undefined;
8686
reasoning?: Reasoning | undefined;
8787
responseFormat?:
88-
| ResponseFormatJSONSchema
89-
| ResponseFormatTextGrammar
90-
| ChatGenerationParamsResponseFormatText
91-
| ChatGenerationParamsResponseFormatJSONObject
92-
| ChatGenerationParamsResponseFormatPython
88+
| (ResponseFormatJSONSchema & { type: "json_schema" })
89+
| (ResponseFormatTextGrammar & { type: "grammar" })
90+
| (ChatGenerationParamsResponseFormatText & { type: "text" })
91+
| (ChatGenerationParamsResponseFormatJSONObject & { type: "json_object" })
92+
| (ChatGenerationParamsResponseFormatPython & { type: "python" })
9393
| undefined;
9494
seed?: number | null | undefined;
9595
stop?: string | Array<string> | null | undefined;
@@ -200,22 +200,34 @@ export function chatGenerationParamsResponseFormatTextToJSON(
200200

201201
/** @internal */
202202
export type ChatGenerationParamsResponseFormatUnion$Outbound =
203-
| ResponseFormatJSONSchema$Outbound
204-
| ResponseFormatTextGrammar$Outbound
205-
| ChatGenerationParamsResponseFormatText$Outbound
206-
| ChatGenerationParamsResponseFormatJSONObject$Outbound
207-
| ChatGenerationParamsResponseFormatPython$Outbound;
203+
| (ResponseFormatJSONSchema$Outbound & { type: "json_schema" })
204+
| (ResponseFormatTextGrammar$Outbound & { type: "grammar" })
205+
| (ChatGenerationParamsResponseFormatText$Outbound & { type: "text" })
206+
| (ChatGenerationParamsResponseFormatJSONObject$Outbound & {
207+
type: "json_object";
208+
})
209+
| (ChatGenerationParamsResponseFormatPython$Outbound & { type: "python" });
208210

209211
/** @internal */
210212
export const ChatGenerationParamsResponseFormatUnion$outboundSchema: z.ZodType<
211213
ChatGenerationParamsResponseFormatUnion$Outbound,
212214
ChatGenerationParamsResponseFormatUnion
213215
> = z.union([
214-
ResponseFormatJSONSchema$outboundSchema,
215-
ResponseFormatTextGrammar$outboundSchema,
216-
z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema),
217-
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema),
218-
z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema),
216+
ResponseFormatJSONSchema$outboundSchema.and(
217+
z.object({ type: z.literal("json_schema") }),
218+
),
219+
ResponseFormatTextGrammar$outboundSchema.and(
220+
z.object({ type: z.literal("grammar") }),
221+
),
222+
z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema).and(
223+
z.object({ type: z.literal("text") }),
224+
),
225+
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema).and(
226+
z.object({ type: z.literal("json_object") }),
227+
),
228+
z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema).and(
229+
z.object({ type: z.literal("python") }),
230+
),
219231
]);
220232

221233
export function chatGenerationParamsResponseFormatUnionToJSON(
@@ -261,11 +273,13 @@ export type ChatGenerationParams$Outbound = {
261273
presence_penalty?: number | null | undefined;
262274
reasoning?: Reasoning$Outbound | undefined;
263275
response_format?:
264-
| ResponseFormatJSONSchema$Outbound
265-
| ResponseFormatTextGrammar$Outbound
266-
| ChatGenerationParamsResponseFormatText$Outbound
267-
| ChatGenerationParamsResponseFormatJSONObject$Outbound
268-
| ChatGenerationParamsResponseFormatPython$Outbound
276+
| (ResponseFormatJSONSchema$Outbound & { type: "json_schema" })
277+
| (ResponseFormatTextGrammar$Outbound & { type: "grammar" })
278+
| (ChatGenerationParamsResponseFormatText$Outbound & { type: "text" })
279+
| (ChatGenerationParamsResponseFormatJSONObject$Outbound & {
280+
type: "json_object";
281+
})
282+
| (ChatGenerationParamsResponseFormatPython$Outbound & { type: "python" })
269283
| undefined;
270284
seed?: number | null | undefined;
271285
stop?: string | Array<string> | null | undefined;
@@ -296,11 +310,20 @@ export const ChatGenerationParams$outboundSchema: z.ZodType<
296310
presencePenalty: z.nullable(z.number()).optional(),
297311
reasoning: z.lazy(() => Reasoning$outboundSchema).optional(),
298312
responseFormat: z.union([
299-
ResponseFormatJSONSchema$outboundSchema,
300-
ResponseFormatTextGrammar$outboundSchema,
301-
z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema),
302-
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema),
303-
z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema),
313+
ResponseFormatJSONSchema$outboundSchema.and(
314+
z.object({ type: z.literal("json_schema") }),
315+
),
316+
ResponseFormatTextGrammar$outboundSchema.and(
317+
z.object({ type: z.literal("grammar") }),
318+
),
319+
z.lazy(() => ChatGenerationParamsResponseFormatText$outboundSchema).and(
320+
z.object({ type: z.literal("text") }),
321+
),
322+
z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$outboundSchema)
323+
.and(z.object({ type: z.literal("json_object") })),
324+
z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema).and(
325+
z.object({ type: z.literal("python") }),
326+
),
304327
]).optional(),
305328
seed: z.nullable(z.int()).optional(),
306329
stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),

0 commit comments

Comments
 (0)