@openrouter/sdk 1.5.96 → 1.5.98

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.
@@ -20,11 +20,11 @@ export declare function responsesSend(client: OpenRouterCore, request: operation
20
20
  responsesRequest: {
21
21
  stream?: false;
22
22
  };
23
- }, options?: RequestOptions): APIPromise<Result<models.OpenResponsesResult, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
23
+ }, options?: RequestOptions): APIPromise<Result<models.OpenResponsesResult, errors.ResponsesBadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
24
24
  export declare function responsesSend(client: OpenRouterCore, request: operations.CreateResponsesRequest & {
25
25
  responsesRequest: {
26
26
  stream: true;
27
27
  };
28
- }, options?: RequestOptions): APIPromise<Result<EventStream<models.StreamEvents>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
29
- export declare function responsesSend(client: OpenRouterCore, request: operations.CreateResponsesRequest, options?: RequestOptions): APIPromise<Result<operations.CreateResponsesResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
28
+ }, options?: RequestOptions): APIPromise<Result<EventStream<models.StreamEvents>, errors.ResponsesBadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
29
+ export declare function responsesSend(client: OpenRouterCore, request: operations.CreateResponsesRequest, options?: RequestOptions): APIPromise<Result<operations.CreateResponsesResponse, errors.ResponsesBadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
30
30
  //# sourceMappingURL=responsesSend.d.ts.map
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
9
9
  import { safeParse } from "../lib/schemas.js";
10
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
11
  import { pathToFunc } from "../lib/url.js";
12
- import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
12
+ import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { EdgeNetworkTimeoutResponseError$inboundSchema as errors_EdgeNetworkTimeoutResponseError$inboundSchema } from "../models/errors/edgenetworktimeoutresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ProviderOverloadedResponseError$inboundSchema as errors_ProviderOverloadedResponseError$inboundSchema } from "../models/errors/provideroverloadedresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ResponsesBadRequestResponseError$inboundSchema as errors_ResponsesBadRequestResponseError$inboundSchema } from "../models/errors/responsesbadrequestresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js"; import { UnprocessableEntityResponseError$inboundSchema as errors_UnprocessableEntityResponseError$inboundSchema } from "../models/errors/unprocessableentityresponseerror.js";
13
13
  import { CreateResponsesRequest$outboundSchema as operations_CreateResponsesRequest$outboundSchema, CreateResponsesResponse$inboundSchema as operations_CreateResponsesResponse$inboundSchema } from "../models/operations/createresponses.js";
14
14
  import { APIPromise } from "../types/async.js";
15
15
  export function responsesSend(client, request, options) {
@@ -85,7 +85,7 @@ async function $do(client, request, options) {
85
85
  const responseFields = {
86
86
  HttpMeta: { Response: response, Request: req },
87
87
  };
88
- const [result] = await M.match(M.json(200, operations_CreateResponsesResponse$inboundSchema), M.sse(200, operations_CreateResponsesResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(422, errors_UnprocessableEntityResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
88
+ const [result] = await M.match(M.json(200, operations_CreateResponsesResponse$inboundSchema), M.sse(200, operations_CreateResponsesResponse$inboundSchema), M.jsonErr(400, errors_ResponsesBadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(422, errors_UnprocessableEntityResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(524, errors_EdgeNetworkTimeoutResponseError$inboundSchema), M.jsonErr(529, errors_ProviderOverloadedResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
89
89
  if (!result.ok) {
90
90
  return [result, { status: "complete", request: req, response }];
91
91
  }
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
50
50
  export declare const SDK_METADATA: {
51
51
  readonly language: "typescript";
52
52
  readonly openapiDocVersion: "1.0.0";
53
- readonly sdkVersion: "1.5.96";
53
+ readonly sdkVersion: "1.5.98";
54
54
  readonly genVersion: "2.960.8";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.96 2.960.8 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.98 2.960.8 1.0.0 @openrouter/sdk";
56
56
  };
57
57
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
29
29
  export const SDK_METADATA = {
30
30
  language: "typescript",
31
31
  openapiDocVersion: "1.0.0",
32
- sdkVersion: "1.5.96",
32
+ sdkVersion: "1.5.98",
33
33
  genVersion: "2.960.8",
34
- userAgent: "speakeasy-sdk/typescript 1.5.96 2.960.8 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.98 2.960.8 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -20,6 +20,7 @@ export * from "./payloadtoolargeresponseerror.js";
20
20
  export * from "./paymentrequiredresponseerror.js";
21
21
  export * from "./provideroverloadedresponseerror.js";
22
22
  export * from "./requesttimeoutresponseerror.js";
23
+ export * from "./responsesbadrequestresponseerror.js";
23
24
  export * from "./responsevalidationerror.js";
24
25
  export * from "./sdkvalidationerror.js";
25
26
  export * from "./serviceunavailableresponseerror.js";
@@ -24,6 +24,7 @@ export * from "./payloadtoolargeresponseerror.js";
24
24
  export * from "./paymentrequiredresponseerror.js";
25
25
  export * from "./provideroverloadedresponseerror.js";
26
26
  export * from "./requesttimeoutresponseerror.js";
27
+ export * from "./responsesbadrequestresponseerror.js";
27
28
  export * from "./responsevalidationerror.js";
28
29
  export * from "./sdkvalidationerror.js";
29
30
  export * from "./serviceunavailableresponseerror.js";
@@ -0,0 +1,51 @@
1
+ import * as z from "zod/v4";
2
+ import * as models from "../index.js";
3
+ import { OpenRouterError } from "./openroutererror.js";
4
+ /**
5
+ * Bad Request - Invalid request parameters or malformed input. Request-shape validation failures carry a Responses API string code (e.g. `invalid_prompt`) with details in the top-level `metadata`; all other failures carry the integer HTTP status.
6
+ */
7
+ export type ResponsesBadRequestResponseErrorData = {
8
+ /**
9
+ * Error data for ResponsesBadRequestResponse
10
+ */
11
+ error: models.ResponsesBadRequestResponseErrorData;
12
+ /**
13
+ * Validation details for string-coded errors; `raw` holds the serialized schema issues
14
+ */
15
+ metadata?: {
16
+ [k: string]: string;
17
+ } | null | undefined;
18
+ openrouterMetadata?: {
19
+ [k: string]: any;
20
+ } | null | undefined;
21
+ userId?: string | null | undefined;
22
+ };
23
+ /**
24
+ * Bad Request - Invalid request parameters or malformed input. Request-shape validation failures carry a Responses API string code (e.g. `invalid_prompt`) with details in the top-level `metadata`; all other failures carry the integer HTTP status.
25
+ */
26
+ export declare class ResponsesBadRequestResponseError extends OpenRouterError {
27
+ /**
28
+ * Error data for ResponsesBadRequestResponse
29
+ */
30
+ error: models.ResponsesBadRequestResponseErrorData;
31
+ /**
32
+ * Validation details for string-coded errors; `raw` holds the serialized schema issues
33
+ */
34
+ metadata?: {
35
+ [k: string]: string;
36
+ } | null | undefined;
37
+ openrouterMetadata?: {
38
+ [k: string]: any;
39
+ } | null | undefined;
40
+ userId?: string | null | undefined;
41
+ /** The original data that was passed to this error instance. */
42
+ data$: ResponsesBadRequestResponseErrorData;
43
+ constructor(err: ResponsesBadRequestResponseErrorData, httpMeta: {
44
+ response: Response;
45
+ request: Request;
46
+ body: string;
47
+ });
48
+ }
49
+ /** @internal */
50
+ export declare const ResponsesBadRequestResponseError$inboundSchema: z.ZodType<ResponsesBadRequestResponseError, unknown>;
51
+ //# sourceMappingURL=responsesbadrequestresponseerror.d.ts.map
@@ -0,0 +1,50 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 0404d3d94803
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ResponsesBadRequestResponseErrorData$inboundSchema as models_ResponsesBadRequestResponseErrorData$inboundSchema } from "../responsesbadrequestresponseerrordata.js";
8
+ import { OpenRouterError } from "./openroutererror.js";
9
+ /**
10
+ * Bad Request - Invalid request parameters or malformed input. Request-shape validation failures carry a Responses API string code (e.g. `invalid_prompt`) with details in the top-level `metadata`; all other failures carry the integer HTTP status.
11
+ */
12
+ export class ResponsesBadRequestResponseError extends OpenRouterError {
13
+ constructor(err, httpMeta) {
14
+ const message = err.error?.message
15
+ || `API error occurred: ${JSON.stringify(err)}`;
16
+ super(message, httpMeta);
17
+ this.data$ = err;
18
+ this.error = err.error;
19
+ if (err.metadata != null)
20
+ this.metadata = err.metadata;
21
+ if (err.openrouterMetadata != null) {
22
+ this.openrouterMetadata = err.openrouterMetadata;
23
+ }
24
+ if (err.userId != null)
25
+ this.userId = err.userId;
26
+ this.name = "ResponsesBadRequestResponseError";
27
+ }
28
+ }
29
+ /** @internal */
30
+ export const ResponsesBadRequestResponseError$inboundSchema = z.object({
31
+ error: models_ResponsesBadRequestResponseErrorData$inboundSchema,
32
+ metadata: z.nullable(z.record(z.string(), z.string())).optional(),
33
+ openrouter_metadata: z.nullable(z.record(z.string(), z.any())).optional(),
34
+ user_id: z.nullable(z.string()).optional(),
35
+ request$: z.custom(x => x instanceof Request),
36
+ response$: z.custom(x => x instanceof Response),
37
+ body$: z.string(),
38
+ })
39
+ .transform((v) => {
40
+ const remapped = remap$(v, {
41
+ "openrouter_metadata": "openrouterMetadata",
42
+ "user_id": "userId",
43
+ });
44
+ return new ResponsesBadRequestResponseError(remapped, {
45
+ request: v.request$,
46
+ response: v.response$,
47
+ body: v.body$,
48
+ });
49
+ });
50
+ //# sourceMappingURL=responsesbadrequestresponseerror.js.map
@@ -771,6 +771,7 @@ export * from "./rerank.js";
771
771
  export * from "./responsehealingplugin.js";
772
772
  export * from "./responseincludesenum.js";
773
773
  export * from "./responseoutputtext.js";
774
+ export * from "./responsesbadrequestresponseerrordata.js";
774
775
  export * from "./responsesrequest.js";
775
776
  export * from "./responsesstreamingresponse.js";
776
777
  export * from "./routerattempt.js";
@@ -775,6 +775,7 @@ export * from "./rerank.js";
775
775
  export * from "./responsehealingplugin.js";
776
776
  export * from "./responseincludesenum.js";
777
777
  export * from "./responseoutputtext.js";
778
+ export * from "./responsesbadrequestresponseerrordata.js";
778
779
  export * from "./responsesrequest.js";
779
780
  export * from "./responsesstreamingresponse.js";
780
781
  export * from "./routerattempt.js";
@@ -11,6 +11,14 @@ export type ObservabilityOtelCollectorDestinationConfig = {
11
11
  headers?: {
12
12
  [k: string]: string;
13
13
  } | undefined;
14
+ /**
15
+ * OTLP/HTTP metrics URL. Required when `shouldSendMetrics` (Send OTLP metrics) is true; ignored otherwise.
16
+ */
17
+ metricsEndpoint?: string | undefined;
18
+ /**
19
+ * Also send OTLP metrics for each delivered generation to the metrics endpoint, with the same headers.
20
+ */
21
+ shouldSendMetrics: boolean;
14
22
  };
15
23
  export type ObservabilityOtelCollectorDestination = {
16
24
  /**
@@ -11,6 +11,8 @@ import { ObservabilityFilterRulesConfig$inboundSchema, } from "./observabilityfi
11
11
  export const ObservabilityOtelCollectorDestinationConfig$inboundSchema = z.object({
12
12
  endpoint: z.string(),
13
13
  headers: z.record(z.string(), z.string()).optional(),
14
+ metricsEndpoint: z.string().optional(),
15
+ shouldSendMetrics: z.boolean().default(false),
14
16
  });
15
17
  export function observabilityOtelCollectorDestinationConfigFromJSON(jsonString) {
16
18
  return safeParse(jsonString, (x) => ObservabilityOtelCollectorDestinationConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ObservabilityOtelCollectorDestinationConfig' from JSON`);
@@ -44,6 +44,10 @@ export type OutputToolSearchServerToolItem = {
44
44
  * The deferred-tool index the router showed the model with a pre-search, listing tool sources and names. Replaying the item shows the same index.
45
45
  */
46
46
  catalogIndex?: string | undefined;
47
+ /**
48
+ * Whether the model read, after the catalog index, that the listed sources are those connected so far. Replaying the item shows that note only when this is true. Its wording follows the replaying request: it names `WaitForMcpServers` only while that request carries the tool.
49
+ */
50
+ catalogIndexNote?: boolean | undefined;
47
51
  /**
48
52
  * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
49
53
  */
@@ -102,6 +106,7 @@ export type OutputToolSearchServerToolItem$Outbound = {
102
106
  call_id?: string | undefined;
103
107
  catalog_changes?: string | undefined;
104
108
  catalog_index?: string | undefined;
109
+ catalog_index_note?: boolean | undefined;
105
110
  error?: string | undefined;
106
111
  format?: string | undefined;
107
112
  hint?: string | undefined;
@@ -57,6 +57,7 @@ export const OutputToolSearchServerToolItem$inboundSchema = z.object({
57
57
  call_id: z.string().optional(),
58
58
  catalog_changes: z.string().optional(),
59
59
  catalog_index: z.string().optional(),
60
+ catalog_index_note: z.boolean().optional(),
60
61
  error: z.string().optional(),
61
62
  format: OutputToolSearchServerToolItemFormat$inboundSchema.optional(),
62
63
  hint: z.string().optional(),
@@ -72,6 +73,7 @@ export const OutputToolSearchServerToolItem$inboundSchema = z.object({
72
73
  "call_id": "callId",
73
74
  "catalog_changes": "catalogChanges",
74
75
  "catalog_index": "catalogIndex",
76
+ "catalog_index_note": "catalogIndexNote",
75
77
  "turn_call_ids": "turnCallIds",
76
78
  });
77
79
  });
@@ -81,6 +83,7 @@ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
81
83
  callId: z.string().optional(),
82
84
  catalogChanges: z.string().optional(),
83
85
  catalogIndex: z.string().optional(),
86
+ catalogIndexNote: z.boolean().optional(),
84
87
  error: z.string().optional(),
85
88
  format: OutputToolSearchServerToolItemFormat$outboundSchema.optional(),
86
89
  hint: z.string().optional(),
@@ -96,6 +99,7 @@ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
96
99
  callId: "call_id",
97
100
  catalogChanges: "catalog_changes",
98
101
  catalogIndex: "catalog_index",
102
+ catalogIndexNote: "catalog_index_note",
99
103
  turnCallIds: "turn_call_ids",
100
104
  });
101
105
  });
@@ -0,0 +1,27 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ /**
5
+ * Integer HTTP status, or a Responses API error code string (e.g. `invalid_prompt`) when the request body fails validation
6
+ */
7
+ export type Code = number | string;
8
+ /**
9
+ * Error data for ResponsesBadRequestResponse
10
+ */
11
+ export type ResponsesBadRequestResponseErrorData = {
12
+ /**
13
+ * Integer HTTP status, or a Responses API error code string (e.g. `invalid_prompt`) when the request body fails validation
14
+ */
15
+ code: number | string;
16
+ message: string;
17
+ metadata?: {
18
+ [k: string]: any;
19
+ } | null | undefined;
20
+ };
21
+ /** @internal */
22
+ export declare const Code$inboundSchema: z.ZodType<Code, unknown>;
23
+ export declare function codeFromJSON(jsonString: string): SafeParseResult<Code, SDKValidationError>;
24
+ /** @internal */
25
+ export declare const ResponsesBadRequestResponseErrorData$inboundSchema: z.ZodType<ResponsesBadRequestResponseErrorData, unknown>;
26
+ export declare function responsesBadRequestResponseErrorDataFromJSON(jsonString: string): SafeParseResult<ResponsesBadRequestResponseErrorData, SDKValidationError>;
27
+ //# sourceMappingURL=responsesbadrequestresponseerrordata.d.ts.map
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 24e206b34a71
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const Code$inboundSchema = z.union([
9
+ z.int(),
10
+ z.string(),
11
+ ]);
12
+ export function codeFromJSON(jsonString) {
13
+ return safeParse(jsonString, (x) => Code$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Code' from JSON`);
14
+ }
15
+ /** @internal */
16
+ export const ResponsesBadRequestResponseErrorData$inboundSchema = z.object({
17
+ code: z.union([z.int(), z.string()]),
18
+ message: z.string(),
19
+ metadata: z.nullable(z.record(z.string(), z.any())).optional(),
20
+ });
21
+ export function responsesBadRequestResponseErrorDataFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => ResponsesBadRequestResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesBadRequestResponseErrorData' from JSON`);
23
+ }
24
+ //# sourceMappingURL=responsesbadrequestresponseerrordata.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.96",
5
+ "version": "1.5.98",
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": "1.5.96",
3
+ "version": "1.5.98",
4
4
  "author": "OpenRouter",
5
5
  "description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 400+ language models through a unified API.",
6
6
  "keywords": [
@@ -73,15 +73,15 @@
73
73
  "lint": "eslint --cache --max-warnings=0 src",
74
74
  "build": "tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "test": "vitest --run --project unit",
77
- "compile": "tsc && node scripts/unbarrel-imports.js",
76
+ "postinstall": "node scripts/check-types.js || true",
78
77
  "test:e2e": "vitest --run --project e2e",
78
+ "typecheck": "tsc --noEmit",
79
+ "compile": "tsc && node scripts/unbarrel-imports.js",
80
+ "prepare": "npm run build",
81
+ "test": "vitest --run --project unit",
79
82
  "test:transit": "exit 0",
80
83
  "test:watch": "vitest --watch --project unit",
81
- "typecheck": "tsc --noEmit",
82
- "typecheck:transit": "exit 0",
83
- "postinstall": "node scripts/check-types.js || true",
84
- "prepare": "npm run build"
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87