@openrouter/sdk 1.5.15 → 1.5.16

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.
@@ -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.15";
53
+ readonly sdkVersion: "1.5.16";
54
54
  readonly genVersion: "2.948.4";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.15 2.948.4 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.16 2.948.4 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.15",
32
+ sdkVersion: "1.5.16",
33
33
  genVersion: "2.948.4",
34
- userAgent: "speakeasy-sdk/typescript 1.5.15 2.948.4 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.16 2.948.4 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,15 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ChatContentText, ChatContentText$Outbound } from "./chatcontenttext.js";
3
- import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
4
- /**
5
- * OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.
6
- */
7
- export type ChatDeveloperMessageConfigurationUpdate = {
8
- /**
9
- * Reasoning settings applied from this point in the conversation onward
10
- */
11
- reasoning: ConfigurationUpdateReasoning;
12
- };
3
+ import { ConfigurationUpdate, ConfigurationUpdate$Outbound } from "./configurationupdate.js";
13
4
  /**
14
5
  * Developer message content
15
6
  */
@@ -21,7 +12,7 @@ export type ChatDeveloperMessage = {
21
12
  /**
22
13
  * OpenRouter extension. Same as the system message `configuration_update`: changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns.
23
14
  */
24
- configurationUpdate?: ChatDeveloperMessageConfigurationUpdate | null | undefined;
15
+ configurationUpdate?: ConfigurationUpdate | null | undefined;
25
16
  /**
26
17
  * Developer message content
27
18
  */
@@ -33,20 +24,13 @@ export type ChatDeveloperMessage = {
33
24
  role: "developer";
34
25
  };
35
26
  /** @internal */
36
- export type ChatDeveloperMessageConfigurationUpdate$Outbound = {
37
- reasoning: ConfigurationUpdateReasoning$Outbound;
38
- };
39
- /** @internal */
40
- export declare const ChatDeveloperMessageConfigurationUpdate$outboundSchema: z.ZodType<ChatDeveloperMessageConfigurationUpdate$Outbound, ChatDeveloperMessageConfigurationUpdate>;
41
- export declare function chatDeveloperMessageConfigurationUpdateToJSON(chatDeveloperMessageConfigurationUpdate: ChatDeveloperMessageConfigurationUpdate): string;
42
- /** @internal */
43
27
  export type ChatDeveloperMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
44
28
  /** @internal */
45
29
  export declare const ChatDeveloperMessageContent$outboundSchema: z.ZodType<ChatDeveloperMessageContent$Outbound, ChatDeveloperMessageContent>;
46
30
  export declare function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent: ChatDeveloperMessageContent): string;
47
31
  /** @internal */
48
32
  export type ChatDeveloperMessage$Outbound = {
49
- configuration_update?: ChatDeveloperMessageConfigurationUpdate$Outbound | null | undefined;
33
+ configuration_update?: ConfigurationUpdate$Outbound | null | undefined;
50
34
  content: string | Array<ChatContentText$Outbound>;
51
35
  name?: string | undefined;
52
36
  role: "developer";
@@ -5,14 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { ChatContentText$outboundSchema, } from "./chatcontenttext.js";
8
- import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
9
- /** @internal */
10
- export const ChatDeveloperMessageConfigurationUpdate$outboundSchema = z.object({
11
- reasoning: ConfigurationUpdateReasoning$outboundSchema,
12
- });
13
- export function chatDeveloperMessageConfigurationUpdateToJSON(chatDeveloperMessageConfigurationUpdate) {
14
- return JSON.stringify(ChatDeveloperMessageConfigurationUpdate$outboundSchema.parse(chatDeveloperMessageConfigurationUpdate));
15
- }
8
+ import { ConfigurationUpdate$outboundSchema, } from "./configurationupdate.js";
16
9
  /** @internal */
17
10
  export const ChatDeveloperMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
18
11
  export function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent) {
@@ -20,7 +13,8 @@ export function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent) {
20
13
  }
21
14
  /** @internal */
22
15
  export const ChatDeveloperMessage$outboundSchema = z.object({
23
- configurationUpdate: z.nullable(z.lazy(() => ChatDeveloperMessageConfigurationUpdate$outboundSchema)).optional(),
16
+ configurationUpdate: z.nullable(ConfigurationUpdate$outboundSchema)
17
+ .optional(),
24
18
  content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
25
19
  name: z.string().optional(),
26
20
  role: z.literal("developer"),
@@ -1,15 +1,6 @@
1
1
  import * as z from "zod/v4";
2
2
  import { ChatContentText, ChatContentText$Outbound } from "./chatcontenttext.js";
3
- import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
4
- /**
5
- * OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
6
- */
7
- export type ChatSystemMessageConfigurationUpdate = {
8
- /**
9
- * Reasoning settings applied from this point in the conversation onward
10
- */
11
- reasoning: ConfigurationUpdateReasoning;
12
- };
3
+ import { ConfigurationUpdate, ConfigurationUpdate$Outbound } from "./configurationupdate.js";
13
4
  /**
14
5
  * System message content
15
6
  */
@@ -21,7 +12,7 @@ export type ChatSystemMessage = {
21
12
  /**
22
13
  * OpenRouter extension. Changes reasoning effort from this point in the conversation onward without invalidating the prompt cache for the preceding turns. Place it on a content-less system message (`content: ""`) directly before the user message it should apply to, and keep it at that position in later requests. Equivalent to the OpenAI Responses `configuration_update` input item and the Anthropic Messages per-message `output_config.effort`.
23
14
  */
24
- configurationUpdate?: ChatSystemMessageConfigurationUpdate | null | undefined;
15
+ configurationUpdate?: ConfigurationUpdate | null | undefined;
25
16
  /**
26
17
  * System message content
27
18
  */
@@ -33,20 +24,13 @@ export type ChatSystemMessage = {
33
24
  role: "system";
34
25
  };
35
26
  /** @internal */
36
- export type ChatSystemMessageConfigurationUpdate$Outbound = {
37
- reasoning: ConfigurationUpdateReasoning$Outbound;
38
- };
39
- /** @internal */
40
- export declare const ChatSystemMessageConfigurationUpdate$outboundSchema: z.ZodType<ChatSystemMessageConfigurationUpdate$Outbound, ChatSystemMessageConfigurationUpdate>;
41
- export declare function chatSystemMessageConfigurationUpdateToJSON(chatSystemMessageConfigurationUpdate: ChatSystemMessageConfigurationUpdate): string;
42
- /** @internal */
43
27
  export type ChatSystemMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
44
28
  /** @internal */
45
29
  export declare const ChatSystemMessageContent$outboundSchema: z.ZodType<ChatSystemMessageContent$Outbound, ChatSystemMessageContent>;
46
30
  export declare function chatSystemMessageContentToJSON(chatSystemMessageContent: ChatSystemMessageContent): string;
47
31
  /** @internal */
48
32
  export type ChatSystemMessage$Outbound = {
49
- configuration_update?: ChatSystemMessageConfigurationUpdate$Outbound | null | undefined;
33
+ configuration_update?: ConfigurationUpdate$Outbound | null | undefined;
50
34
  content: string | Array<ChatContentText$Outbound>;
51
35
  name?: string | undefined;
52
36
  role: "system";
@@ -5,14 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { ChatContentText$outboundSchema, } from "./chatcontenttext.js";
8
- import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
9
- /** @internal */
10
- export const ChatSystemMessageConfigurationUpdate$outboundSchema = z.object({
11
- reasoning: ConfigurationUpdateReasoning$outboundSchema,
12
- });
13
- export function chatSystemMessageConfigurationUpdateToJSON(chatSystemMessageConfigurationUpdate) {
14
- return JSON.stringify(ChatSystemMessageConfigurationUpdate$outboundSchema.parse(chatSystemMessageConfigurationUpdate));
15
- }
8
+ import { ConfigurationUpdate$outboundSchema, } from "./configurationupdate.js";
16
9
  /** @internal */
17
10
  export const ChatSystemMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
18
11
  export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
@@ -20,7 +13,8 @@ export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
20
13
  }
21
14
  /** @internal */
22
15
  export const ChatSystemMessage$outboundSchema = z.object({
23
- configurationUpdate: z.nullable(z.lazy(() => ChatSystemMessageConfigurationUpdate$outboundSchema)).optional(),
16
+ configurationUpdate: z.nullable(ConfigurationUpdate$outboundSchema)
17
+ .optional(),
24
18
  content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
25
19
  name: z.string().optional(),
26
20
  role: z.literal("system"),
@@ -0,0 +1,19 @@
1
+ import * as z from "zod/v4";
2
+ import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } from "./configurationupdatereasoning.js";
3
+ /**
4
+ * Mid-conversation configuration update. Changes reasoning effort from this point onward without invalidating the prompt cache for the preceding turns.
5
+ */
6
+ export type ConfigurationUpdate = {
7
+ /**
8
+ * Reasoning settings applied from this point in the conversation onward
9
+ */
10
+ reasoning: ConfigurationUpdateReasoning;
11
+ };
12
+ /** @internal */
13
+ export type ConfigurationUpdate$Outbound = {
14
+ reasoning: ConfigurationUpdateReasoning$Outbound;
15
+ };
16
+ /** @internal */
17
+ export declare const ConfigurationUpdate$outboundSchema: z.ZodType<ConfigurationUpdate$Outbound, ConfigurationUpdate>;
18
+ export declare function configurationUpdateToJSON(configurationUpdate: ConfigurationUpdate): string;
19
+ //# sourceMappingURL=configurationupdate.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f89cde6e6d79
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
7
+ /** @internal */
8
+ export const ConfigurationUpdate$outboundSchema = z.object({
9
+ reasoning: ConfigurationUpdateReasoning$outboundSchema,
10
+ });
11
+ export function configurationUpdateToJSON(configurationUpdate) {
12
+ return JSON.stringify(ConfigurationUpdate$outboundSchema.parse(configurationUpdate));
13
+ }
14
+ //# sourceMappingURL=configurationupdate.js.map
@@ -241,6 +241,7 @@ export * from "./codexlocalshelltool.js";
241
241
  export * from "./compactionitem.js";
242
242
  export * from "./compoundfilter.js";
243
243
  export * from "./computeruseservertool.js";
244
+ export * from "./configurationupdate.js";
244
245
  export * from "./configurationupdateitem.js";
245
246
  export * from "./configurationupdatereasoning.js";
246
247
  export * from "./conflictresponseerrordata.js";
@@ -245,6 +245,7 @@ export * from "./codexlocalshelltool.js";
245
245
  export * from "./compactionitem.js";
246
246
  export * from "./compoundfilter.js";
247
247
  export * from "./computeruseservertool.js";
248
+ export * from "./configurationupdate.js";
248
249
  export * from "./configurationupdateitem.js";
249
250
  export * from "./configurationupdatereasoning.js";
250
251
  export * from "./conflictresponseerrordata.js";
@@ -5,6 +5,7 @@ export declare const WebSearchStatus: {
5
5
  readonly Searching: "searching";
6
6
  readonly InProgress: "in_progress";
7
7
  readonly Failed: "failed";
8
+ readonly Incomplete: "incomplete";
8
9
  };
9
10
  export type WebSearchStatus = OpenEnum<typeof WebSearchStatus>;
10
11
  /** @internal */
@@ -8,6 +8,7 @@ export const WebSearchStatus = {
8
8
  Searching: "searching",
9
9
  InProgress: "in_progress",
10
10
  Failed: "failed",
11
+ Incomplete: "incomplete",
11
12
  };
12
13
  /** @internal */
13
14
  export const WebSearchStatus$inboundSchema = openEnums.inboundSchema(WebSearchStatus);
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.15",
5
+ "version": "1.5.16",
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.15",
3
+ "version": "1.5.16",
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
- "postinstall": "node scripts/check-types.js || true",
77
- "test": "vitest --run --project unit",
78
76
  "test:transit": "exit 0",
77
+ "test:watch": "vitest --watch --project unit",
79
78
  "typecheck": "tsc --noEmit",
80
79
  "typecheck:transit": "exit 0",
81
- "compile": "tsc && node scripts/unbarrel-imports.js",
82
- "prepare": "npm run build",
80
+ "postinstall": "node scripts/check-types.js || true",
81
+ "test": "vitest --run --project unit",
83
82
  "test:e2e": "vitest --run --project e2e",
84
- "test:watch": "vitest --watch --project unit"
83
+ "compile": "tsc && node scripts/unbarrel-imports.js",
84
+ "prepare": "npm run build"
85
85
  },
86
86
  "peerDependencies": {
87
87