@openrouter/sdk 1.2.108 → 1.2.109

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.2.108";
53
+ readonly sdkVersion: "1.2.109";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.108 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.109 2.914.0 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.2.108",
32
+ sdkVersion: "1.2.109",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.108 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.109 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,5 +1,15 @@
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
13
  /**
4
14
  * Developer message content
5
15
  */
@@ -8,6 +18,10 @@ export type ChatDeveloperMessageContent = string | Array<ChatContentText>;
8
18
  * Developer message
9
19
  */
10
20
  export type ChatDeveloperMessage = {
21
+ /**
22
+ * 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
+ */
24
+ configurationUpdate?: ChatDeveloperMessageConfigurationUpdate | null | undefined;
11
25
  /**
12
26
  * Developer message content
13
27
  */
@@ -19,12 +33,20 @@ export type ChatDeveloperMessage = {
19
33
  role: "developer";
20
34
  };
21
35
  /** @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 */
22
43
  export type ChatDeveloperMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
23
44
  /** @internal */
24
45
  export declare const ChatDeveloperMessageContent$outboundSchema: z.ZodType<ChatDeveloperMessageContent$Outbound, ChatDeveloperMessageContent>;
25
46
  export declare function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent: ChatDeveloperMessageContent): string;
26
47
  /** @internal */
27
48
  export type ChatDeveloperMessage$Outbound = {
49
+ configuration_update?: ChatDeveloperMessageConfigurationUpdate$Outbound | null | undefined;
28
50
  content: string | Array<ChatContentText$Outbound>;
29
51
  name?: string | undefined;
30
52
  role: "developer";
@@ -3,7 +3,16 @@
3
3
  * @generated-id: 6a179ea58260
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
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
+ }
7
16
  /** @internal */
8
17
  export const ChatDeveloperMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
9
18
  export function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent) {
@@ -11,9 +20,14 @@ export function chatDeveloperMessageContentToJSON(chatDeveloperMessageContent) {
11
20
  }
12
21
  /** @internal */
13
22
  export const ChatDeveloperMessage$outboundSchema = z.object({
23
+ configurationUpdate: z.nullable(z.lazy(() => ChatDeveloperMessageConfigurationUpdate$outboundSchema)).optional(),
14
24
  content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
15
25
  name: z.string().optional(),
16
26
  role: z.literal("developer"),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ configurationUpdate: "configuration_update",
30
+ });
17
31
  });
18
32
  export function chatDeveloperMessageToJSON(chatDeveloperMessage) {
19
33
  return JSON.stringify(ChatDeveloperMessage$outboundSchema.parse(chatDeveloperMessage));
@@ -4,7 +4,7 @@ import { ConfigurationUpdateReasoning, ConfigurationUpdateReasoning$Outbound } f
4
4
  /**
5
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
6
  */
7
- export type ConfigurationUpdate = {
7
+ export type ChatSystemMessageConfigurationUpdate = {
8
8
  /**
9
9
  * Reasoning settings applied from this point in the conversation onward
10
10
  */
@@ -21,7 +21,7 @@ export type ChatSystemMessage = {
21
21
  /**
22
22
  * 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
23
  */
24
- configurationUpdate?: ConfigurationUpdate | null | undefined;
24
+ configurationUpdate?: ChatSystemMessageConfigurationUpdate | null | undefined;
25
25
  /**
26
26
  * System message content
27
27
  */
@@ -33,12 +33,12 @@ export type ChatSystemMessage = {
33
33
  role: "system";
34
34
  };
35
35
  /** @internal */
36
- export type ConfigurationUpdate$Outbound = {
36
+ export type ChatSystemMessageConfigurationUpdate$Outbound = {
37
37
  reasoning: ConfigurationUpdateReasoning$Outbound;
38
38
  };
39
39
  /** @internal */
40
- export declare const ConfigurationUpdate$outboundSchema: z.ZodType<ConfigurationUpdate$Outbound, ConfigurationUpdate>;
41
- export declare function configurationUpdateToJSON(configurationUpdate: ConfigurationUpdate): string;
40
+ export declare const ChatSystemMessageConfigurationUpdate$outboundSchema: z.ZodType<ChatSystemMessageConfigurationUpdate$Outbound, ChatSystemMessageConfigurationUpdate>;
41
+ export declare function chatSystemMessageConfigurationUpdateToJSON(chatSystemMessageConfigurationUpdate: ChatSystemMessageConfigurationUpdate): string;
42
42
  /** @internal */
43
43
  export type ChatSystemMessageContent$Outbound = string | Array<ChatContentText$Outbound>;
44
44
  /** @internal */
@@ -46,7 +46,7 @@ export declare const ChatSystemMessageContent$outboundSchema: z.ZodType<ChatSyst
46
46
  export declare function chatSystemMessageContentToJSON(chatSystemMessageContent: ChatSystemMessageContent): string;
47
47
  /** @internal */
48
48
  export type ChatSystemMessage$Outbound = {
49
- configuration_update?: ConfigurationUpdate$Outbound | null | undefined;
49
+ configuration_update?: ChatSystemMessageConfigurationUpdate$Outbound | null | undefined;
50
50
  content: string | Array<ChatContentText$Outbound>;
51
51
  name?: string | undefined;
52
52
  role: "system";
@@ -7,11 +7,11 @@ import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { ChatContentText$outboundSchema, } from "./chatcontenttext.js";
8
8
  import { ConfigurationUpdateReasoning$outboundSchema, } from "./configurationupdatereasoning.js";
9
9
  /** @internal */
10
- export const ConfigurationUpdate$outboundSchema = z.object({
10
+ export const ChatSystemMessageConfigurationUpdate$outboundSchema = z.object({
11
11
  reasoning: ConfigurationUpdateReasoning$outboundSchema,
12
12
  });
13
- export function configurationUpdateToJSON(configurationUpdate) {
14
- return JSON.stringify(ConfigurationUpdate$outboundSchema.parse(configurationUpdate));
13
+ export function chatSystemMessageConfigurationUpdateToJSON(chatSystemMessageConfigurationUpdate) {
14
+ return JSON.stringify(ChatSystemMessageConfigurationUpdate$outboundSchema.parse(chatSystemMessageConfigurationUpdate));
15
15
  }
16
16
  /** @internal */
17
17
  export const ChatSystemMessageContent$outboundSchema = z.union([z.string(), z.array(ChatContentText$outboundSchema)]);
@@ -20,7 +20,7 @@ export function chatSystemMessageContentToJSON(chatSystemMessageContent) {
20
20
  }
21
21
  /** @internal */
22
22
  export const ChatSystemMessage$outboundSchema = z.object({
23
- configurationUpdate: z.nullable(z.lazy(() => ConfigurationUpdate$outboundSchema)).optional(),
23
+ configurationUpdate: z.nullable(z.lazy(() => ChatSystemMessageConfigurationUpdate$outboundSchema)).optional(),
24
24
  content: z.union([z.string(), z.array(ChatContentText$outboundSchema)]),
25
25
  name: z.string().optional(),
26
26
  role: z.literal("system"),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.108",
5
+ "version": "1.2.109",
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.2.108",
3
+ "version": "1.2.109",
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",
75
75
  "prepublishOnly": "npm run build",
76
+ "prepare": "npm run build",
77
+ "test": "vitest --run --project unit",
78
+ "typecheck": "tsc --noEmit",
79
+ "typecheck:transit": "exit 0",
76
80
  "compile": "tsc",
77
81
  "postinstall": "node scripts/check-types.js || true",
78
- "prepare": "npm run build",
79
82
  "test:e2e": "vitest --run --project e2e",
80
- "test:watch": "vitest --watch --project unit",
81
- "test": "vitest --run --project unit",
82
83
  "test:transit": "exit 0",
83
- "typecheck": "tsc --noEmit",
84
- "typecheck:transit": "exit 0"
84
+ "test:watch": "vitest --watch --project unit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {