@openrouter/sdk 1.5.110 → 1.5.112

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.
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
49
49
  export declare const SDK_METADATA: {
50
50
  readonly language: "typescript";
51
51
  readonly openapiDocVersion: "1.0.0";
52
- readonly sdkVersion: "1.5.110";
52
+ readonly sdkVersion: "1.5.112";
53
53
  readonly genVersion: "2.960.8";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.5.110 2.960.8 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.112 2.960.8 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "1.5.110",
28
+ sdkVersion: "1.5.112",
29
29
  genVersion: "2.960.8",
30
- userAgent: "speakeasy-sdk/typescript 1.5.110 2.960.8 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 1.5.112 2.960.8 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -779,6 +779,7 @@ export * from "./responsehealingplugin.js";
779
779
  export * from "./responseincludesenum.js";
780
780
  export * from "./responseoutputtext.js";
781
781
  export * from "./responsesbadrequestresponseerrordata.js";
782
+ export * from "./responsesinputtransformation.js";
782
783
  export * from "./responsesrequest.js";
783
784
  export * from "./responsesstreamingresponse.js";
784
785
  export * from "./routerattempt.js";
@@ -782,6 +782,7 @@ export * from "./responsehealingplugin.js";
782
782
  export * from "./responseincludesenum.js";
783
783
  export * from "./responseoutputtext.js";
784
784
  export * from "./responsesbadrequestresponseerrordata.js";
785
+ export * from "./responsesinputtransformation.js";
785
786
  export * from "./responsesrequest.js";
786
787
  export * from "./responsesstreamingresponse.js";
787
788
  export * from "./routerattempt.js";
@@ -28,6 +28,7 @@ import { OutputItems } from "./outputitems.js";
28
28
  import { Preview20250311WebSearchServerTool } from "./preview20250311websearchservertool.js";
29
29
  import { PreviewWebSearchServerTool } from "./previewwebsearchservertool.js";
30
30
  import { PromptCacheOptions } from "./promptcacheoptions.js";
31
+ import { ResponsesInputTransformation } from "./responsesinputtransformation.js";
31
32
  import { ServerToolUseDetails } from "./servertoolusedetails.js";
32
33
  import { ShellServerTool } from "./shellservertool.js";
33
34
  import { StoredPromptTemplate } from "./storedprompttemplate.js";
@@ -244,6 +245,10 @@ export type OpenResponsesResult = {
244
245
  * Canonical OpenRouter error type, stable across all API formats
245
246
  */
246
247
  errorType?: ApiErrorType | undefined;
248
+ /**
249
+ * Input items the upstream provider changed before inference (OpenAI `input_transformations`). Present only when the provider reported the field; empty when it changed nothing.
250
+ */
251
+ inputTransformations?: Array<ResponsesInputTransformation> | undefined;
247
252
  openrouterMetadata?: OpenRouterMetadata | undefined;
248
253
  /**
249
254
  * OpenRouter Armor's verdict for each client tool call of this response, present whenever Armor evaluated the response (even when nothing was flagged). Independent of the `openrouter_metadata` opt-in.
@@ -31,6 +31,7 @@ import { OutputItems$inboundSchema } from "./outputitems.js";
31
31
  import { Preview20250311WebSearchServerTool$inboundSchema, } from "./preview20250311websearchservertool.js";
32
32
  import { PreviewWebSearchServerTool$inboundSchema, } from "./previewwebsearchservertool.js";
33
33
  import { PromptCacheOptions$inboundSchema, } from "./promptcacheoptions.js";
34
+ import { ResponsesInputTransformation$inboundSchema, } from "./responsesinputtransformation.js";
34
35
  import { ServerToolUseDetails$inboundSchema, } from "./servertoolusedetails.js";
35
36
  import { ShellServerTool$inboundSchema, } from "./shellservertool.js";
36
37
  import { StoredPromptTemplate$inboundSchema, } from "./storedprompttemplate.js";
@@ -230,6 +231,8 @@ export const OpenResponsesResult$inboundSchema = z.object({
230
231
  access_programs: z.nullable(z.lazy(() => OpenResponsesResultAccessPrograms$inboundSchema)).optional(),
231
232
  alignment: Alignment$inboundSchema.optional(),
232
233
  error_type: ApiErrorType$inboundSchema.optional(),
234
+ input_transformations: z.array(ResponsesInputTransformation$inboundSchema)
235
+ .optional(),
233
236
  openrouter_metadata: OpenRouterMetadata$inboundSchema.optional(),
234
237
  safeguard_results: z.array(ArmorSafeguardResult$inboundSchema).optional(),
235
238
  }).transform((v) => {
@@ -253,6 +256,7 @@ export const OpenResponsesResult$inboundSchema = z.object({
253
256
  "top_p": "topP",
254
257
  "access_programs": "accessPrograms",
255
258
  "error_type": "errorType",
259
+ "input_transformations": "inputTransformations",
256
260
  "openrouter_metadata": "openrouterMetadata",
257
261
  "safeguard_results": "safeguardResults",
258
262
  });
@@ -8,7 +8,7 @@ export declare const ReasoningFormat: {
8
8
  readonly BedrockXaiResponsesV1: "bedrock-xai-responses-v1";
9
9
  readonly XaiResponsesV1: "xai-responses-v1";
10
10
  readonly MetaResponsesV1: "meta-responses-v1";
11
- readonly GoogleVertexResponsesV1: "google-vertex-responses-v1";
11
+ readonly GoogleVertexMetaResponsesV1: "google-vertex-meta-responses-v1";
12
12
  readonly OpenrouterStealthV1: "openrouter-stealth-v1";
13
13
  readonly AnthropicClaudeV1: "anthropic-claude-v1";
14
14
  readonly GoogleGeminiV1: "google-gemini-v1";
@@ -10,7 +10,7 @@ export const ReasoningFormat = {
10
10
  BedrockXaiResponsesV1: "bedrock-xai-responses-v1",
11
11
  XaiResponsesV1: "xai-responses-v1",
12
12
  MetaResponsesV1: "meta-responses-v1",
13
- GoogleVertexResponsesV1: "google-vertex-responses-v1",
13
+ GoogleVertexMetaResponsesV1: "google-vertex-meta-responses-v1",
14
14
  OpenrouterStealthV1: "openrouter-stealth-v1",
15
15
  AnthropicClaudeV1: "anthropic-claude-v1",
16
16
  GoogleGeminiV1: "google-gemini-v1",
@@ -0,0 +1,16 @@
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
+ * One input item the upstream provider changed before inference, e.g. a replayed reasoning item removed because the conversation before it was edited.
6
+ */
7
+ export type ResponsesInputTransformation = {
8
+ action: string;
9
+ id: string;
10
+ reason: string;
11
+ type: string;
12
+ };
13
+ /** @internal */
14
+ export declare const ResponsesInputTransformation$inboundSchema: z.ZodType<ResponsesInputTransformation, unknown>;
15
+ export declare function responsesInputTransformationFromJSON(jsonString: string): SafeParseResult<ResponsesInputTransformation, SDKValidationError>;
16
+ //# sourceMappingURL=responsesinputtransformation.d.ts.map
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4";
5
+ import { safeParse } from "../lib/schemas.js";
6
+ /** @internal */
7
+ export const ResponsesInputTransformation$inboundSchema = z.object({
8
+ action: z.string(),
9
+ id: z.string(),
10
+ reason: z.string(),
11
+ type: z.string(),
12
+ });
13
+ export function responsesInputTransformationFromJSON(jsonString) {
14
+ return safeParse(jsonString, (x) => ResponsesInputTransformation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponsesInputTransformation' from JSON`);
15
+ }
16
+ //# sourceMappingURL=responsesinputtransformation.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.110",
5
+ "version": "1.5.112",
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.110",
3
+ "version": "1.5.112",
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
76
77
  "prepare": "npm run build",
78
+ "test:watch": "vitest --watch --project unit",
79
+ "typecheck:transit": "exit 0",
80
+ "postinstall": "node scripts/check-types.js || true",
77
81
  "test": "vitest --run --project unit",
78
82
  "test:e2e": "vitest --run --project e2e",
79
83
  "test:transit": "exit 0",
80
- "test:watch": "vitest --watch --project unit",
81
- "typecheck": "tsc --noEmit",
82
- "typecheck:transit": "exit 0",
83
- "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
84
- "postinstall": "node scripts/check-types.js || true"
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {
87
87