@openrouter/sdk 1.4.13 → 1.4.14

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.4.13";
53
+ readonly sdkVersion: "1.4.14";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.4.13 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.4.14 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.4.13",
32
+ sdkVersion: "1.4.14",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.4.13 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.4.14 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -0,0 +1,21 @@
1
+ import * as z from "zod/v4";
2
+ /**
3
+ * Generic OpenRouter server-tool envelope. `type` names a registered server tool (canonical `openrouter:*` form or a registered shorthand); `parameters` carries tool-specific configuration validated against the tool definition.
4
+ */
5
+ export type ChatDynamicServerTool = {
6
+ parameters?: {
7
+ [k: string]: any;
8
+ } | undefined;
9
+ type: string;
10
+ };
11
+ /** @internal */
12
+ export type ChatDynamicServerTool$Outbound = {
13
+ parameters?: {
14
+ [k: string]: any;
15
+ } | undefined;
16
+ type: string;
17
+ };
18
+ /** @internal */
19
+ export declare const ChatDynamicServerTool$outboundSchema: z.ZodType<ChatDynamicServerTool$Outbound, ChatDynamicServerTool>;
20
+ export declare function chatDynamicServerToolToJSON(chatDynamicServerTool: ChatDynamicServerTool): string;
21
+ //# sourceMappingURL=chatdynamicservertool.d.ts.map
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 883a1e1c541b
4
+ */
5
+ import * as z from "zod/v4";
6
+ /** @internal */
7
+ export const ChatDynamicServerTool$outboundSchema = z.object({
8
+ parameters: z.record(z.string(), z.any()).optional(),
9
+ type: z.string(),
10
+ });
11
+ export function chatDynamicServerToolToJSON(chatDynamicServerTool) {
12
+ return JSON.stringify(ChatDynamicServerTool$outboundSchema.parse(chatDynamicServerTool));
13
+ }
14
+ //# sourceMappingURL=chatdynamicservertool.js.map
@@ -3,6 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
3
3
  import { AdvisorServerToolOpenRouter, AdvisorServerToolOpenRouter$Outbound } from "./advisorservertoolopenrouter.js";
4
4
  import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
5
5
  import { ChatContentCacheControl, ChatContentCacheControl$Outbound } from "./chatcontentcachecontrol.js";
6
+ import { ChatDynamicServerTool, ChatDynamicServerTool$Outbound } from "./chatdynamicservertool.js";
6
7
  import { ChatSearchModelsServerTool, ChatSearchModelsServerTool$Outbound } from "./chatsearchmodelsservertool.js";
7
8
  import { ChatWebSearchShorthand, ChatWebSearchShorthand$Outbound } from "./chatwebsearchshorthand.js";
8
9
  import { DatetimeServerTool, DatetimeServerTool$Outbound } from "./datetimeservertool.js";
@@ -53,7 +54,7 @@ export type ChatFunctionToolFunction = {
53
54
  /**
54
55
  * Tool definition for function calling (regular function or OpenRouter built-in server tool)
55
56
  */
56
- export type ChatFunctionTool = ChatFunctionToolFunction | AdvisorServerToolOpenRouter | BashServerTool | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | SubagentServerToolOpenRouter | WebFetchServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand;
57
+ export type ChatFunctionTool = ChatFunctionToolFunction | AdvisorServerToolOpenRouter | BashServerTool | DatetimeServerTool | FilesServerTool | FusionServerToolOpenRouter | ImageGenerationServerToolOpenRouter | ChatSearchModelsServerTool | SubagentServerToolOpenRouter | WebFetchServerTool | OpenRouterWebSearchServerTool | ChatWebSearchShorthand | ChatDynamicServerTool;
57
58
  /** @internal */
58
59
  export type ChatFunctionToolFunctionFunction$Outbound = {
59
60
  description?: string | undefined;
@@ -78,7 +79,7 @@ export type ChatFunctionToolFunction$Outbound = {
78
79
  export declare const ChatFunctionToolFunction$outboundSchema: z.ZodType<ChatFunctionToolFunction$Outbound, ChatFunctionToolFunction>;
79
80
  export declare function chatFunctionToolFunctionToJSON(chatFunctionToolFunction: ChatFunctionToolFunction): string;
80
81
  /** @internal */
81
- export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | AdvisorServerToolOpenRouter$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | SubagentServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound;
82
+ export type ChatFunctionTool$Outbound = ChatFunctionToolFunction$Outbound | AdvisorServerToolOpenRouter$Outbound | BashServerTool$Outbound | DatetimeServerTool$Outbound | FilesServerTool$Outbound | FusionServerToolOpenRouter$Outbound | ImageGenerationServerToolOpenRouter$Outbound | ChatSearchModelsServerTool$Outbound | SubagentServerToolOpenRouter$Outbound | WebFetchServerTool$Outbound | OpenRouterWebSearchServerTool$Outbound | ChatWebSearchShorthand$Outbound | ChatDynamicServerTool$Outbound;
82
83
  /** @internal */
83
84
  export declare const ChatFunctionTool$outboundSchema: z.ZodType<ChatFunctionTool$Outbound, ChatFunctionTool>;
84
85
  export declare function chatFunctionToolToJSON(chatFunctionTool: ChatFunctionTool): string;
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { AdvisorServerToolOpenRouter$outboundSchema, } from "./advisorservertoolopenrouter.js";
8
8
  import { BashServerTool$outboundSchema, } from "./bashservertool.js";
9
9
  import { ChatContentCacheControl$outboundSchema, } from "./chatcontentcachecontrol.js";
10
+ import { ChatDynamicServerTool$outboundSchema, } from "./chatdynamicservertool.js";
10
11
  import { ChatSearchModelsServerTool$outboundSchema, } from "./chatsearchmodelsservertool.js";
11
12
  import { ChatWebSearchShorthand$outboundSchema, } from "./chatwebsearchshorthand.js";
12
13
  import { DatetimeServerTool$outboundSchema, } from "./datetimeservertool.js";
@@ -58,6 +59,7 @@ export const ChatFunctionTool$outboundSchema = z.union([
58
59
  WebFetchServerTool$outboundSchema,
59
60
  OpenRouterWebSearchServerTool$outboundSchema,
60
61
  ChatWebSearchShorthand$outboundSchema,
62
+ ChatDynamicServerTool$outboundSchema,
61
63
  ]);
62
64
  export function chatFunctionToolToJSON(chatFunctionTool) {
63
65
  return JSON.stringify(ChatFunctionTool$outboundSchema.parse(chatFunctionTool));
@@ -189,6 +189,7 @@ export * from "./chatcontentvideo.js";
189
189
  export * from "./chatcontentvideoinput.js";
190
190
  export * from "./chatdebugoptions.js";
191
191
  export * from "./chatdevelopermessage.js";
192
+ export * from "./chatdynamicservertool.js";
192
193
  export * from "./chatfinishreasonenum.js";
193
194
  export * from "./chatformatgrammarconfig.js";
194
195
  export * from "./chatformatjsonobjectconfig.js";
@@ -193,6 +193,7 @@ export * from "./chatcontentvideo.js";
193
193
  export * from "./chatcontentvideoinput.js";
194
194
  export * from "./chatdebugoptions.js";
195
195
  export * from "./chatdevelopermessage.js";
196
+ export * from "./chatdynamicservertool.js";
196
197
  export * from "./chatfinishreasonenum.js";
197
198
  export * from "./chatformatgrammarconfig.js";
198
199
  export * from "./chatformatjsonobjectconfig.js";
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.4.13",
5
+ "version": "1.4.14",
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.4.13",
3
+ "version": "1.4.14",
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": [
@@ -76,12 +76,12 @@
76
76
  "postinstall": "node scripts/check-types.js || true",
77
77
  "prepare": "npm run build",
78
78
  "test:e2e": "vitest --run --project e2e",
79
- "test:watch": "vitest --watch --project unit",
79
+ "test:transit": "exit 0",
80
80
  "typecheck": "tsc --noEmit",
81
+ "typecheck:transit": "exit 0",
81
82
  "compile": "tsc && node scripts/unbarrel-imports.js",
82
83
  "test": "vitest --run --project unit",
83
- "test:transit": "exit 0",
84
- "typecheck:transit": "exit 0"
84
+ "test:watch": "vitest --watch --project unit"
85
85
  },
86
86
  "peerDependencies": {
87
87