Skip to content

Commit 856fd27

Browse files
authored
chore: update OpenAPI specification from speakeasy run (#93)
2 parents 75b7e29 + 36924ae commit 856fd27

File tree

12 files changed

+52
-39
lines changed

12 files changed

+52
-39
lines changed

.speakeasy/gen.lock

Lines changed: 6 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: bcccd1abd05f6654a822386f2eefbd8a
55
docVersion: 1.0.0
6-
speakeasyVersion: 1.659.0
7-
generationVersion: 2.755.9
8-
releaseVersion: 0.1.23
9-
configChecksum: 991bb8e65e382038e344c12cdd982649
6+
speakeasyVersion: 1.660.0
7+
generationVersion: 2.760.2
8+
releaseVersion: 0.1.24
9+
configChecksum: 475b25558977e68908a4d0653d872817
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.7
18+
core: 3.26.9
1919
customCodeRegions: 0.1.0
2020
defaultEnabledRetries: 0.1.0
2121
deprecations: 2.81.1
@@ -797,6 +797,7 @@ generatedFiles:
797797
- src/types/operations.ts
798798
- src/types/rfcdate.ts
799799
- src/types/streams.ts
800+
- src/types/unrecognized.ts
800801
- tsconfig.json
801802
examples:
802803
createChatCompletion:

.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.23
33+
version: 0.1.24
3434
acceptHeaderEnum: false
3535
additionalDependencies:
3636
dependencies: {}
@@ -71,6 +71,7 @@ typescript:
7171
exportZodModelNamespace: false
7272
flattenGlobalSecurity: true
7373
flatteningOrder: parameters-first
74+
forwardCompatibleEnumsByDefault: false
7475
generateExamples: true
7576
imports:
7677
option: openapi
@@ -83,6 +84,7 @@ typescript:
8384
inferSSEOverload: true
8485
inputModelSuffix: input
8586
jsonpath: rfc9535
87+
laxMode: strict
8688
maxMethodParams: 0
8789
methodArguments: infer-optional-args
8890
modelPropertyCasing: camel

.speakeasy/workflow.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
speakeasyVersion: 1.659.0
1+
speakeasyVersion: 1.660.0
22
sources:
33
OpenRouter API:
44
sourceNamespace: open-router-chat-completions-api
@@ -14,7 +14,7 @@ targets:
1414
sourceRevisionDigest: sha256:ffe0e925561a55a1b403667fe33bb3158e05892ef1e66f56211544c9a890b301
1515
sourceBlobDigest: sha256:18aa7b22686c2f559af1062fea408a9f80146231027ed1fd62b68df38c71f65d
1616
codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples
17-
codeSamplesRevisionDigest: sha256:7ef1c761fb99fe75b91e84384cfbf9703c9d160d8e9be9a1d72dd49e7df32af3
17+
codeSamplesRevisionDigest: sha256:f856e6a616f0d8edab5b1a77e49bfd32584caeb323d4ee7b740c6a7791c222fb
1818
workflow:
1919
workflowVersion: 1.0.0
2020
speakeasyVersion: latest

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.23",
5+
"version": "0.1.24",
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.23",
3+
"version": "0.1.24",
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.23",
73-
genVersion: "2.755.9",
74-
userAgent: "speakeasy-sdk/typescript 0.1.23 2.755.9 1.0.0 @openrouter/sdk",
72+
sdkVersion: "0.1.24",
73+
genVersion: "2.760.2",
74+
userAgent: "speakeasy-sdk/typescript 0.1.24 2.760.2 1.0.0 @openrouter/sdk",
7575
} as const;

src/models/chatstreamingresponsechunk.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ export const ChatStreamingResponseChunk$inboundSchema: z.ZodType<
9494
return JSON.parse(v);
9595
} catch (err) {
9696
ctx.addIssue({
97-
code: z.ZodIssueCode.custom,
97+
input: v,
98+
code: "custom",
9899
message: `malformed json: ${err}`,
99100
});
100101
return z.NEVER;

src/models/operations/createresponses.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ export const CreateResponsesResponseBody$inboundSchema: z.ZodType<
3333
return JSON.parse(v);
3434
} catch (err) {
3535
ctx.addIssue({
36-
code: z.ZodIssueCode.custom,
36+
input: v,
37+
code: "custom",
3738
message: `malformed json: ${err}`,
3839
});
3940
return z.NEVER;

src/types/enums.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,14 @@
33
*/
44

55
import * as z from "zod/v4";
6+
import { Unrecognized, unrecognized } from "./unrecognized.js";
67

7-
declare const __brand: unique symbol;
8-
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
98
export type ClosedEnum<T extends Readonly<Record<string, string | number>>> =
109
T[keyof T];
1110
export type OpenEnum<T extends Readonly<Record<string, string | number>>> =
1211
| T[keyof T]
1312
| Unrecognized<T[keyof T] extends number ? number : string>;
1413

15-
function unrecognized<T>(value: T): Unrecognized<T> {
16-
unrecognizedCount++;
17-
return value as Unrecognized<T>;
18-
}
19-
20-
let unrecognizedCount = 0;
21-
let refCount = 0;
22-
export function unrecognizedCounter() {
23-
refCount++;
24-
const start = unrecognizedCount;
25-
return {
26-
count: () => {
27-
const count = unrecognizedCount - start;
28-
if (--refCount === 0) unrecognizedCount = 0;
29-
return count;
30-
},
31-
};
32-
}
33-
3414
export function inboundSchema<T extends Record<string, string>>(
3515
enumObj: T,
3616
): z.ZodType<OpenEnum<T>, unknown> {

0 commit comments

Comments
 (0)