@meetkai/mka1 0.48.39 → 0.48.41

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 (176) hide show
  1. package/bin/mcp-server.js +69 -17
  2. package/bin/mcp-server.js.map +24 -24
  3. package/dist/commonjs/funcs/budgetsApiKeyEvents.d.ts +1 -1
  4. package/dist/commonjs/funcs/budgetsApiKeyEvents.js +1 -1
  5. package/dist/commonjs/funcs/budgetsDeleteApiKey.d.ts +1 -1
  6. package/dist/commonjs/funcs/budgetsDeleteApiKey.js +1 -1
  7. package/dist/commonjs/funcs/budgetsGetApiKey.d.ts +1 -1
  8. package/dist/commonjs/funcs/budgetsGetApiKey.js +1 -1
  9. package/dist/commonjs/funcs/budgetsList.d.ts +1 -1
  10. package/dist/commonjs/funcs/budgetsList.js +1 -1
  11. package/dist/commonjs/funcs/budgetsSetApiKey.d.ts +1 -1
  12. package/dist/commonjs/funcs/budgetsSetApiKey.js +1 -1
  13. package/dist/commonjs/lib/config.d.ts +3 -3
  14. package/dist/commonjs/lib/config.js +3 -3
  15. package/dist/commonjs/lib/http.d.ts +1 -1
  16. package/dist/commonjs/lib/http.d.ts.map +1 -1
  17. package/dist/commonjs/lib/http.js +1 -1
  18. package/dist/commonjs/lib/http.js.map +1 -1
  19. package/dist/commonjs/lib/security.d.ts +5 -4
  20. package/dist/commonjs/lib/security.d.ts.map +1 -1
  21. package/dist/commonjs/lib/security.js +6 -7
  22. package/dist/commonjs/lib/security.js.map +1 -1
  23. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  24. package/dist/commonjs/mcp-server/server.js +1 -1
  25. package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.js +1 -1
  26. package/dist/commonjs/mcp-server/tools/budgetsApiKeyEvents.js.map +1 -1
  27. package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.js +1 -1
  28. package/dist/commonjs/mcp-server/tools/budgetsDeleteApiKey.js.map +1 -1
  29. package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.js +1 -1
  30. package/dist/commonjs/mcp-server/tools/budgetsGetApiKey.js.map +1 -1
  31. package/dist/commonjs/mcp-server/tools/budgetsList.js +1 -1
  32. package/dist/commonjs/mcp-server/tools/budgetsList.js.map +1 -1
  33. package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.js +1 -1
  34. package/dist/commonjs/mcp-server/tools/budgetsSetApiKey.js.map +1 -1
  35. package/dist/commonjs/models/components/addregistrymodelrequest.d.ts +21 -0
  36. package/dist/commonjs/models/components/addregistrymodelrequest.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/addregistrymodelrequest.js +25 -1
  38. package/dist/commonjs/models/components/addregistrymodelrequest.js.map +1 -1
  39. package/dist/commonjs/models/components/updateregistrymodelrequest.d.ts +21 -0
  40. package/dist/commonjs/models/components/updateregistrymodelrequest.d.ts.map +1 -1
  41. package/dist/commonjs/models/components/updateregistrymodelrequest.js +25 -1
  42. package/dist/commonjs/models/components/updateregistrymodelrequest.js.map +1 -1
  43. package/dist/commonjs/models/operations/getapikeybudgets.d.ts +2 -0
  44. package/dist/commonjs/models/operations/getapikeybudgets.d.ts.map +1 -1
  45. package/dist/commonjs/models/operations/getapikeybudgets.js +4 -0
  46. package/dist/commonjs/models/operations/getapikeybudgets.js.map +1 -1
  47. package/dist/commonjs/models/operations/getorgbudgets.d.ts +2 -0
  48. package/dist/commonjs/models/operations/getorgbudgets.d.ts.map +1 -1
  49. package/dist/commonjs/models/operations/getorgbudgets.js +4 -0
  50. package/dist/commonjs/models/operations/getorgbudgets.js.map +1 -1
  51. package/dist/commonjs/models/operations/listbudgets.d.ts +2 -0
  52. package/dist/commonjs/models/operations/listbudgets.d.ts.map +1 -1
  53. package/dist/commonjs/models/operations/listbudgets.js +4 -0
  54. package/dist/commonjs/models/operations/listbudgets.js.map +1 -1
  55. package/dist/commonjs/models/operations/setapikeybudget.d.ts +2 -0
  56. package/dist/commonjs/models/operations/setapikeybudget.d.ts.map +1 -1
  57. package/dist/commonjs/models/operations/setapikeybudget.js +4 -0
  58. package/dist/commonjs/models/operations/setapikeybudget.js.map +1 -1
  59. package/dist/commonjs/models/operations/setorgbudget.d.ts +2 -0
  60. package/dist/commonjs/models/operations/setorgbudget.d.ts.map +1 -1
  61. package/dist/commonjs/models/operations/setorgbudget.js +4 -0
  62. package/dist/commonjs/models/operations/setorgbudget.js.map +1 -1
  63. package/dist/commonjs/react-query/budgetsApiKeyEvents.d.ts +2 -2
  64. package/dist/commonjs/react-query/budgetsApiKeyEvents.js +2 -2
  65. package/dist/commonjs/react-query/budgetsDeleteApiKey.d.ts +1 -1
  66. package/dist/commonjs/react-query/budgetsDeleteApiKey.js +1 -1
  67. package/dist/commonjs/react-query/budgetsGetApiKey.d.ts +2 -2
  68. package/dist/commonjs/react-query/budgetsGetApiKey.js +2 -2
  69. package/dist/commonjs/react-query/budgetsList.d.ts +2 -2
  70. package/dist/commonjs/react-query/budgetsList.js +2 -2
  71. package/dist/commonjs/react-query/budgetsSetApiKey.d.ts +1 -1
  72. package/dist/commonjs/react-query/budgetsSetApiKey.js +1 -1
  73. package/dist/commonjs/sdk/budgets.d.ts +5 -5
  74. package/dist/commonjs/sdk/budgets.js +5 -5
  75. package/dist/esm/funcs/budgetsApiKeyEvents.d.ts +1 -1
  76. package/dist/esm/funcs/budgetsApiKeyEvents.js +1 -1
  77. package/dist/esm/funcs/budgetsDeleteApiKey.d.ts +1 -1
  78. package/dist/esm/funcs/budgetsDeleteApiKey.js +1 -1
  79. package/dist/esm/funcs/budgetsGetApiKey.d.ts +1 -1
  80. package/dist/esm/funcs/budgetsGetApiKey.js +1 -1
  81. package/dist/esm/funcs/budgetsList.d.ts +1 -1
  82. package/dist/esm/funcs/budgetsList.js +1 -1
  83. package/dist/esm/funcs/budgetsSetApiKey.d.ts +1 -1
  84. package/dist/esm/funcs/budgetsSetApiKey.js +1 -1
  85. package/dist/esm/lib/config.d.ts +3 -3
  86. package/dist/esm/lib/config.js +3 -3
  87. package/dist/esm/lib/http.d.ts +1 -1
  88. package/dist/esm/lib/http.d.ts.map +1 -1
  89. package/dist/esm/lib/http.js +1 -1
  90. package/dist/esm/lib/http.js.map +1 -1
  91. package/dist/esm/lib/security.d.ts +5 -4
  92. package/dist/esm/lib/security.d.ts.map +1 -1
  93. package/dist/esm/lib/security.js +4 -5
  94. package/dist/esm/lib/security.js.map +1 -1
  95. package/dist/esm/mcp-server/mcp-server.js +1 -1
  96. package/dist/esm/mcp-server/server.js +1 -1
  97. package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.js +1 -1
  98. package/dist/esm/mcp-server/tools/budgetsApiKeyEvents.js.map +1 -1
  99. package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.js +1 -1
  100. package/dist/esm/mcp-server/tools/budgetsDeleteApiKey.js.map +1 -1
  101. package/dist/esm/mcp-server/tools/budgetsGetApiKey.js +1 -1
  102. package/dist/esm/mcp-server/tools/budgetsGetApiKey.js.map +1 -1
  103. package/dist/esm/mcp-server/tools/budgetsList.js +1 -1
  104. package/dist/esm/mcp-server/tools/budgetsList.js.map +1 -1
  105. package/dist/esm/mcp-server/tools/budgetsSetApiKey.js +1 -1
  106. package/dist/esm/mcp-server/tools/budgetsSetApiKey.js.map +1 -1
  107. package/dist/esm/models/components/addregistrymodelrequest.d.ts +21 -0
  108. package/dist/esm/models/components/addregistrymodelrequest.d.ts.map +1 -1
  109. package/dist/esm/models/components/addregistrymodelrequest.js +22 -0
  110. package/dist/esm/models/components/addregistrymodelrequest.js.map +1 -1
  111. package/dist/esm/models/components/updateregistrymodelrequest.d.ts +21 -0
  112. package/dist/esm/models/components/updateregistrymodelrequest.d.ts.map +1 -1
  113. package/dist/esm/models/components/updateregistrymodelrequest.js +22 -0
  114. package/dist/esm/models/components/updateregistrymodelrequest.js.map +1 -1
  115. package/dist/esm/models/operations/getapikeybudgets.d.ts +2 -0
  116. package/dist/esm/models/operations/getapikeybudgets.d.ts.map +1 -1
  117. package/dist/esm/models/operations/getapikeybudgets.js +4 -0
  118. package/dist/esm/models/operations/getapikeybudgets.js.map +1 -1
  119. package/dist/esm/models/operations/getorgbudgets.d.ts +2 -0
  120. package/dist/esm/models/operations/getorgbudgets.d.ts.map +1 -1
  121. package/dist/esm/models/operations/getorgbudgets.js +4 -0
  122. package/dist/esm/models/operations/getorgbudgets.js.map +1 -1
  123. package/dist/esm/models/operations/listbudgets.d.ts +2 -0
  124. package/dist/esm/models/operations/listbudgets.d.ts.map +1 -1
  125. package/dist/esm/models/operations/listbudgets.js +4 -0
  126. package/dist/esm/models/operations/listbudgets.js.map +1 -1
  127. package/dist/esm/models/operations/setapikeybudget.d.ts +2 -0
  128. package/dist/esm/models/operations/setapikeybudget.d.ts.map +1 -1
  129. package/dist/esm/models/operations/setapikeybudget.js +4 -0
  130. package/dist/esm/models/operations/setapikeybudget.js.map +1 -1
  131. package/dist/esm/models/operations/setorgbudget.d.ts +2 -0
  132. package/dist/esm/models/operations/setorgbudget.d.ts.map +1 -1
  133. package/dist/esm/models/operations/setorgbudget.js +4 -0
  134. package/dist/esm/models/operations/setorgbudget.js.map +1 -1
  135. package/dist/esm/react-query/budgetsApiKeyEvents.d.ts +2 -2
  136. package/dist/esm/react-query/budgetsApiKeyEvents.js +2 -2
  137. package/dist/esm/react-query/budgetsDeleteApiKey.d.ts +1 -1
  138. package/dist/esm/react-query/budgetsDeleteApiKey.js +1 -1
  139. package/dist/esm/react-query/budgetsGetApiKey.d.ts +2 -2
  140. package/dist/esm/react-query/budgetsGetApiKey.js +2 -2
  141. package/dist/esm/react-query/budgetsList.d.ts +2 -2
  142. package/dist/esm/react-query/budgetsList.js +2 -2
  143. package/dist/esm/react-query/budgetsSetApiKey.d.ts +1 -1
  144. package/dist/esm/react-query/budgetsSetApiKey.js +1 -1
  145. package/dist/esm/sdk/budgets.d.ts +5 -5
  146. package/dist/esm/sdk/budgets.js +5 -5
  147. package/jsr.json +1 -1
  148. package/package.json +1 -1
  149. package/src/funcs/budgetsApiKeyEvents.ts +1 -1
  150. package/src/funcs/budgetsDeleteApiKey.ts +1 -1
  151. package/src/funcs/budgetsGetApiKey.ts +1 -1
  152. package/src/funcs/budgetsList.ts +1 -1
  153. package/src/funcs/budgetsSetApiKey.ts +1 -1
  154. package/src/lib/config.ts +3 -3
  155. package/src/lib/http.ts +3 -1
  156. package/src/lib/security.ts +10 -5
  157. package/src/mcp-server/mcp-server.ts +1 -1
  158. package/src/mcp-server/server.ts +1 -1
  159. package/src/mcp-server/tools/budgetsApiKeyEvents.ts +1 -1
  160. package/src/mcp-server/tools/budgetsDeleteApiKey.ts +1 -1
  161. package/src/mcp-server/tools/budgetsGetApiKey.ts +1 -1
  162. package/src/mcp-server/tools/budgetsList.ts +1 -1
  163. package/src/mcp-server/tools/budgetsSetApiKey.ts +1 -1
  164. package/src/models/components/addregistrymodelrequest.ts +55 -0
  165. package/src/models/components/updateregistrymodelrequest.ts +69 -0
  166. package/src/models/operations/getapikeybudgets.ts +6 -0
  167. package/src/models/operations/getorgbudgets.ts +6 -0
  168. package/src/models/operations/listbudgets.ts +6 -0
  169. package/src/models/operations/setapikeybudget.ts +6 -0
  170. package/src/models/operations/setorgbudget.ts +6 -0
  171. package/src/react-query/budgetsApiKeyEvents.ts +2 -2
  172. package/src/react-query/budgetsDeleteApiKey.ts +1 -1
  173. package/src/react-query/budgetsGetApiKey.ts +2 -2
  174. package/src/react-query/budgetsList.ts +2 -2
  175. package/src/react-query/budgetsSetApiKey.ts +1 -1
  176. package/src/sdk/budgets.ts +5 -5
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
29
29
  * Set a apikey budget
30
30
  *
31
31
  * @remarks
32
- * Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend.
32
+ * Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend. Callable by cluster admins, or org admins for API keys in their own organization.
33
33
  */
34
34
  export function budgetsSetApiKey(
35
35
  client: SDKCore,
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.1.0",
68
- sdkVersion: "0.48.39",
69
- genVersion: "2.916.2",
70
- userAgent: "speakeasy-sdk/typescript 0.48.39 2.916.2 1.1.0 @meetkai/mka1",
68
+ sdkVersion: "0.48.41",
69
+ genVersion: "2.916.4",
70
+ userAgent: "speakeasy-sdk/typescript 0.48.41 2.916.4 1.1.0 @meetkai/mka1",
71
71
  } as const;
package/src/lib/http.ts CHANGED
@@ -45,8 +45,10 @@ export class HTTPClient {
45
45
  private requestHooks: BeforeRequestHook[] = [];
46
46
  private requestErrorHooks: RequestErrorHook[] = [];
47
47
  private responseHooks: ResponseHook[] = [];
48
+ private options: HTTPClientOptions;
48
49
 
49
- constructor(private options: HTTPClientOptions = {}) {
50
+ constructor(options: HTTPClientOptions = {}) {
51
+ this.options = options;
50
52
  this.fetcher = options.fetcher || DEFAULT_FETCHER;
51
53
  }
52
54
 
@@ -12,17 +12,22 @@ type OAuth2PasswordFlow = {
12
12
  tokenURL: string;
13
13
  };
14
14
 
15
- export enum SecurityErrorCode {
16
- Incomplete = "incomplete",
17
- UnrecognisedSecurityType = "unrecognized_security_type",
18
- }
15
+ export const SecurityErrorCode = {
16
+ Incomplete: "incomplete",
17
+ UnrecognisedSecurityType: "unrecognized_security_type",
18
+ } as const;
19
+ export type SecurityErrorCode =
20
+ (typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
19
21
 
20
22
  export class SecurityError extends Error {
23
+ public code: SecurityErrorCode;
24
+
21
25
  constructor(
22
- public code: SecurityErrorCode,
26
+ code: SecurityErrorCode,
23
27
  message: string,
24
28
  ) {
25
29
  super(message);
30
+ this.code = code;
26
31
  this.name = "SecurityError";
27
32
  }
28
33
 
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.48.39",
22
+ currentVersion: "0.48.41",
23
23
  },
24
24
  });
25
25
 
@@ -357,7 +357,7 @@ export function createMCPServer(deps: {
357
357
  }) {
358
358
  const server = new McpServer({
359
359
  name: "SDK",
360
- version: "0.48.39",
360
+ version: "0.48.41",
361
361
  });
362
362
 
363
363
  const client = new SDKCore({
@@ -14,7 +14,7 @@ export const tool$budgetsApiKeyEvents: ToolDefinition<typeof args> = {
14
14
  name: "budgets-api-key-events",
15
15
  description: `List apikey budget events
16
16
 
17
- Returns recent threshold-alert and block events for the scope's budgets.`,
17
+ Returns recent threshold-alert and block events for the scope's budgets. Callable by cluster admins, or org admins for API keys in their own organization.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await budgetsApiKeyEvents(
@@ -14,7 +14,7 @@ export const tool$budgetsDeleteApiKey: ToolDefinition<typeof args> = {
14
14
  name: "budgets-delete-api-key",
15
15
  description: `Delete a apikey budget
16
16
 
17
- Removes the apikey's budget for the given owner; enforcement and alerts stop.`,
17
+ Removes the apikey's budget for the given owner; enforcement and alerts stop. Callable by cluster admins, or org admins for API keys in their own organization.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await budgetsDeleteApiKey(
@@ -14,7 +14,7 @@ export const tool$budgetsGetApiKey: ToolDefinition<typeof args> = {
14
14
  name: "budgets-get-api-key",
15
15
  description: `List apikey budgets
16
16
 
17
- Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge.`,
17
+ Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge. Callable by cluster admins, or org admins for API keys in their own organization.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await budgetsGetApiKey(
@@ -9,7 +9,7 @@ export const tool$budgetsList: ToolDefinition = {
9
9
  name: "budgets-list",
10
10
  description: `List budgets
11
11
 
12
- Cluster admins see all budgets; org admins see their org's budgets.`,
12
+ Cluster admins see all budgets; org admins see their org's budgets plus budgets on API keys in their org.`,
13
13
  tool: async (client, ctx) => {
14
14
  const [result, apiCall] = await budgetsList(
15
15
  client,
@@ -14,7 +14,7 @@ export const tool$budgetsSetApiKey: ToolDefinition<typeof args> = {
14
14
  name: "budgets-set-api-key",
15
15
  description: `Set a apikey budget
16
16
 
17
- Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend.`,
17
+ Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend. Callable by cluster admins, or org admins for API keys in their own organization.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await budgetsSetApiKey(
@@ -171,6 +171,11 @@ export type RateLimits = {
171
171
  queue?: Queue | undefined;
172
172
  };
173
173
 
174
+ export type Concurrency = {
175
+ max: number;
176
+ maxWaitMs?: number | undefined;
177
+ };
178
+
174
179
  export type DefaultParams = {
175
180
  temperature?: number | undefined;
176
181
  topP?: number | undefined;
@@ -276,6 +281,9 @@ export type AddRegistryModelRequest = {
276
281
  contextWindow?: number | undefined;
277
282
  rpm?: number | undefined;
278
283
  rateLimits?: Array<RateLimits> | undefined;
284
+ concurrency?: Concurrency | undefined;
285
+ requestTimeoutMs?: number | undefined;
286
+ maxRetries?: number | undefined;
279
287
  defaultParams?: DefaultParams | undefined;
280
288
  rerouteRules?: Array<RerouteRules> | undefined;
281
289
  hidden?: boolean | undefined;
@@ -1238,6 +1246,44 @@ export function rateLimitsFromJSON(
1238
1246
  );
1239
1247
  }
1240
1248
 
1249
+ /** @internal */
1250
+ export const Concurrency$inboundSchema: z.ZodType<
1251
+ Concurrency,
1252
+ z.ZodTypeDef,
1253
+ unknown
1254
+ > = z.object({
1255
+ max: z.number().int(),
1256
+ maxWaitMs: z.number().int().optional(),
1257
+ });
1258
+ /** @internal */
1259
+ export type Concurrency$Outbound = {
1260
+ max: number;
1261
+ maxWaitMs?: number | undefined;
1262
+ };
1263
+
1264
+ /** @internal */
1265
+ export const Concurrency$outboundSchema: z.ZodType<
1266
+ Concurrency$Outbound,
1267
+ z.ZodTypeDef,
1268
+ Concurrency
1269
+ > = z.object({
1270
+ max: z.number().int(),
1271
+ maxWaitMs: z.number().int().optional(),
1272
+ });
1273
+
1274
+ export function concurrencyToJSON(concurrency: Concurrency): string {
1275
+ return JSON.stringify(Concurrency$outboundSchema.parse(concurrency));
1276
+ }
1277
+ export function concurrencyFromJSON(
1278
+ jsonString: string,
1279
+ ): SafeParseResult<Concurrency, SDKValidationError> {
1280
+ return safeParse(
1281
+ jsonString,
1282
+ (x) => Concurrency$inboundSchema.parse(JSON.parse(x)),
1283
+ `Failed to parse 'Concurrency' from JSON`,
1284
+ );
1285
+ }
1286
+
1241
1287
  /** @internal */
1242
1288
  export const DefaultParams$inboundSchema: z.ZodType<
1243
1289
  DefaultParams,
@@ -1860,6 +1906,9 @@ export const AddRegistryModelRequest$inboundSchema: z.ZodType<
1860
1906
  contextWindow: z.number().int().optional(),
1861
1907
  rpm: z.number().int().optional(),
1862
1908
  rateLimits: z.array(z.lazy(() => RateLimits$inboundSchema)).optional(),
1909
+ concurrency: z.lazy(() => Concurrency$inboundSchema).optional(),
1910
+ requestTimeoutMs: z.number().int().optional(),
1911
+ maxRetries: z.number().int().optional(),
1863
1912
  defaultParams: z.lazy(() => DefaultParams$inboundSchema).optional(),
1864
1913
  rerouteRules: z.array(z.lazy(() => RerouteRules$inboundSchema)).optional(),
1865
1914
  hidden: z.boolean().optional(),
@@ -1885,6 +1934,9 @@ export type AddRegistryModelRequest$Outbound = {
1885
1934
  contextWindow?: number | undefined;
1886
1935
  rpm?: number | undefined;
1887
1936
  rateLimits?: Array<RateLimits$Outbound> | undefined;
1937
+ concurrency?: Concurrency$Outbound | undefined;
1938
+ requestTimeoutMs?: number | undefined;
1939
+ maxRetries?: number | undefined;
1888
1940
  defaultParams?: DefaultParams$Outbound | undefined;
1889
1941
  rerouteRules?: Array<RerouteRules$Outbound> | undefined;
1890
1942
  hidden?: boolean | undefined;
@@ -1920,6 +1972,9 @@ export const AddRegistryModelRequest$outboundSchema: z.ZodType<
1920
1972
  contextWindow: z.number().int().optional(),
1921
1973
  rpm: z.number().int().optional(),
1922
1974
  rateLimits: z.array(z.lazy(() => RateLimits$outboundSchema)).optional(),
1975
+ concurrency: z.lazy(() => Concurrency$outboundSchema).optional(),
1976
+ requestTimeoutMs: z.number().int().optional(),
1977
+ maxRetries: z.number().int().optional(),
1923
1978
  defaultParams: z.lazy(() => DefaultParams$outboundSchema).optional(),
1924
1979
  rerouteRules: z.array(z.lazy(() => RerouteRules$outboundSchema)).optional(),
1925
1980
  hidden: z.boolean().optional(),
@@ -186,6 +186,11 @@ export type UpdateRegistryModelRequestRateLimits = {
186
186
  queue?: RateLimitsQueue | undefined;
187
187
  };
188
188
 
189
+ export type UpdateRegistryModelRequestConcurrency = {
190
+ max: number;
191
+ maxWaitMs?: number | undefined;
192
+ };
193
+
189
194
  export type UpdateRegistryModelRequestDefaultParams = {
190
195
  temperature?: number | undefined;
191
196
  topP?: number | undefined;
@@ -310,6 +315,9 @@ export type UpdateRegistryModelRequest = {
310
315
  contextWindow?: number | null | undefined;
311
316
  rpm?: number | null | undefined;
312
317
  rateLimits?: Array<UpdateRegistryModelRequestRateLimits> | null | undefined;
318
+ concurrency?: UpdateRegistryModelRequestConcurrency | null | undefined;
319
+ requestTimeoutMs?: number | null | undefined;
320
+ maxRetries?: number | null | undefined;
313
321
  defaultParams?: UpdateRegistryModelRequestDefaultParams | null | undefined;
314
322
  rerouteRules?:
315
323
  | Array<UpdateRegistryModelRequestRerouteRules>
@@ -1452,6 +1460,51 @@ export function updateRegistryModelRequestRateLimitsFromJSON(
1452
1460
  );
1453
1461
  }
1454
1462
 
1463
+ /** @internal */
1464
+ export const UpdateRegistryModelRequestConcurrency$inboundSchema: z.ZodType<
1465
+ UpdateRegistryModelRequestConcurrency,
1466
+ z.ZodTypeDef,
1467
+ unknown
1468
+ > = z.object({
1469
+ max: z.number().int(),
1470
+ maxWaitMs: z.number().int().optional(),
1471
+ });
1472
+ /** @internal */
1473
+ export type UpdateRegistryModelRequestConcurrency$Outbound = {
1474
+ max: number;
1475
+ maxWaitMs?: number | undefined;
1476
+ };
1477
+
1478
+ /** @internal */
1479
+ export const UpdateRegistryModelRequestConcurrency$outboundSchema: z.ZodType<
1480
+ UpdateRegistryModelRequestConcurrency$Outbound,
1481
+ z.ZodTypeDef,
1482
+ UpdateRegistryModelRequestConcurrency
1483
+ > = z.object({
1484
+ max: z.number().int(),
1485
+ maxWaitMs: z.number().int().optional(),
1486
+ });
1487
+
1488
+ export function updateRegistryModelRequestConcurrencyToJSON(
1489
+ updateRegistryModelRequestConcurrency: UpdateRegistryModelRequestConcurrency,
1490
+ ): string {
1491
+ return JSON.stringify(
1492
+ UpdateRegistryModelRequestConcurrency$outboundSchema.parse(
1493
+ updateRegistryModelRequestConcurrency,
1494
+ ),
1495
+ );
1496
+ }
1497
+ export function updateRegistryModelRequestConcurrencyFromJSON(
1498
+ jsonString: string,
1499
+ ): SafeParseResult<UpdateRegistryModelRequestConcurrency, SDKValidationError> {
1500
+ return safeParse(
1501
+ jsonString,
1502
+ (x) =>
1503
+ UpdateRegistryModelRequestConcurrency$inboundSchema.parse(JSON.parse(x)),
1504
+ `Failed to parse 'UpdateRegistryModelRequestConcurrency' from JSON`,
1505
+ );
1506
+ }
1507
+
1455
1508
  /** @internal */
1456
1509
  export const UpdateRegistryModelRequestDefaultParams$inboundSchema: z.ZodType<
1457
1510
  UpdateRegistryModelRequestDefaultParams,
@@ -2202,6 +2255,11 @@ export const UpdateRegistryModelRequest$inboundSchema: z.ZodType<
2202
2255
  rateLimits: z.nullable(
2203
2256
  z.array(z.lazy(() => UpdateRegistryModelRequestRateLimits$inboundSchema)),
2204
2257
  ).optional(),
2258
+ concurrency: z.nullable(
2259
+ z.lazy(() => UpdateRegistryModelRequestConcurrency$inboundSchema),
2260
+ ).optional(),
2261
+ requestTimeoutMs: z.nullable(z.number().int()).optional(),
2262
+ maxRetries: z.nullable(z.number().int()).optional(),
2205
2263
  defaultParams: z.nullable(
2206
2264
  z.lazy(() => UpdateRegistryModelRequestDefaultParams$inboundSchema),
2207
2265
  ).optional(),
@@ -2242,6 +2300,12 @@ export type UpdateRegistryModelRequest$Outbound = {
2242
2300
  | Array<UpdateRegistryModelRequestRateLimits$Outbound>
2243
2301
  | null
2244
2302
  | undefined;
2303
+ concurrency?:
2304
+ | UpdateRegistryModelRequestConcurrency$Outbound
2305
+ | null
2306
+ | undefined;
2307
+ requestTimeoutMs?: number | null | undefined;
2308
+ maxRetries?: number | null | undefined;
2245
2309
  defaultParams?:
2246
2310
  | UpdateRegistryModelRequestDefaultParams$Outbound
2247
2311
  | null
@@ -2291,6 +2355,11 @@ export const UpdateRegistryModelRequest$outboundSchema: z.ZodType<
2291
2355
  rateLimits: z.nullable(
2292
2356
  z.array(z.lazy(() => UpdateRegistryModelRequestRateLimits$outboundSchema)),
2293
2357
  ).optional(),
2358
+ concurrency: z.nullable(
2359
+ z.lazy(() => UpdateRegistryModelRequestConcurrency$outboundSchema),
2360
+ ).optional(),
2361
+ requestTimeoutMs: z.nullable(z.number().int()).optional(),
2362
+ maxRetries: z.nullable(z.number().int()).optional(),
2294
2363
  defaultParams: z.nullable(
2295
2364
  z.lazy(() => UpdateRegistryModelRequestDefaultParams$outboundSchema),
2296
2365
  ).optional(),
@@ -67,6 +67,7 @@ export type GetApiKeyBudgetsData = {
67
67
  id: string;
68
68
  scope: GetApiKeyBudgetsScope;
69
69
  scopeId: string;
70
+ scopeOrgId: string | null;
70
71
  owner: GetApiKeyBudgetsOwner;
71
72
  period: GetApiKeyBudgetsPeriod;
72
73
  limit: number;
@@ -277,6 +278,7 @@ export const GetApiKeyBudgetsData$inboundSchema: z.ZodType<
277
278
  id: z.string(),
278
279
  scope: GetApiKeyBudgetsScope$inboundSchema,
279
280
  scope_id: z.string(),
281
+ scope_org_id: z.nullable(z.string()),
280
282
  owner: GetApiKeyBudgetsOwner$inboundSchema,
281
283
  period: GetApiKeyBudgetsPeriod$inboundSchema,
282
284
  limit: z.number(),
@@ -286,6 +288,7 @@ export const GetApiKeyBudgetsData$inboundSchema: z.ZodType<
286
288
  }).transform((v) => {
287
289
  return remap$(v, {
288
290
  "scope_id": "scopeId",
291
+ "scope_org_id": "scopeOrgId",
289
292
  "alert_webhook_url": "alertWebhookUrl",
290
293
  });
291
294
  });
@@ -294,6 +297,7 @@ export type GetApiKeyBudgetsData$Outbound = {
294
297
  id: string;
295
298
  scope: string;
296
299
  scope_id: string;
300
+ scope_org_id: string | null;
297
301
  owner: string;
298
302
  period: string;
299
303
  limit: number;
@@ -311,6 +315,7 @@ export const GetApiKeyBudgetsData$outboundSchema: z.ZodType<
311
315
  id: z.string(),
312
316
  scope: GetApiKeyBudgetsScope$outboundSchema,
313
317
  scopeId: z.string(),
318
+ scopeOrgId: z.nullable(z.string()),
314
319
  owner: GetApiKeyBudgetsOwner$outboundSchema,
315
320
  period: GetApiKeyBudgetsPeriod$outboundSchema,
316
321
  limit: z.number(),
@@ -320,6 +325,7 @@ export const GetApiKeyBudgetsData$outboundSchema: z.ZodType<
320
325
  }).transform((v) => {
321
326
  return remap$(v, {
322
327
  scopeId: "scope_id",
328
+ scopeOrgId: "scope_org_id",
323
329
  alertWebhookUrl: "alert_webhook_url",
324
330
  });
325
331
  });
@@ -67,6 +67,7 @@ export type GetOrgBudgetsData = {
67
67
  id: string;
68
68
  scope: GetOrgBudgetsScope;
69
69
  scopeId: string;
70
+ scopeOrgId: string | null;
70
71
  owner: GetOrgBudgetsOwner;
71
72
  period: GetOrgBudgetsPeriod;
72
73
  limit: number;
@@ -277,6 +278,7 @@ export const GetOrgBudgetsData$inboundSchema: z.ZodType<
277
278
  id: z.string(),
278
279
  scope: GetOrgBudgetsScope$inboundSchema,
279
280
  scope_id: z.string(),
281
+ scope_org_id: z.nullable(z.string()),
280
282
  owner: GetOrgBudgetsOwner$inboundSchema,
281
283
  period: GetOrgBudgetsPeriod$inboundSchema,
282
284
  limit: z.number(),
@@ -286,6 +288,7 @@ export const GetOrgBudgetsData$inboundSchema: z.ZodType<
286
288
  }).transform((v) => {
287
289
  return remap$(v, {
288
290
  "scope_id": "scopeId",
291
+ "scope_org_id": "scopeOrgId",
289
292
  "alert_webhook_url": "alertWebhookUrl",
290
293
  });
291
294
  });
@@ -294,6 +297,7 @@ export type GetOrgBudgetsData$Outbound = {
294
297
  id: string;
295
298
  scope: string;
296
299
  scope_id: string;
300
+ scope_org_id: string | null;
297
301
  owner: string;
298
302
  period: string;
299
303
  limit: number;
@@ -311,6 +315,7 @@ export const GetOrgBudgetsData$outboundSchema: z.ZodType<
311
315
  id: z.string(),
312
316
  scope: GetOrgBudgetsScope$outboundSchema,
313
317
  scopeId: z.string(),
318
+ scopeOrgId: z.nullable(z.string()),
314
319
  owner: GetOrgBudgetsOwner$outboundSchema,
315
320
  period: GetOrgBudgetsPeriod$outboundSchema,
316
321
  limit: z.number(),
@@ -320,6 +325,7 @@ export const GetOrgBudgetsData$outboundSchema: z.ZodType<
320
325
  }).transform((v) => {
321
326
  return remap$(v, {
322
327
  scopeId: "scope_id",
328
+ scopeOrgId: "scope_org_id",
323
329
  alertWebhookUrl: "alert_webhook_url",
324
330
  });
325
331
  });
@@ -63,6 +63,7 @@ export type ListBudgetsData = {
63
63
  id: string;
64
64
  scope: ListBudgetsScope;
65
65
  scopeId: string;
66
+ scopeOrgId: string | null;
66
67
  owner: ListBudgetsOwner;
67
68
  period: ListBudgetsPeriod;
68
69
  limit: number;
@@ -234,6 +235,7 @@ export const ListBudgetsData$inboundSchema: z.ZodType<
234
235
  id: z.string(),
235
236
  scope: ListBudgetsScope$inboundSchema,
236
237
  scope_id: z.string(),
238
+ scope_org_id: z.nullable(z.string()),
237
239
  owner: ListBudgetsOwner$inboundSchema,
238
240
  period: ListBudgetsPeriod$inboundSchema,
239
241
  limit: z.number(),
@@ -243,6 +245,7 @@ export const ListBudgetsData$inboundSchema: z.ZodType<
243
245
  }).transform((v) => {
244
246
  return remap$(v, {
245
247
  "scope_id": "scopeId",
248
+ "scope_org_id": "scopeOrgId",
246
249
  "alert_webhook_url": "alertWebhookUrl",
247
250
  });
248
251
  });
@@ -251,6 +254,7 @@ export type ListBudgetsData$Outbound = {
251
254
  id: string;
252
255
  scope: string;
253
256
  scope_id: string;
257
+ scope_org_id: string | null;
254
258
  owner: string;
255
259
  period: string;
256
260
  limit: number;
@@ -268,6 +272,7 @@ export const ListBudgetsData$outboundSchema: z.ZodType<
268
272
  id: z.string(),
269
273
  scope: ListBudgetsScope$outboundSchema,
270
274
  scopeId: z.string(),
275
+ scopeOrgId: z.nullable(z.string()),
271
276
  owner: ListBudgetsOwner$outboundSchema,
272
277
  period: ListBudgetsPeriod$outboundSchema,
273
278
  limit: z.number(),
@@ -277,6 +282,7 @@ export const ListBudgetsData$outboundSchema: z.ZodType<
277
282
  }).transform((v) => {
278
283
  return remap$(v, {
279
284
  scopeId: "scope_id",
285
+ scopeOrgId: "scope_org_id",
280
286
  alertWebhookUrl: "alert_webhook_url",
281
287
  });
282
288
  });
@@ -122,6 +122,7 @@ export type SetApiKeyBudgetResponseBody = {
122
122
  id: string;
123
123
  scope: SetApiKeyBudgetScope;
124
124
  scopeId: string;
125
+ scopeOrgId: string | null;
125
126
  owner: SetApiKeyBudgetBudgetsOwner;
126
127
  period: SetApiKeyBudgetBudgetsPeriod;
127
128
  limit: number;
@@ -470,6 +471,7 @@ export const SetApiKeyBudgetResponseBody$inboundSchema: z.ZodType<
470
471
  id: z.string(),
471
472
  scope: SetApiKeyBudgetScope$inboundSchema,
472
473
  scope_id: z.string(),
474
+ scope_org_id: z.nullable(z.string()),
473
475
  owner: SetApiKeyBudgetBudgetsOwner$inboundSchema,
474
476
  period: SetApiKeyBudgetBudgetsPeriod$inboundSchema,
475
477
  limit: z.number(),
@@ -481,6 +483,7 @@ export const SetApiKeyBudgetResponseBody$inboundSchema: z.ZodType<
481
483
  }).transform((v) => {
482
484
  return remap$(v, {
483
485
  "scope_id": "scopeId",
486
+ "scope_org_id": "scopeOrgId",
484
487
  "alert_webhook_url": "alertWebhookUrl",
485
488
  });
486
489
  });
@@ -489,6 +492,7 @@ export type SetApiKeyBudgetResponseBody$Outbound = {
489
492
  id: string;
490
493
  scope: string;
491
494
  scope_id: string;
495
+ scope_org_id: string | null;
492
496
  owner: string;
493
497
  period: string;
494
498
  limit: number;
@@ -506,6 +510,7 @@ export const SetApiKeyBudgetResponseBody$outboundSchema: z.ZodType<
506
510
  id: z.string(),
507
511
  scope: SetApiKeyBudgetScope$outboundSchema,
508
512
  scopeId: z.string(),
513
+ scopeOrgId: z.nullable(z.string()),
509
514
  owner: SetApiKeyBudgetBudgetsOwner$outboundSchema,
510
515
  period: SetApiKeyBudgetBudgetsPeriod$outboundSchema,
511
516
  limit: z.number(),
@@ -517,6 +522,7 @@ export const SetApiKeyBudgetResponseBody$outboundSchema: z.ZodType<
517
522
  }).transform((v) => {
518
523
  return remap$(v, {
519
524
  scopeId: "scope_id",
525
+ scopeOrgId: "scope_org_id",
520
526
  alertWebhookUrl: "alert_webhook_url",
521
527
  });
522
528
  });
@@ -116,6 +116,7 @@ export type SetOrgBudgetResponseBody = {
116
116
  id: string;
117
117
  scope: Scope;
118
118
  scopeId: string;
119
+ scopeOrgId: string | null;
119
120
  owner: SetOrgBudgetOwner;
120
121
  period: SetOrgBudgetPeriod;
121
122
  limit: number;
@@ -445,6 +446,7 @@ export const SetOrgBudgetResponseBody$inboundSchema: z.ZodType<
445
446
  id: z.string(),
446
447
  scope: Scope$inboundSchema,
447
448
  scope_id: z.string(),
449
+ scope_org_id: z.nullable(z.string()),
448
450
  owner: SetOrgBudgetOwner$inboundSchema,
449
451
  period: SetOrgBudgetPeriod$inboundSchema,
450
452
  limit: z.number(),
@@ -454,6 +456,7 @@ export const SetOrgBudgetResponseBody$inboundSchema: z.ZodType<
454
456
  }).transform((v) => {
455
457
  return remap$(v, {
456
458
  "scope_id": "scopeId",
459
+ "scope_org_id": "scopeOrgId",
457
460
  "alert_webhook_url": "alertWebhookUrl",
458
461
  });
459
462
  });
@@ -462,6 +465,7 @@ export type SetOrgBudgetResponseBody$Outbound = {
462
465
  id: string;
463
466
  scope: string;
464
467
  scope_id: string;
468
+ scope_org_id: string | null;
465
469
  owner: string;
466
470
  period: string;
467
471
  limit: number;
@@ -479,6 +483,7 @@ export const SetOrgBudgetResponseBody$outboundSchema: z.ZodType<
479
483
  id: z.string(),
480
484
  scope: Scope$outboundSchema,
481
485
  scopeId: z.string(),
486
+ scopeOrgId: z.nullable(z.string()),
482
487
  owner: SetOrgBudgetOwner$outboundSchema,
483
488
  period: SetOrgBudgetPeriod$outboundSchema,
484
489
  limit: z.number(),
@@ -488,6 +493,7 @@ export const SetOrgBudgetResponseBody$outboundSchema: z.ZodType<
488
493
  }).transform((v) => {
489
494
  return remap$(v, {
490
495
  scopeId: "scope_id",
496
+ scopeOrgId: "scope_org_id",
491
497
  alertWebhookUrl: "alert_webhook_url",
492
498
  });
493
499
  });
@@ -54,7 +54,7 @@ export type BudgetsApiKeyEventsQueryError =
54
54
  * List apikey budget events
55
55
  *
56
56
  * @remarks
57
- * Returns recent threshold-alert and block events for the scope's budgets.
57
+ * Returns recent threshold-alert and block events for the scope's budgets. Callable by cluster admins, or org admins for API keys in their own organization.
58
58
  */
59
59
  export function useBudgetsApiKeyEvents(
60
60
  request: operations.ListApiKeyBudgetEventsRequest,
@@ -78,7 +78,7 @@ export function useBudgetsApiKeyEvents(
78
78
  * List apikey budget events
79
79
  *
80
80
  * @remarks
81
- * Returns recent threshold-alert and block events for the scope's budgets.
81
+ * Returns recent threshold-alert and block events for the scope's budgets. Callable by cluster admins, or org admins for API keys in their own organization.
82
82
  */
83
83
  export function useBudgetsApiKeyEventsSuspense(
84
84
  request: operations.ListApiKeyBudgetEventsRequest,
@@ -48,7 +48,7 @@ export type BudgetsDeleteApiKeyMutationError =
48
48
  * Delete a apikey budget
49
49
  *
50
50
  * @remarks
51
- * Removes the apikey's budget for the given owner; enforcement and alerts stop.
51
+ * Removes the apikey's budget for the given owner; enforcement and alerts stop. Callable by cluster admins, or org admins for API keys in their own organization.
52
52
  */
53
53
  export function useBudgetsDeleteApiKeyMutation(
54
54
  options?: MutationHookOptions<
@@ -54,7 +54,7 @@ export type BudgetsGetApiKeyQueryError =
54
54
  * List apikey budgets
55
55
  *
56
56
  * @remarks
57
- * Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge.
57
+ * Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge. Callable by cluster admins, or org admins for API keys in their own organization.
58
58
  */
59
59
  export function useBudgetsGetApiKey(
60
60
  request: operations.GetApiKeyBudgetsRequest,
@@ -78,7 +78,7 @@ export function useBudgetsGetApiKey(
78
78
  * List apikey budgets
79
79
  *
80
80
  * @remarks
81
- * Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge.
81
+ * Returns the apikey's budgets (self-budget and/or ceiling) with each one's live spend gauge. Callable by cluster admins, or org admins for API keys in their own organization.
82
82
  */
83
83
  export function useBudgetsGetApiKeySuspense(
84
84
  request: operations.GetApiKeyBudgetsRequest,
@@ -49,7 +49,7 @@ export type BudgetsListQueryError =
49
49
  * List budgets
50
50
  *
51
51
  * @remarks
52
- * Cluster admins see all budgets; org admins see their org's budgets.
52
+ * Cluster admins see all budgets; org admins see their org's budgets plus budgets on API keys in their org.
53
53
  */
54
54
  export function useBudgetsList(
55
55
  options?: QueryHookOptions<BudgetsListQueryData, BudgetsListQueryError>,
@@ -68,7 +68,7 @@ export function useBudgetsList(
68
68
  * List budgets
69
69
  *
70
70
  * @remarks
71
- * Cluster admins see all budgets; org admins see their org's budgets.
71
+ * Cluster admins see all budgets; org admins see their org's budgets plus budgets on API keys in their org.
72
72
  */
73
73
  export function useBudgetsListSuspense(
74
74
  options?: SuspenseQueryHookOptions<
@@ -48,7 +48,7 @@ export type BudgetsSetApiKeyMutationError =
48
48
  * Set a apikey budget
49
49
  *
50
50
  * @remarks
51
- * Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend.
51
+ * Creates or updates a budget for the apikey. One budget per (scope, owner); editing re-evaluates against live spend. Callable by cluster admins, or org admins for API keys in their own organization.
52
52
  */
53
53
  export function useBudgetsSetApiKeyMutation(
54
54
  options?: MutationHookOptions<