@openrouter/sdk 0.12.3 → 0.12.4

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 (56) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/chatrequest.d.ts +16 -16
  4. package/esm/models/chatrequest.js +8 -8
  5. package/esm/models/chatusage.d.ts +4 -4
  6. package/esm/models/chatusage.js +4 -4
  7. package/esm/models/createguardrailrequest.d.ts +2 -2
  8. package/esm/models/createguardrailrequest.js +1 -1
  9. package/esm/models/guardrail.d.ts +1 -1
  10. package/esm/models/guardrail.js +1 -1
  11. package/esm/models/model.d.ts +1 -1
  12. package/esm/models/model.js +1 -1
  13. package/esm/models/openresponsesresult.d.ts +5 -5
  14. package/esm/models/openresponsesresult.js +5 -5
  15. package/esm/models/operations/createkeys.d.ts +4 -4
  16. package/esm/models/operations/createkeys.js +3 -3
  17. package/esm/models/operations/getcurrentkey.d.ts +2 -2
  18. package/esm/models/operations/getcurrentkey.js +2 -2
  19. package/esm/models/operations/getgeneration.d.ts +17 -17
  20. package/esm/models/operations/getgeneration.js +17 -17
  21. package/esm/models/operations/getkey.d.ts +2 -2
  22. package/esm/models/operations/getkey.js +2 -2
  23. package/esm/models/operations/list.d.ts +4 -4
  24. package/esm/models/operations/list.js +3 -3
  25. package/esm/models/operations/listguardrailkeyassignments.d.ts +2 -2
  26. package/esm/models/operations/listguardrailkeyassignments.js +1 -1
  27. package/esm/models/operations/listguardrailmemberassignments.d.ts +2 -2
  28. package/esm/models/operations/listguardrailmemberassignments.js +1 -1
  29. package/esm/models/operations/listguardrails.d.ts +2 -2
  30. package/esm/models/operations/listguardrails.js +1 -1
  31. package/esm/models/operations/listkeyassignments.d.ts +2 -2
  32. package/esm/models/operations/listkeyassignments.js +1 -1
  33. package/esm/models/operations/listmemberassignments.d.ts +2 -2
  34. package/esm/models/operations/listmemberassignments.js +1 -1
  35. package/esm/models/operations/listorganizationmembers.d.ts +2 -2
  36. package/esm/models/operations/listorganizationmembers.js +1 -1
  37. package/esm/models/operations/updatekeys.d.ts +4 -4
  38. package/esm/models/operations/updatekeys.js +3 -3
  39. package/esm/models/percentilelatencycutoffs.d.ts +8 -8
  40. package/esm/models/percentilelatencycutoffs.js +4 -4
  41. package/esm/models/percentilethroughputcutoffs.d.ts +8 -8
  42. package/esm/models/percentilethroughputcutoffs.js +4 -4
  43. package/esm/models/publicendpoint.d.ts +5 -5
  44. package/esm/models/publicendpoint.js +5 -5
  45. package/esm/models/reasoningconfig.d.ts +2 -2
  46. package/esm/models/reasoningconfig.js +1 -1
  47. package/esm/models/responsesrequest.d.ts +14 -14
  48. package/esm/models/responsesrequest.js +7 -7
  49. package/esm/models/updateguardrailrequest.d.ts +2 -2
  50. package/esm/models/updateguardrailrequest.js +1 -1
  51. package/esm/models/usage.d.ts +2 -2
  52. package/esm/models/usage.js +2 -2
  53. package/esm/models/videogenerationusage.d.ts +1 -1
  54. package/esm/models/videogenerationusage.js +1 -1
  55. package/jsr.json +1 -1
  56. package/package.json +5 -5
@@ -49,7 +49,7 @@ export type ListRequest = {
49
49
  /**
50
50
  * Number of API keys to skip for pagination
51
51
  */
52
- offset?: number | undefined;
52
+ offset?: number | null | undefined;
53
53
  };
54
54
  export type ListData = {
55
55
  /**
@@ -99,11 +99,11 @@ export type ListData = {
99
99
  /**
100
100
  * Spending limit for the API key in USD
101
101
  */
102
- limit: number;
102
+ limit: number | null;
103
103
  /**
104
104
  * Remaining spending limit in USD
105
105
  */
106
- limitRemaining: number;
106
+ limitRemaining: number | null;
107
107
  /**
108
108
  * Type of limit reset for the API key
109
109
  */
@@ -148,7 +148,7 @@ export type ListRequest$Outbound = {
148
148
  appTitle?: string | undefined;
149
149
  appCategories?: string | undefined;
150
150
  include_disabled?: boolean | undefined;
151
- offset?: number | undefined;
151
+ offset?: number | null | undefined;
152
152
  };
153
153
  /** @internal */
154
154
  export declare const ListRequest$outboundSchema: z.ZodType<ListRequest$Outbound, ListRequest>;
@@ -11,7 +11,7 @@ export const ListRequest$outboundSchema = z.object({
11
11
  appTitle: z.string().optional(),
12
12
  appCategories: z.string().optional(),
13
13
  includeDisabled: z.boolean().optional(),
14
- offset: z.int().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
15
  }).transform((v) => {
16
16
  return remap$(v, {
17
17
  httpReferer: "HTTP-Referer",
@@ -34,8 +34,8 @@ export const ListData$inboundSchema = z.object({
34
34
  hash: z.string(),
35
35
  include_byok_in_limit: z.boolean(),
36
36
  label: z.string(),
37
- limit: z.number(),
38
- limit_remaining: z.number(),
37
+ limit: z.nullable(z.number()),
38
+ limit_remaining: z.nullable(z.number()),
39
39
  limit_reset: z.nullable(z.string()),
40
40
  name: z.string(),
41
41
  updated_at: z.nullable(z.string()),
@@ -50,7 +50,7 @@ export type ListGuardrailKeyAssignmentsRequest = {
50
50
  /**
51
51
  * Number of records to skip for pagination
52
52
  */
53
- offset?: number | undefined;
53
+ offset?: number | null | undefined;
54
54
  /**
55
55
  * Maximum number of records to return (max 100)
56
56
  */
@@ -65,7 +65,7 @@ export type ListGuardrailKeyAssignmentsRequest$Outbound = {
65
65
  appTitle?: string | undefined;
66
66
  appCategories?: string | undefined;
67
67
  id: string;
68
- offset?: number | undefined;
68
+ offset?: number | null | undefined;
69
69
  limit?: number | undefined;
70
70
  };
71
71
  /** @internal */
@@ -12,7 +12,7 @@ export const ListGuardrailKeyAssignmentsRequest$outboundSchema = z.object({
12
12
  appTitle: z.string().optional(),
13
13
  appCategories: z.string().optional(),
14
14
  id: z.string(),
15
- offset: z.int().optional(),
15
+ offset: z.nullable(z.int()).optional(),
16
16
  limit: z.int().optional(),
17
17
  }).transform((v) => {
18
18
  return remap$(v, {
@@ -50,7 +50,7 @@ export type ListGuardrailMemberAssignmentsRequest = {
50
50
  /**
51
51
  * Number of records to skip for pagination
52
52
  */
53
- offset?: number | undefined;
53
+ offset?: number | null | undefined;
54
54
  /**
55
55
  * Maximum number of records to return (max 100)
56
56
  */
@@ -65,7 +65,7 @@ export type ListGuardrailMemberAssignmentsRequest$Outbound = {
65
65
  appTitle?: string | undefined;
66
66
  appCategories?: string | undefined;
67
67
  id: string;
68
- offset?: number | undefined;
68
+ offset?: number | null | undefined;
69
69
  limit?: number | undefined;
70
70
  };
71
71
  /** @internal */
@@ -12,7 +12,7 @@ export const ListGuardrailMemberAssignmentsRequest$outboundSchema = z.object({
12
12
  appTitle: z.string().optional(),
13
13
  appCategories: z.string().optional(),
14
14
  id: z.string(),
15
- offset: z.int().optional(),
15
+ offset: z.nullable(z.int()).optional(),
16
16
  limit: z.int().optional(),
17
17
  }).transform((v) => {
18
18
  return remap$(v, {
@@ -46,7 +46,7 @@ export type ListGuardrailsRequest = {
46
46
  /**
47
47
  * Number of records to skip for pagination
48
48
  */
49
- offset?: number | undefined;
49
+ offset?: number | null | undefined;
50
50
  /**
51
51
  * Maximum number of records to return (max 100)
52
52
  */
@@ -60,7 +60,7 @@ export type ListGuardrailsRequest$Outbound = {
60
60
  "HTTP-Referer"?: string | undefined;
61
61
  appTitle?: string | undefined;
62
62
  appCategories?: string | undefined;
63
- offset?: number | undefined;
63
+ offset?: number | null | undefined;
64
64
  limit?: number | undefined;
65
65
  };
66
66
  /** @internal */
@@ -11,7 +11,7 @@ export const ListGuardrailsRequest$outboundSchema = z.object({
11
11
  httpReferer: z.string().optional(),
12
12
  appTitle: z.string().optional(),
13
13
  appCategories: z.string().optional(),
14
- offset: z.int().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
15
  limit: z.int().optional(),
16
16
  }).transform((v) => {
17
17
  return remap$(v, {
@@ -46,7 +46,7 @@ export type ListKeyAssignmentsRequest = {
46
46
  /**
47
47
  * Number of records to skip for pagination
48
48
  */
49
- offset?: number | undefined;
49
+ offset?: number | null | undefined;
50
50
  /**
51
51
  * Maximum number of records to return (max 100)
52
52
  */
@@ -60,7 +60,7 @@ export type ListKeyAssignmentsRequest$Outbound = {
60
60
  "HTTP-Referer"?: string | undefined;
61
61
  appTitle?: string | undefined;
62
62
  appCategories?: string | undefined;
63
- offset?: number | undefined;
63
+ offset?: number | null | undefined;
64
64
  limit?: number | undefined;
65
65
  };
66
66
  /** @internal */
@@ -11,7 +11,7 @@ export const ListKeyAssignmentsRequest$outboundSchema = z.object({
11
11
  httpReferer: z.string().optional(),
12
12
  appTitle: z.string().optional(),
13
13
  appCategories: z.string().optional(),
14
- offset: z.int().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
15
  limit: z.int().optional(),
16
16
  }).transform((v) => {
17
17
  return remap$(v, {
@@ -46,7 +46,7 @@ export type ListMemberAssignmentsRequest = {
46
46
  /**
47
47
  * Number of records to skip for pagination
48
48
  */
49
- offset?: number | undefined;
49
+ offset?: number | null | undefined;
50
50
  /**
51
51
  * Maximum number of records to return (max 100)
52
52
  */
@@ -60,7 +60,7 @@ export type ListMemberAssignmentsRequest$Outbound = {
60
60
  "HTTP-Referer"?: string | undefined;
61
61
  appTitle?: string | undefined;
62
62
  appCategories?: string | undefined;
63
- offset?: number | undefined;
63
+ offset?: number | null | undefined;
64
64
  limit?: number | undefined;
65
65
  };
66
66
  /** @internal */
@@ -11,7 +11,7 @@ export const ListMemberAssignmentsRequest$outboundSchema = z.object({
11
11
  httpReferer: z.string().optional(),
12
12
  appTitle: z.string().optional(),
13
13
  appCategories: z.string().optional(),
14
- offset: z.int().optional(),
14
+ offset: z.nullable(z.int()).optional(),
15
15
  limit: z.int().optional(),
16
16
  }).transform((v) => {
17
17
  return remap$(v, {
@@ -46,7 +46,7 @@ export type ListOrganizationMembersRequest = {
46
46
  /**
47
47
  * Number of records to skip for pagination
48
48
  */
49
- offset?: number | undefined;
49
+ offset?: number | null | undefined;
50
50
  /**
51
51
  * Maximum number of records to return (max 100)
52
52
  */
@@ -106,7 +106,7 @@ export type ListOrganizationMembersRequest$Outbound = {
106
106
  "HTTP-Referer"?: string | undefined;
107
107
  appTitle?: string | undefined;
108
108
  appCategories?: string | undefined;
109
- offset?: number | undefined;
109
+ offset?: number | null | undefined;
110
110
  limit?: number | undefined;
111
111
  };
112
112
  /** @internal */
@@ -18,7 +18,7 @@ export const ListOrganizationMembersRequest$outboundSchema = z.object({
18
18
  httpReferer: z.string().optional(),
19
19
  appTitle: z.string().optional(),
20
20
  appCategories: z.string().optional(),
21
- offset: z.int().optional(),
21
+ offset: z.nullable(z.int()).optional(),
22
22
  limit: z.int().optional(),
23
23
  }).transform((v) => {
24
24
  return remap$(v, {
@@ -47,7 +47,7 @@ export type UpdateKeysRequestBody = {
47
47
  /**
48
48
  * New spending limit for the API key in USD
49
49
  */
50
- limit?: number | undefined;
50
+ limit?: number | null | undefined;
51
51
  /**
52
52
  * New limit reset type for the API key (daily, weekly, monthly, or null for no reset). Resets happen automatically at midnight UTC, and weeks are Monday through Sunday.
53
53
  */
@@ -134,11 +134,11 @@ export type UpdateKeysData = {
134
134
  /**
135
135
  * Spending limit for the API key in USD
136
136
  */
137
- limit: number;
137
+ limit: number | null;
138
138
  /**
139
139
  * Remaining spending limit in USD
140
140
  */
141
- limitRemaining: number;
141
+ limitRemaining: number | null;
142
142
  /**
143
143
  * Type of limit reset for the API key
144
144
  */
@@ -183,7 +183,7 @@ export declare const UpdateKeysLimitReset$outboundSchema: z.ZodType<string, Upda
183
183
  export type UpdateKeysRequestBody$Outbound = {
184
184
  disabled?: boolean | undefined;
185
185
  include_byok_in_limit?: boolean | undefined;
186
- limit?: number | undefined;
186
+ limit?: number | null | undefined;
187
187
  limit_reset?: string | null | undefined;
188
188
  name?: string | undefined;
189
189
  };
@@ -20,7 +20,7 @@ export const UpdateKeysLimitReset$outboundSchema = openEnums.outboundSchema(Upda
20
20
  export const UpdateKeysRequestBody$outboundSchema = z.object({
21
21
  disabled: z.boolean().optional(),
22
22
  includeByokInLimit: z.boolean().optional(),
23
- limit: z.number().optional(),
23
+ limit: z.nullable(z.number()).optional(),
24
24
  limitReset: z.nullable(UpdateKeysLimitReset$outboundSchema).optional(),
25
25
  name: z.string().optional(),
26
26
  }).transform((v) => {
@@ -61,8 +61,8 @@ export const UpdateKeysData$inboundSchema = z.object({
61
61
  hash: z.string(),
62
62
  include_byok_in_limit: z.boolean(),
63
63
  label: z.string(),
64
- limit: z.number(),
65
- limit_remaining: z.number(),
64
+ limit: z.nullable(z.number()),
65
+ limit_remaining: z.nullable(z.number()),
66
66
  limit_reset: z.nullable(z.string()),
67
67
  name: z.string(),
68
68
  updated_at: z.nullable(z.string()),
@@ -6,26 +6,26 @@ export type PercentileLatencyCutoffs = {
6
6
  /**
7
7
  * Maximum p50 latency (seconds)
8
8
  */
9
- p50?: number | undefined;
9
+ p50?: number | null | undefined;
10
10
  /**
11
11
  * Maximum p75 latency (seconds)
12
12
  */
13
- p75?: number | undefined;
13
+ p75?: number | null | undefined;
14
14
  /**
15
15
  * Maximum p90 latency (seconds)
16
16
  */
17
- p90?: number | undefined;
17
+ p90?: number | null | undefined;
18
18
  /**
19
19
  * Maximum p99 latency (seconds)
20
20
  */
21
- p99?: number | undefined;
21
+ p99?: number | null | undefined;
22
22
  };
23
23
  /** @internal */
24
24
  export type PercentileLatencyCutoffs$Outbound = {
25
- p50?: number | undefined;
26
- p75?: number | undefined;
27
- p90?: number | undefined;
28
- p99?: number | undefined;
25
+ p50?: number | null | undefined;
26
+ p75?: number | null | undefined;
27
+ p90?: number | null | undefined;
28
+ p99?: number | null | undefined;
29
29
  };
30
30
  /** @internal */
31
31
  export declare const PercentileLatencyCutoffs$outboundSchema: z.ZodType<PercentileLatencyCutoffs$Outbound, PercentileLatencyCutoffs>;
@@ -5,10 +5,10 @@
5
5
  import * as z from "zod/v4";
6
6
  /** @internal */
7
7
  export const PercentileLatencyCutoffs$outboundSchema = z.object({
8
- p50: z.number().optional(),
9
- p75: z.number().optional(),
10
- p90: z.number().optional(),
11
- p99: z.number().optional(),
8
+ p50: z.nullable(z.number()).optional(),
9
+ p75: z.nullable(z.number()).optional(),
10
+ p90: z.nullable(z.number()).optional(),
11
+ p99: z.nullable(z.number()).optional(),
12
12
  });
13
13
  export function percentileLatencyCutoffsToJSON(percentileLatencyCutoffs) {
14
14
  return JSON.stringify(PercentileLatencyCutoffs$outboundSchema.parse(percentileLatencyCutoffs));
@@ -6,26 +6,26 @@ export type PercentileThroughputCutoffs = {
6
6
  /**
7
7
  * Minimum p50 throughput (tokens/sec)
8
8
  */
9
- p50?: number | undefined;
9
+ p50?: number | null | undefined;
10
10
  /**
11
11
  * Minimum p75 throughput (tokens/sec)
12
12
  */
13
- p75?: number | undefined;
13
+ p75?: number | null | undefined;
14
14
  /**
15
15
  * Minimum p90 throughput (tokens/sec)
16
16
  */
17
- p90?: number | undefined;
17
+ p90?: number | null | undefined;
18
18
  /**
19
19
  * Minimum p99 throughput (tokens/sec)
20
20
  */
21
- p99?: number | undefined;
21
+ p99?: number | null | undefined;
22
22
  };
23
23
  /** @internal */
24
24
  export type PercentileThroughputCutoffs$Outbound = {
25
- p50?: number | undefined;
26
- p75?: number | undefined;
27
- p90?: number | undefined;
28
- p99?: number | undefined;
25
+ p50?: number | null | undefined;
26
+ p75?: number | null | undefined;
27
+ p90?: number | null | undefined;
28
+ p99?: number | null | undefined;
29
29
  };
30
30
  /** @internal */
31
31
  export declare const PercentileThroughputCutoffs$outboundSchema: z.ZodType<PercentileThroughputCutoffs$Outbound, PercentileThroughputCutoffs>;
@@ -5,10 +5,10 @@
5
5
  import * as z from "zod/v4";
6
6
  /** @internal */
7
7
  export const PercentileThroughputCutoffs$outboundSchema = z.object({
8
- p50: z.number().optional(),
9
- p75: z.number().optional(),
10
- p90: z.number().optional(),
11
- p99: z.number().optional(),
8
+ p50: z.nullable(z.number()).optional(),
9
+ p75: z.nullable(z.number()).optional(),
10
+ p90: z.nullable(z.number()).optional(),
11
+ p99: z.nullable(z.number()).optional(),
12
12
  });
13
13
  export function percentileThroughputCutoffsToJSON(percentileThroughputCutoffs) {
14
14
  return JSON.stringify(PercentileThroughputCutoffs$outboundSchema.parse(percentileThroughputCutoffs));
@@ -43,8 +43,8 @@ export type PublicEndpoint = {
43
43
  * Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
44
44
  */
45
45
  latencyLast30m: PercentileStats | null;
46
- maxCompletionTokens: number;
47
- maxPromptTokens: number;
46
+ maxCompletionTokens: number | null;
47
+ maxPromptTokens: number | null;
48
48
  /**
49
49
  * The unique identifier for the model (permaslug)
50
50
  */
@@ -62,12 +62,12 @@ export type PublicEndpoint = {
62
62
  /**
63
63
  * Uptime percentage over the last 1 day, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
64
64
  */
65
- uptimeLast1d: number;
66
- uptimeLast30m: number;
65
+ uptimeLast1d: number | null;
66
+ uptimeLast30m: number | null;
67
67
  /**
68
68
  * Uptime percentage over the last 5 minutes, calculated as successful requests / (successful + error requests) * 100. Rate-limited requests are excluded. Returns null if insufficient data.
69
69
  */
70
- uptimeLast5m: number;
70
+ uptimeLast5m: number | null;
71
71
  };
72
72
  /** @internal */
73
73
  export declare const Pricing$inboundSchema: z.ZodType<Pricing, unknown>;
@@ -58,8 +58,8 @@ export const PublicEndpointQuantization$inboundSchema = openEnums.inboundSchema(
58
58
  export const PublicEndpoint$inboundSchema = z.object({
59
59
  context_length: z.int(),
60
60
  latency_last_30m: z.nullable(PercentileStats$inboundSchema),
61
- max_completion_tokens: z.int(),
62
- max_prompt_tokens: z.int(),
61
+ max_completion_tokens: z.nullable(z.int()),
62
+ max_prompt_tokens: z.nullable(z.int()),
63
63
  model_id: z.string(),
64
64
  model_name: z.string(),
65
65
  name: z.string(),
@@ -71,9 +71,9 @@ export const PublicEndpoint$inboundSchema = z.object({
71
71
  supports_implicit_caching: z.boolean(),
72
72
  tag: z.string(),
73
73
  throughput_last_30m: z.nullable(PercentileStats$inboundSchema),
74
- uptime_last_1d: z.number(),
75
- uptime_last_30m: z.number(),
76
- uptime_last_5m: z.number(),
74
+ uptime_last_1d: z.nullable(z.number()),
75
+ uptime_last_30m: z.nullable(z.number()),
76
+ uptime_last_5m: z.nullable(z.number()),
77
77
  }).transform((v) => {
78
78
  return remap$(v, {
79
79
  "context_length": "contextLength",
@@ -8,14 +8,14 @@ export type ReasoningConfig = {
8
8
  effort?: ReasoningEffort | null | undefined;
9
9
  summary?: ReasoningSummaryVerbosity | null | undefined;
10
10
  enabled?: boolean | null | undefined;
11
- maxTokens?: number | undefined;
11
+ maxTokens?: number | null | undefined;
12
12
  };
13
13
  /** @internal */
14
14
  export type ReasoningConfig$Outbound = {
15
15
  effort?: string | null | undefined;
16
16
  summary?: string | null | undefined;
17
17
  enabled?: boolean | null | undefined;
18
- max_tokens?: number | undefined;
18
+ max_tokens?: number | null | undefined;
19
19
  };
20
20
  /** @internal */
21
21
  export declare const ReasoningConfig$outboundSchema: z.ZodType<ReasoningConfig$Outbound, ReasoningConfig>;
@@ -11,7 +11,7 @@ export const ReasoningConfig$outboundSchema = z.object({
11
11
  effort: z.nullable(ReasoningEffort$outboundSchema).optional(),
12
12
  summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(),
13
13
  enabled: z.nullable(z.boolean()).optional(),
14
- maxTokens: z.int().optional(),
14
+ maxTokens: z.nullable(z.int()).optional(),
15
15
  }).transform((v) => {
16
16
  return remap$(v, {
17
17
  maxTokens: "max_tokens",
@@ -64,7 +64,7 @@ export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWe
64
64
  */
65
65
  export type ResponsesRequest = {
66
66
  background?: boolean | null | undefined;
67
- frequencyPenalty?: number | undefined;
67
+ frequencyPenalty?: number | null | undefined;
68
68
  /**
69
69
  * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/features/multimodal/image-generation for more details.
70
70
  */
@@ -77,8 +77,8 @@ export type ResponsesRequest = {
77
77
  */
78
78
  input?: InputsUnion | undefined;
79
79
  instructions?: string | null | undefined;
80
- maxOutputTokens?: number | undefined;
81
- maxToolCalls?: number | undefined;
80
+ maxOutputTokens?: number | null | undefined;
81
+ maxToolCalls?: number | null | undefined;
82
82
  /**
83
83
  * Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed.
84
84
  */
@@ -96,7 +96,7 @@ export type ResponsesRequest = {
96
96
  * Plugins you want to enable for this request, including their settings.
97
97
  */
98
98
  plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | ModerationPlugin | ResponseHealingPlugin | WebSearchPlugin> | undefined;
99
- presencePenalty?: number | undefined;
99
+ presencePenalty?: number | null | undefined;
100
100
  previousResponseId?: string | null | undefined;
101
101
  prompt?: StoredPromptTemplate | null | undefined;
102
102
  promptCacheKey?: string | null | undefined;
@@ -116,7 +116,7 @@ export type ResponsesRequest = {
116
116
  sessionId?: string | undefined;
117
117
  store?: false | undefined;
118
118
  stream?: boolean | undefined;
119
- temperature?: number | undefined;
119
+ temperature?: number | null | undefined;
120
120
  /**
121
121
  * Text output configuration including format and verbosity
122
122
  */
@@ -128,8 +128,8 @@ export type ResponsesRequest = {
128
128
  type: "openrouter:experimental__search_models";
129
129
  }) | WebSearchServerToolOpenRouter> | undefined;
130
130
  topK?: number | undefined;
131
- topLogprobs?: number | undefined;
132
- topP?: number | undefined;
131
+ topLogprobs?: number | null | undefined;
132
+ topP?: number | null | undefined;
133
133
  /**
134
134
  * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
135
135
  */
@@ -177,15 +177,15 @@ export declare function responsesRequestToolUnionToJSON(responsesRequestToolUnio
177
177
  /** @internal */
178
178
  export type ResponsesRequest$Outbound = {
179
179
  background?: boolean | null | undefined;
180
- frequency_penalty?: number | undefined;
180
+ frequency_penalty?: number | null | undefined;
181
181
  image_config?: {
182
182
  [k: string]: string | number;
183
183
  } | undefined;
184
184
  include?: Array<string> | null | undefined;
185
185
  input?: InputsUnion$Outbound | undefined;
186
186
  instructions?: string | null | undefined;
187
- max_output_tokens?: number | undefined;
188
- max_tool_calls?: number | undefined;
187
+ max_output_tokens?: number | null | undefined;
188
+ max_tool_calls?: number | null | undefined;
189
189
  metadata?: {
190
190
  [k: string]: string;
191
191
  } | null | undefined;
@@ -194,7 +194,7 @@ export type ResponsesRequest$Outbound = {
194
194
  models?: Array<string> | undefined;
195
195
  parallel_tool_calls?: boolean | null | undefined;
196
196
  plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | ModerationPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound> | undefined;
197
- presence_penalty?: number | undefined;
197
+ presence_penalty?: number | null | undefined;
198
198
  previous_response_id?: string | null | undefined;
199
199
  prompt?: StoredPromptTemplate$Outbound | null | undefined;
200
200
  prompt_cache_key?: string | null | undefined;
@@ -205,7 +205,7 @@ export type ResponsesRequest$Outbound = {
205
205
  session_id?: string | undefined;
206
206
  store: false;
207
207
  stream: boolean;
208
- temperature?: number | undefined;
208
+ temperature?: number | null | undefined;
209
209
  text?: TextExtendedConfig$Outbound | undefined;
210
210
  tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined;
211
211
  tools?: Array<ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound | Preview20250311WebSearchServerTool$Outbound | LegacyWebSearchServerTool$Outbound | WebSearchServerTool$Outbound | FileSearchServerTool$Outbound | ComputerUseServerTool$Outbound | CodeInterpreterServerTool$Outbound | McpServerTool$Outbound | ImageGenerationServerTool$Outbound | CodexLocalShellTool$Outbound | ShellServerTool$Outbound | ApplyPatchServerTool$Outbound | CustomTool$Outbound | (DatetimeServerTool$Outbound & {
@@ -214,8 +214,8 @@ export type ResponsesRequest$Outbound = {
214
214
  type: "openrouter:experimental__search_models";
215
215
  }) | WebSearchServerToolOpenRouter$Outbound> | undefined;
216
216
  top_k?: number | undefined;
217
- top_logprobs?: number | undefined;
218
- top_p?: number | undefined;
217
+ top_logprobs?: number | null | undefined;
218
+ top_p?: number | null | undefined;
219
219
  trace?: TraceConfig$Outbound | undefined;
220
220
  truncation?: string | null | undefined;
221
221
  user?: string | undefined;
@@ -100,14 +100,14 @@ export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
100
100
  /** @internal */
101
101
  export const ResponsesRequest$outboundSchema = z.object({
102
102
  background: z.nullable(z.boolean()).optional(),
103
- frequencyPenalty: z.number().optional(),
103
+ frequencyPenalty: z.nullable(z.number()).optional(),
104
104
  imageConfig: z.record(z.string(), z.union([z.string(), z.number()]))
105
105
  .optional(),
106
106
  include: z.nullable(z.array(ResponseIncludesEnum$outboundSchema)).optional(),
107
107
  input: InputsUnion$outboundSchema.optional(),
108
108
  instructions: z.nullable(z.string()).optional(),
109
- maxOutputTokens: z.int().optional(),
110
- maxToolCalls: z.int().optional(),
109
+ maxOutputTokens: z.nullable(z.int()).optional(),
110
+ maxToolCalls: z.nullable(z.int()).optional(),
111
111
  metadata: z.nullable(z.record(z.string(), z.string())).optional(),
112
112
  modalities: z.array(OutputModalityEnum$outboundSchema).optional(),
113
113
  model: z.string().optional(),
@@ -121,7 +121,7 @@ export const ResponsesRequest$outboundSchema = z.object({
121
121
  ResponseHealingPlugin$outboundSchema,
122
122
  WebSearchPlugin$outboundSchema,
123
123
  ])).optional(),
124
- presencePenalty: z.number().optional(),
124
+ presencePenalty: z.nullable(z.number()).optional(),
125
125
  previousResponseId: z.nullable(z.string()).optional(),
126
126
  prompt: z.nullable(StoredPromptTemplate$outboundSchema).optional(),
127
127
  promptCacheKey: z.nullable(z.string()).optional(),
@@ -132,7 +132,7 @@ export const ResponsesRequest$outboundSchema = z.object({
132
132
  sessionId: z.string().optional(),
133
133
  store: z.literal(false).default(false),
134
134
  stream: z.boolean().default(false),
135
- temperature: z.number().optional(),
135
+ temperature: z.nullable(z.number()).optional(),
136
136
  text: TextExtendedConfig$outboundSchema.optional(),
137
137
  toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema.optional(),
138
138
  tools: z.array(z.union([
@@ -155,8 +155,8 @@ export const ResponsesRequest$outboundSchema = z.object({
155
155
  WebSearchServerToolOpenRouter$outboundSchema,
156
156
  ])).optional(),
157
157
  topK: z.int().optional(),
158
- topLogprobs: z.int().optional(),
159
- topP: z.number().optional(),
158
+ topLogprobs: z.nullable(z.int()).optional(),
159
+ topP: z.nullable(z.number()).optional(),
160
160
  trace: TraceConfig$outboundSchema.optional(),
161
161
  truncation: z.nullable(OpenAIResponsesTruncation$outboundSchema).optional(),
162
162
  user: z.string().optional(),
@@ -28,7 +28,7 @@ export type UpdateGuardrailRequest = {
28
28
  /**
29
29
  * New spending limit in USD
30
30
  */
31
- limitUsd?: number | undefined;
31
+ limitUsd?: number | null | undefined;
32
32
  /**
33
33
  * New name for the guardrail
34
34
  */
@@ -46,7 +46,7 @@ export type UpdateGuardrailRequest$Outbound = {
46
46
  enforce_zdr?: boolean | null | undefined;
47
47
  ignored_models?: Array<string> | null | undefined;
48
48
  ignored_providers?: Array<string> | null | undefined;
49
- limit_usd?: number | undefined;
49
+ limit_usd?: number | null | undefined;
50
50
  name?: string | undefined;
51
51
  reset_interval?: string | null | undefined;
52
52
  };
@@ -13,7 +13,7 @@ export const UpdateGuardrailRequest$outboundSchema = z.object({
13
13
  enforceZdr: z.nullable(z.boolean()).optional(),
14
14
  ignoredModels: z.nullable(z.array(z.string())).optional(),
15
15
  ignoredProviders: z.nullable(z.array(z.string())).optional(),
16
- limitUsd: z.number().optional(),
16
+ limitUsd: z.nullable(z.number()).optional(),
17
17
  name: z.string().optional(),
18
18
  resetInterval: z.nullable(GuardrailInterval$outboundSchema).optional(),
19
19
  }).transform((v) => {
@@ -8,7 +8,7 @@ export type OutputTokensDetails = {
8
8
  reasoningTokens: number;
9
9
  };
10
10
  export type CostDetails = {
11
- upstreamInferenceCost?: number | undefined;
11
+ upstreamInferenceCost?: number | null | undefined;
12
12
  upstreamInferenceInputCost: number;
13
13
  upstreamInferenceOutputCost: number;
14
14
  };
@@ -24,7 +24,7 @@ export type Usage = {
24
24
  /**
25
25
  * Cost of the completion
26
26
  */
27
- cost?: number | undefined;
27
+ cost?: number | null | undefined;
28
28
  costDetails?: CostDetails | undefined;
29
29
  /**
30
30
  * Whether a request was made using a Bring Your Own Key configuration