@openrouter/sdk 0.1.8 → 0.1.10

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.
@@ -37,8 +37,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
37
37
  export declare const SDK_METADATA: {
38
38
  readonly language: "typescript";
39
39
  readonly openapiDocVersion: "1.0.0";
40
- readonly sdkVersion: "0.1.8";
41
- readonly genVersion: "2.748.0";
42
- readonly userAgent: "speakeasy-sdk/typescript 0.1.8 2.748.0 1.0.0 @openrouter/sdk";
40
+ readonly sdkVersion: "0.1.10";
41
+ readonly genVersion: "2.748.4";
42
+ readonly userAgent: "speakeasy-sdk/typescript 0.1.10 2.748.4 1.0.0 @openrouter/sdk";
43
43
  };
44
44
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "0.1.8",
29
- genVersion: "2.748.0",
30
- userAgent: "speakeasy-sdk/typescript 0.1.8 2.748.0 1.0.0 @openrouter/sdk",
28
+ sdkVersion: "0.1.10",
29
+ genVersion: "2.748.4",
30
+ userAgent: "speakeasy-sdk/typescript 0.1.10 2.748.4 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -19,7 +19,7 @@ export type OpenAIResponsesInputFunctionCall = {
19
19
  name: string;
20
20
  arguments: string;
21
21
  id?: string | undefined;
22
- status?: ToolCallStatus | undefined;
22
+ status?: ToolCallStatus | null | undefined;
23
23
  };
24
24
  export declare const OpenAIResponsesInputTypeFunctionCallOutput: {
25
25
  readonly FunctionCallOutput: "function_call_output";
@@ -27,10 +27,10 @@ export declare const OpenAIResponsesInputTypeFunctionCallOutput: {
27
27
  export type OpenAIResponsesInputTypeFunctionCallOutput = ClosedEnum<typeof OpenAIResponsesInputTypeFunctionCallOutput>;
28
28
  export type OpenAIResponsesInputFunctionCallOutput = {
29
29
  type: OpenAIResponsesInputTypeFunctionCallOutput;
30
- id: string;
30
+ id?: string | null | undefined;
31
31
  callId: string;
32
32
  output: string;
33
- status?: ToolCallStatus | undefined;
33
+ status?: ToolCallStatus | null | undefined;
34
34
  };
35
35
  export declare const OpenAIResponsesInputTypeMessage2: {
36
36
  readonly Message: "message";
@@ -124,8 +124,8 @@ export type OpenAIResponsesInputMessage1 = {
124
124
  type: "input_file";
125
125
  })> | string;
126
126
  };
127
- export type OpenAIResponsesInputUnion1 = OpenAIResponsesInputFunctionCallOutput | OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1;
128
- export type OpenAIResponsesInputUnion = string | Array<OpenAIResponsesInputFunctionCallOutput | OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1> | any;
127
+ export type OpenAIResponsesInputUnion1 = OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1;
128
+ export type OpenAIResponsesInputUnion = string | Array<OpenAIResponsesInputFunctionCall | OutputMessage | OpenAIResponsesInputMessage2 | OpenAIResponsesInputFunctionCallOutput | OutputItemImageGenerationCall | OpenAIResponsesInputMessage1> | any;
129
129
  /** @internal */
130
130
  export declare const OpenAIResponsesInputTypeFunctionCall$inboundSchema: z.ZodEnum<typeof OpenAIResponsesInputTypeFunctionCall>;
131
131
  /** @internal */
@@ -53,7 +53,7 @@ export const OpenAIResponsesInputFunctionCall$inboundSchema = z.object({
53
53
  name: z.string(),
54
54
  arguments: z.string(),
55
55
  id: z.string().optional(),
56
- status: ToolCallStatus$inboundSchema.optional(),
56
+ status: z.nullable(ToolCallStatus$inboundSchema).optional(),
57
57
  }).transform((v) => {
58
58
  return remap$(v, {
59
59
  "call_id": "callId",
@@ -67,10 +67,10 @@ export const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema = z.enum(O
67
67
  /** @internal */
68
68
  export const OpenAIResponsesInputFunctionCallOutput$inboundSchema = z.object({
69
69
  type: OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema,
70
- id: z.string(),
70
+ id: z.nullable(z.string()).optional(),
71
71
  call_id: z.string(),
72
72
  output: z.string(),
73
- status: ToolCallStatus$inboundSchema.optional(),
73
+ status: z.nullable(ToolCallStatus$inboundSchema).optional(),
74
74
  }).transform((v) => {
75
75
  return remap$(v, {
76
76
  "call_id": "callId",
@@ -192,10 +192,10 @@ export function openAIResponsesInputMessage1FromJSON(jsonString) {
192
192
  }
193
193
  /** @internal */
194
194
  export const OpenAIResponsesInputUnion1$inboundSchema = z.union([
195
- z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
196
195
  z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
197
196
  OutputMessage$inboundSchema,
198
197
  z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
198
+ z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
199
199
  OutputItemImageGenerationCall$inboundSchema,
200
200
  z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
201
201
  ]);
@@ -206,10 +206,10 @@ export function openAIResponsesInputUnion1FromJSON(jsonString) {
206
206
  export const OpenAIResponsesInputUnion$inboundSchema = z.union([
207
207
  z.string(),
208
208
  z.array(z.union([
209
- z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
210
209
  z.lazy(() => OpenAIResponsesInputFunctionCall$inboundSchema),
211
210
  OutputMessage$inboundSchema,
212
211
  z.lazy(() => OpenAIResponsesInputMessage2$inboundSchema),
212
+ z.lazy(() => OpenAIResponsesInputFunctionCallOutput$inboundSchema),
213
213
  OutputItemImageGenerationCall$inboundSchema,
214
214
  z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema),
215
215
  ])),
@@ -10,20 +10,20 @@ export type OpenResponsesFunctionCallOutputType = ClosedEnum<typeof OpenResponse
10
10
  */
11
11
  export type OpenResponsesFunctionCallOutput = {
12
12
  type: OpenResponsesFunctionCallOutputType;
13
- id: string;
13
+ id?: string | null | undefined;
14
14
  callId: string;
15
15
  output: string;
16
- status?: ToolCallStatus | undefined;
16
+ status?: ToolCallStatus | null | undefined;
17
17
  };
18
18
  /** @internal */
19
19
  export declare const OpenResponsesFunctionCallOutputType$outboundSchema: z.ZodEnum<typeof OpenResponsesFunctionCallOutputType>;
20
20
  /** @internal */
21
21
  export type OpenResponsesFunctionCallOutput$Outbound = {
22
22
  type: string;
23
- id: string;
23
+ id?: string | null | undefined;
24
24
  call_id: string;
25
25
  output: string;
26
- status?: string | undefined;
26
+ status?: string | null | undefined;
27
27
  };
28
28
  /** @internal */
29
29
  export declare const OpenResponsesFunctionCallOutput$outboundSchema: z.ZodType<OpenResponsesFunctionCallOutput$Outbound, OpenResponsesFunctionCallOutput>;
@@ -12,10 +12,10 @@ export const OpenResponsesFunctionCallOutputType$outboundSchema = z.enum(OpenRes
12
12
  /** @internal */
13
13
  export const OpenResponsesFunctionCallOutput$outboundSchema = z.object({
14
14
  type: OpenResponsesFunctionCallOutputType$outboundSchema,
15
- id: z.string(),
15
+ id: z.nullable(z.string()).optional(),
16
16
  callId: z.string(),
17
17
  output: z.string(),
18
- status: ToolCallStatus$outboundSchema.optional(),
18
+ status: z.nullable(ToolCallStatus$outboundSchema).optional(),
19
19
  }).transform((v) => {
20
20
  return remap$(v, {
21
21
  callId: "call_id",
@@ -14,7 +14,7 @@ export type OpenResponsesFunctionToolCall = {
14
14
  name: string;
15
15
  arguments: string;
16
16
  id: string;
17
- status?: ToolCallStatus | undefined;
17
+ status?: ToolCallStatus | null | undefined;
18
18
  };
19
19
  /** @internal */
20
20
  export declare const OpenResponsesFunctionToolCallType$outboundSchema: z.ZodEnum<typeof OpenResponsesFunctionToolCallType>;
@@ -25,7 +25,7 @@ export type OpenResponsesFunctionToolCall$Outbound = {
25
25
  name: string;
26
26
  arguments: string;
27
27
  id: string;
28
- status?: string | undefined;
28
+ status?: string | null | undefined;
29
29
  };
30
30
  /** @internal */
31
31
  export declare const OpenResponsesFunctionToolCall$outboundSchema: z.ZodType<OpenResponsesFunctionToolCall$Outbound, OpenResponsesFunctionToolCall>;
@@ -16,7 +16,7 @@ export const OpenResponsesFunctionToolCall$outboundSchema = z.object({
16
16
  name: z.string(),
17
17
  arguments: z.string(),
18
18
  id: z.string(),
19
- status: ToolCallStatus$outboundSchema.optional(),
19
+ status: z.nullable(ToolCallStatus$outboundSchema).optional(),
20
20
  }).transform((v) => {
21
21
  return remap$(v, {
22
22
  callId: "call_id",
@@ -10,18 +10,18 @@ import { ResponsesOutputItemFunctionCall, ResponsesOutputItemFunctionCall$Outbou
10
10
  import { ResponsesOutputItemReasoning, ResponsesOutputItemReasoning$Outbound } from "./responsesoutputitemreasoning.js";
11
11
  import { ResponsesOutputMessage, ResponsesOutputMessage$Outbound } from "./responsesoutputmessage.js";
12
12
  import { ResponsesWebSearchCallOutput, ResponsesWebSearchCallOutput$Outbound } from "./responseswebsearchcalloutput.js";
13
- export type OpenResponsesInput1 = OpenResponsesFunctionToolCall | OpenResponsesFunctionCallOutput | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem | ResponsesOutputItemReasoning;
13
+ export type OpenResponsesInput1 = OpenResponsesFunctionToolCall | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | OpenResponsesFunctionCallOutput | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem;
14
14
  /**
15
15
  * Input for a response request - can be a string or array of items
16
16
  */
17
- export type OpenResponsesInput = string | Array<OpenResponsesFunctionToolCall | OpenResponsesFunctionCallOutput | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem | ResponsesOutputItemReasoning>;
17
+ export type OpenResponsesInput = string | Array<OpenResponsesFunctionToolCall | ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | OpenResponsesReasoning | OpenResponsesFunctionCallOutput | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | OpenResponsesEasyInputMessage | OpenResponsesInputMessageItem>;
18
18
  /** @internal */
19
- export type OpenResponsesInput1$Outbound = OpenResponsesFunctionToolCall$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound | ResponsesOutputItemReasoning$Outbound;
19
+ export type OpenResponsesInput1$Outbound = OpenResponsesFunctionToolCall$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound;
20
20
  /** @internal */
21
21
  export declare const OpenResponsesInput1$outboundSchema: z.ZodType<OpenResponsesInput1$Outbound, OpenResponsesInput1>;
22
22
  export declare function openResponsesInput1ToJSON(openResponsesInput1: OpenResponsesInput1): string;
23
23
  /** @internal */
24
- export type OpenResponsesInput$Outbound = string | Array<OpenResponsesFunctionToolCall$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound | ResponsesOutputItemReasoning$Outbound>;
24
+ export type OpenResponsesInput$Outbound = string | Array<OpenResponsesFunctionToolCall$Outbound | ResponsesOutputMessage$Outbound | ResponsesOutputItemFunctionCall$Outbound | ResponsesOutputItemFileSearchCall$Outbound | OpenResponsesReasoning$Outbound | OpenResponsesFunctionCallOutput$Outbound | ResponsesOutputItemReasoning$Outbound | ResponsesWebSearchCallOutput$Outbound | ResponsesImageGenerationCall$Outbound | OpenResponsesEasyInputMessage$Outbound | OpenResponsesInputMessageItem$Outbound>;
25
25
  /** @internal */
26
26
  export declare const OpenResponsesInput$outboundSchema: z.ZodType<OpenResponsesInput$Outbound, OpenResponsesInput>;
27
27
  export declare function openResponsesInputToJSON(openResponsesInput: OpenResponsesInput): string;
@@ -16,16 +16,16 @@ import { ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsear
16
16
  /** @internal */
17
17
  export const OpenResponsesInput1$outboundSchema = z.union([
18
18
  OpenResponsesFunctionToolCall$outboundSchema,
19
- OpenResponsesFunctionCallOutput$outboundSchema,
20
19
  ResponsesOutputMessage$outboundSchema,
21
20
  ResponsesOutputItemFunctionCall$outboundSchema,
22
21
  ResponsesOutputItemFileSearchCall$outboundSchema,
23
22
  OpenResponsesReasoning$outboundSchema,
23
+ OpenResponsesFunctionCallOutput$outboundSchema,
24
+ ResponsesOutputItemReasoning$outboundSchema,
24
25
  ResponsesWebSearchCallOutput$outboundSchema,
25
26
  ResponsesImageGenerationCall$outboundSchema,
26
27
  OpenResponsesEasyInputMessage$outboundSchema,
27
28
  OpenResponsesInputMessageItem$outboundSchema,
28
- ResponsesOutputItemReasoning$outboundSchema,
29
29
  ]);
30
30
  export function openResponsesInput1ToJSON(openResponsesInput1) {
31
31
  return JSON.stringify(OpenResponsesInput1$outboundSchema.parse(openResponsesInput1));
@@ -35,16 +35,16 @@ export const OpenResponsesInput$outboundSchema = z.union([
35
35
  z.string(),
36
36
  z.array(z.union([
37
37
  OpenResponsesFunctionToolCall$outboundSchema,
38
- OpenResponsesFunctionCallOutput$outboundSchema,
39
38
  ResponsesOutputMessage$outboundSchema,
40
39
  ResponsesOutputItemFunctionCall$outboundSchema,
41
40
  ResponsesOutputItemFileSearchCall$outboundSchema,
42
41
  OpenResponsesReasoning$outboundSchema,
42
+ OpenResponsesFunctionCallOutput$outboundSchema,
43
+ ResponsesOutputItemReasoning$outboundSchema,
43
44
  ResponsesWebSearchCallOutput$outboundSchema,
44
45
  ResponsesImageGenerationCall$outboundSchema,
45
46
  OpenResponsesEasyInputMessage$outboundSchema,
46
47
  OpenResponsesInputMessageItem$outboundSchema,
47
- ResponsesOutputItemReasoning$outboundSchema,
48
48
  ])),
49
49
  ]);
50
50
  export function openResponsesInputToJSON(openResponsesInput) {
@@ -31,6 +31,10 @@ export type CreateKeysRequest = {
31
31
  * Whether to include BYOK usage in the limit
32
32
  */
33
33
  includeByokInLimit?: boolean | undefined;
34
+ /**
35
+ * Optional ISO 8601 timestamp with timezone when the API key should expire
36
+ */
37
+ expiresAt?: Date | null | undefined;
34
38
  };
35
39
  /**
36
40
  * The created API key information
@@ -108,6 +112,10 @@ export type CreateKeysData = {
108
112
  * ISO 8601 timestamp of when the API key was last updated
109
113
  */
110
114
  updatedAt: string | null;
115
+ /**
116
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
117
+ */
118
+ expiresAt?: Date | null | undefined;
111
119
  };
112
120
  /**
113
121
  * API key created successfully
@@ -130,6 +138,7 @@ export type CreateKeysRequest$Outbound = {
130
138
  limit?: number | null | undefined;
131
139
  limit_reset?: string | null | undefined;
132
140
  include_byok_in_limit?: boolean | undefined;
141
+ expires_at?: string | null | undefined;
133
142
  };
134
143
  /** @internal */
135
144
  export declare const CreateKeysRequest$outboundSchema: z.ZodType<CreateKeysRequest$Outbound, CreateKeysRequest>;
@@ -23,10 +23,12 @@ export const CreateKeysRequest$outboundSchema = z.object({
23
23
  limit: z.nullable(z.number()).optional(),
24
24
  limitReset: z.nullable(CreateKeysLimitReset$outboundSchema).optional(),
25
25
  includeByokInLimit: z.boolean().optional(),
26
+ expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
26
27
  }).transform((v) => {
27
28
  return remap$(v, {
28
29
  limitReset: "limit_reset",
29
30
  includeByokInLimit: "include_byok_in_limit",
31
+ expiresAt: "expires_at",
30
32
  });
31
33
  });
32
34
  export function createKeysRequestToJSON(createKeysRequest) {
@@ -52,6 +54,7 @@ export const CreateKeysData$inboundSchema = z.object({
52
54
  byok_usage_monthly: z.number(),
53
55
  created_at: z.string(),
54
56
  updated_at: z.nullable(z.string()),
57
+ expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
55
58
  }).transform((v) => {
56
59
  return remap$(v, {
57
60
  "limit_remaining": "limitRemaining",
@@ -66,6 +69,7 @@ export const CreateKeysData$inboundSchema = z.object({
66
69
  "byok_usage_monthly": "byokUsageMonthly",
67
70
  "created_at": "createdAt",
68
71
  "updated_at": "updatedAt",
72
+ "expires_at": "expiresAt",
69
73
  });
70
74
  });
71
75
  export function createKeysDataFromJSON(jsonString) {
@@ -83,6 +83,10 @@ export type GetKeyData = {
83
83
  * ISO 8601 timestamp of when the API key was last updated
84
84
  */
85
85
  updatedAt: string | null;
86
+ /**
87
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
88
+ */
89
+ expiresAt?: Date | null | undefined;
86
90
  };
87
91
  /**
88
92
  * API key details
@@ -32,6 +32,7 @@ export const GetKeyData$inboundSchema = z
32
32
  byok_usage_monthly: z.number(),
33
33
  created_at: z.string(),
34
34
  updated_at: z.nullable(z.string()),
35
+ expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
35
36
  }).transform((v) => {
36
37
  return remap$(v, {
37
38
  "limit_remaining": "limitRemaining",
@@ -46,6 +47,7 @@ export const GetKeyData$inboundSchema = z
46
47
  "byok_usage_monthly": "byokUsageMonthly",
47
48
  "created_at": "createdAt",
48
49
  "updated_at": "updatedAt",
50
+ "expires_at": "expiresAt",
49
51
  });
50
52
  });
51
53
  export function getKeyDataFromJSON(jsonString) {
@@ -84,6 +84,10 @@ export type ListData = {
84
84
  * ISO 8601 timestamp of when the API key was last updated
85
85
  */
86
86
  updatedAt: string | null;
87
+ /**
88
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
89
+ */
90
+ expiresAt?: Date | null | undefined;
87
91
  };
88
92
  /**
89
93
  * List of API keys
@@ -36,6 +36,7 @@ export const ListData$inboundSchema = z.object({
36
36
  byok_usage_monthly: z.number(),
37
37
  created_at: z.string(),
38
38
  updated_at: z.nullable(z.string()),
39
+ expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
39
40
  }).transform((v) => {
40
41
  return remap$(v, {
41
42
  "limit_remaining": "limitRemaining",
@@ -50,6 +51,7 @@ export const ListData$inboundSchema = z.object({
50
51
  "byok_usage_monthly": "byokUsageMonthly",
51
52
  "created_at": "createdAt",
52
53
  "updated_at": "updatedAt",
54
+ "expires_at": "expiresAt",
53
55
  });
54
56
  });
55
57
  export function listDataFromJSON(jsonString) {
@@ -119,6 +119,10 @@ export type UpdateKeysData = {
119
119
  * ISO 8601 timestamp of when the API key was last updated
120
120
  */
121
121
  updatedAt: string | null;
122
+ /**
123
+ * ISO 8601 UTC timestamp when the API key expires, or null if no expiration
124
+ */
125
+ expiresAt?: Date | null | undefined;
122
126
  };
123
127
  /**
124
128
  * API key updated successfully
@@ -65,6 +65,7 @@ export const UpdateKeysData$inboundSchema = z.object({
65
65
  byok_usage_monthly: z.number(),
66
66
  created_at: z.string(),
67
67
  updated_at: z.nullable(z.string()),
68
+ expires_at: z.nullable(z.string().datetime({ offset: true }).transform(v => new Date(v))).optional(),
68
69
  }).transform((v) => {
69
70
  return remap$(v, {
70
71
  "limit_remaining": "limitRemaining",
@@ -79,6 +80,7 @@ export const UpdateKeysData$inboundSchema = z.object({
79
80
  "byok_usage_monthly": "byokUsageMonthly",
80
81
  "created_at": "createdAt",
81
82
  "updated_at": "updatedAt",
83
+ "expires_at": "expiresAt",
82
84
  });
83
85
  });
84
86
  export function updateKeysDataFromJSON(jsonString) {
@@ -10,7 +10,7 @@ import { ResponsesWebSearchCallOutput } from "./responseswebsearchcalloutput.js"
10
10
  /**
11
11
  * An output item from the response
12
12
  */
13
- export type ResponsesOutputItem = ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall | ResponsesOutputItemReasoning;
13
+ export type ResponsesOutputItem = ResponsesOutputMessage | ResponsesOutputItemFunctionCall | ResponsesOutputItemFileSearchCall | ResponsesOutputItemReasoning | ResponsesWebSearchCallOutput | ResponsesImageGenerationCall;
14
14
  /** @internal */
15
15
  export declare const ResponsesOutputItem$inboundSchema: z.ZodType<ResponsesOutputItem, unknown>;
16
16
  export declare function responsesOutputItemFromJSON(jsonString: string): SafeParseResult<ResponsesOutputItem, SDKValidationError>;
@@ -14,9 +14,9 @@ export const ResponsesOutputItem$inboundSchema = z.union([
14
14
  ResponsesOutputMessage$inboundSchema,
15
15
  ResponsesOutputItemFunctionCall$inboundSchema,
16
16
  ResponsesOutputItemFileSearchCall$inboundSchema,
17
+ ResponsesOutputItemReasoning$inboundSchema,
17
18
  ResponsesWebSearchCallOutput$inboundSchema,
18
19
  ResponsesImageGenerationCall$inboundSchema,
19
- ResponsesOutputItemReasoning$inboundSchema,
20
20
  ]);
21
21
  export function responsesOutputItemFromJSON(jsonString) {
22
22
  return safeParse(jsonString, (x) => ResponsesOutputItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesOutputItem' from JSON`);
@@ -26,7 +26,7 @@ export type ResponsesOutputItemReasoningStatusUnion = ResponsesOutputItemReasoni
26
26
  */
27
27
  export type ResponsesOutputItemReasoning = {
28
28
  type: ResponsesOutputItemReasoningType;
29
- id?: string | undefined;
29
+ id: string;
30
30
  content?: Array<ReasoningTextContent> | undefined;
31
31
  summary: Array<ReasoningSummaryText>;
32
32
  encryptedContent?: string | null | undefined;
@@ -61,7 +61,7 @@ export declare const ResponsesOutputItemReasoning$inboundSchema: z.ZodType<Respo
61
61
  /** @internal */
62
62
  export type ResponsesOutputItemReasoning$Outbound = {
63
63
  type: string;
64
- id?: string | undefined;
64
+ id: string;
65
65
  content?: Array<ReasoningTextContent$Outbound> | undefined;
66
66
  summary: Array<ReasoningSummaryText$Outbound>;
67
67
  encrypted_content?: string | null | undefined;
@@ -55,7 +55,7 @@ export function responsesOutputItemReasoningStatusUnionFromJSON(jsonString) {
55
55
  /** @internal */
56
56
  export const ResponsesOutputItemReasoning$inboundSchema = z.object({
57
57
  type: ResponsesOutputItemReasoningType$inboundSchema,
58
- id: z.string().optional(),
58
+ id: z.string(),
59
59
  content: z.array(ReasoningTextContent$inboundSchema).optional(),
60
60
  summary: z.array(ReasoningSummaryText$inboundSchema),
61
61
  encrypted_content: z.nullable(z.string()).optional(),
@@ -72,7 +72,7 @@ export const ResponsesOutputItemReasoning$inboundSchema = z.object({
72
72
  /** @internal */
73
73
  export const ResponsesOutputItemReasoning$outboundSchema = z.object({
74
74
  type: ResponsesOutputItemReasoningType$outboundSchema,
75
- id: z.string().optional(),
75
+ id: z.string(),
76
76
  content: z.array(ReasoningTextContent$outboundSchema).optional(),
77
77
  summary: z.array(ReasoningSummaryText$outboundSchema),
78
78
  encryptedContent: z.nullable(z.string()).optional(),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.1.8",
5
+ "version": "0.1.10",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
6
6
  "keywords": [