@openrouter/sdk 1.2.43 → 1.2.44

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.43";
53
+ readonly sdkVersion: "1.2.44";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.43 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.44 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.43",
32
+ sdkVersion: "1.2.44",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.43 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.44 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -1,5 +1,4 @@
1
1
  import * as z from "zod/v4";
2
- import { AdvisorNestedTool, AdvisorNestedTool$Outbound } from "./advisornestedtool.js";
3
2
  import { AdvisorReasoning, AdvisorReasoning$Outbound } from "./advisorreasoning.js";
4
3
  /**
5
4
  * Configuration for one openrouter:advisor server tool entry.
@@ -18,11 +17,7 @@ export type AdvisorServerToolConfig = {
18
17
  */
19
18
  maxCompletionTokens?: number | undefined;
20
19
  /**
21
- * Maximum number of tool-calling steps the advisor sub-agent may take during its agentic loop. Capped at 25. Only relevant when the advisor is given tools.
22
- */
23
- maxToolCalls?: number | undefined;
24
- /**
25
- * Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used. The advisor tool itself cannot be the advisor model.
20
+ * Slug of the advisor model to consult (any OpenRouter model). When omitted, the executor can choose it via the tool call's `model` argument; if neither is set, the model from the outer API request is used.
26
21
  */
27
22
  model?: string | undefined;
28
23
  /**
@@ -41,23 +36,17 @@ export type AdvisorServerToolConfig = {
41
36
  * Sampling temperature forwarded to the advisor call. When omitted, the provider's default applies.
42
37
  */
43
38
  temperature?: number | undefined;
44
- /**
45
- * Tools the advisor sub-agent may use while forming its advice. The advisor runs as an agentic sub-agent over these tools, then returns its text. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the advisor tool itself.
46
- */
47
- tools?: Array<AdvisorNestedTool> | undefined;
48
39
  };
49
40
  /** @internal */
50
41
  export type AdvisorServerToolConfig$Outbound = {
51
42
  forward_transcript?: boolean | undefined;
52
43
  instructions?: string | undefined;
53
44
  max_completion_tokens?: number | undefined;
54
- max_tool_calls?: number | undefined;
55
45
  model?: string | undefined;
56
46
  name?: string | undefined;
57
47
  reasoning?: AdvisorReasoning$Outbound | undefined;
58
48
  stream?: boolean | undefined;
59
49
  temperature?: number | undefined;
60
- tools?: Array<AdvisorNestedTool$Outbound> | undefined;
61
50
  };
62
51
  /** @internal */
63
52
  export declare const AdvisorServerToolConfig$outboundSchema: z.ZodType<AdvisorServerToolConfig$Outbound, AdvisorServerToolConfig>;
@@ -4,25 +4,21 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
- import { AdvisorNestedTool$outboundSchema, } from "./advisornestedtool.js";
8
7
  import { AdvisorReasoning$outboundSchema, } from "./advisorreasoning.js";
9
8
  /** @internal */
10
9
  export const AdvisorServerToolConfig$outboundSchema = z.object({
11
10
  forwardTranscript: z.boolean().optional(),
12
11
  instructions: z.string().optional(),
13
12
  maxCompletionTokens: z.int().optional(),
14
- maxToolCalls: z.int().optional(),
15
13
  model: z.string().optional(),
16
14
  name: z.string().optional(),
17
15
  reasoning: AdvisorReasoning$outboundSchema.optional(),
18
16
  stream: z.boolean().optional(),
19
17
  temperature: z.number().optional(),
20
- tools: z.array(AdvisorNestedTool$outboundSchema).optional(),
21
18
  }).transform((v) => {
22
19
  return remap$(v, {
23
20
  forwardTranscript: "forward_transcript",
24
21
  maxCompletionTokens: "max_completion_tokens",
25
- maxToolCalls: "max_tool_calls",
26
22
  });
27
23
  });
28
24
  export function advisorServerToolConfigToJSON(advisorServerToolConfig) {
@@ -6,7 +6,7 @@ export declare const AdvisorServerToolOpenRouterType: {
6
6
  };
7
7
  export type AdvisorServerToolOpenRouterType = ClosedEnum<typeof AdvisorServerToolOpenRouterType>;
8
8
  /**
9
- * OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. The advisor may run as a sub-agent with its own tools. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
9
+ * OpenRouter built-in server tool: consults a higher-intelligence advisor model (any OpenRouter model) for guidance mid-generation and returns its response. Include multiple entries to offer several named advisors; at most one entry may omit `name` to act as the default advisor.
10
10
  */
11
11
  export type AdvisorServerToolOpenRouter = {
12
12
  /**
@@ -2,7 +2,6 @@ export * from "./aabenchmarkentry.js";
2
2
  export * from "./activityitem.js";
3
3
  export * from "./activityresponse.js";
4
4
  export * from "./additionaltoolsitem.js";
5
- export * from "./advisornestedtool.js";
6
5
  export * from "./advisorreasoning.js";
7
6
  export * from "./advisorservertoolconfig.js";
8
7
  export * from "./advisorservertoolopenrouter.js";
@@ -6,7 +6,6 @@ export * from "./aabenchmarkentry.js";
6
6
  export * from "./activityitem.js";
7
7
  export * from "./activityresponse.js";
8
8
  export * from "./additionaltoolsitem.js";
9
- export * from "./advisornestedtool.js";
10
9
  export * from "./advisorreasoning.js";
11
10
  export * from "./advisorservertoolconfig.js";
12
11
  export * from "./advisorservertoolopenrouter.js";
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.43",
5
+ "version": "1.2.44",
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.43",
3
+ "version": "1.2.44",
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": [
@@ -75,13 +75,13 @@
75
75
  "prepublishOnly": "npm run build",
76
76
  "postinstall": "node scripts/check-types.js || true",
77
77
  "prepare": "npm run build",
78
+ "test": "vitest --run --project unit",
78
79
  "test:transit": "exit 0",
79
80
  "test:watch": "vitest --watch --project unit",
80
81
  "typecheck": "tsc --noEmit",
81
- "compile": "tsc",
82
- "test": "vitest --run --project unit",
82
+ "typecheck:transit": "exit 0",
83
83
  "test:e2e": "vitest --run --project e2e",
84
- "typecheck:transit": "exit 0"
84
+ "compile": "tsc"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {
@@ -1,25 +0,0 @@
1
- import * as z from "zod/v4";
2
- /**
3
- * A tool made available to the advisor sub-agent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the advisor has no way to execute them. The advisor tool may not list itself.
4
- */
5
- export type AdvisorNestedTool = {
6
- parameters?: {
7
- [k: string]: any;
8
- } | undefined;
9
- type: string;
10
- additionalProperties?: {
11
- [k: string]: any;
12
- } | undefined;
13
- };
14
- /** @internal */
15
- export type AdvisorNestedTool$Outbound = {
16
- parameters?: {
17
- [k: string]: any;
18
- } | undefined;
19
- type: string;
20
- [additionalProperties: string]: unknown;
21
- };
22
- /** @internal */
23
- export declare const AdvisorNestedTool$outboundSchema: z.ZodType<AdvisorNestedTool$Outbound, AdvisorNestedTool>;
24
- export declare function advisorNestedToolToJSON(advisorNestedTool: AdvisorNestedTool): string;
25
- //# sourceMappingURL=advisornestedtool.d.ts.map
@@ -1,23 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 5dc7e04c01b7
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- /** @internal */
8
- export const AdvisorNestedTool$outboundSchema = z.object({
9
- parameters: z.record(z.string(), z.any()).optional(),
10
- type: z.string(),
11
- additionalProperties: z.record(z.string(), z.any()).optional(),
12
- }).transform((v) => {
13
- return {
14
- ...v.additionalProperties,
15
- ...remap$(v, {
16
- additionalProperties: null,
17
- }),
18
- };
19
- });
20
- export function advisorNestedToolToJSON(advisorNestedTool) {
21
- return JSON.stringify(AdvisorNestedTool$outboundSchema.parse(advisorNestedTool));
22
- }
23
- //# sourceMappingURL=advisornestedtool.js.map