@openrouter/sdk 1.4.23 → 1.4.24

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.23";
53
+ readonly sdkVersion: "1.4.24";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.4.23 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.4.24 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.23",
32
+ sdkVersion: "1.4.24",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.4.23 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.4.24 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -21,6 +21,10 @@ export type SwitchyardRouterPlugin = {
21
21
  */
22
22
  algorithm?: Algorithm | undefined;
23
23
  id: "switchyard-router";
24
+ /**
25
+ * The model that runs the judge call for the judge-backed algorithms ("capability", "stage", and "composite"). The model must support structured outputs and have a provider that your account and request settings allow. Otherwise, the request uses the platform default judge, google/gemini-2.5-flash-lite, and reports the reason in the routing metadata. The judge call is billed to you like any other request.
26
+ */
27
+ judgeModel?: string | undefined;
24
28
  };
25
29
  /** @internal */
26
30
  export declare const Algorithm$outboundSchema: z.ZodType<string, Algorithm>;
@@ -28,6 +32,7 @@ export declare const Algorithm$outboundSchema: z.ZodType<string, Algorithm>;
28
32
  export type SwitchyardRouterPlugin$Outbound = {
29
33
  algorithm?: string | undefined;
30
34
  id: "switchyard-router";
35
+ judge_model?: string | undefined;
31
36
  };
32
37
  /** @internal */
33
38
  export declare const SwitchyardRouterPlugin$outboundSchema: z.ZodType<SwitchyardRouterPlugin$Outbound, SwitchyardRouterPlugin>;
@@ -3,6 +3,7 @@
3
3
  * @generated-id: 90395eb02944
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import * as openEnums from "../types/enums.js";
7
8
  /**
8
9
  * Routing algorithm for this request. "capability" calls a small judge model to rate how demanding the task is, then picks the efficient or capable candidate. "stage" reads the tool-result history (errors, repeated failures, edits landing) and calls the judge only when those signals are undecided. "auto" is "stage" without the judge call. "random" picks one candidate at random. "composite" keeps the tier chosen on the last human turn and re-evaluates tool turns with the stage signals. "passthrough" serves the eligible candidates in the order OpenRouter already ranked them, with no routing decision and no judge call. Omit this field to use the platform default, stage.
@@ -22,6 +23,11 @@ export const Algorithm$outboundSchema = openEnums
22
23
  export const SwitchyardRouterPlugin$outboundSchema = z.object({
23
24
  algorithm: Algorithm$outboundSchema.optional(),
24
25
  id: z.literal("switchyard-router"),
26
+ judgeModel: z.string().optional(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ judgeModel: "judge_model",
30
+ });
25
31
  });
26
32
  export function switchyardRouterPluginToJSON(switchyardRouterPlugin) {
27
33
  return JSON.stringify(SwitchyardRouterPlugin$outboundSchema.parse(switchyardRouterPlugin));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.4.23",
5
+ "version": "1.4.24",
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.23",
3
+ "version": "1.4.24",
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
- "test:e2e": "vitest --run --project e2e",
77
76
  "typecheck:transit": "exit 0",
77
+ "compile": "tsc && node scripts/unbarrel-imports.js",
78
78
  "postinstall": "node scripts/check-types.js || true",
79
79
  "test": "vitest --run --project unit",
80
+ "test:e2e": "vitest --run --project e2e",
80
81
  "test:transit": "exit 0",
82
+ "prepare": "npm run build",
81
83
  "test:watch": "vitest --watch --project unit",
82
- "typecheck": "tsc --noEmit",
83
- "compile": "tsc && node scripts/unbarrel-imports.js",
84
- "prepare": "npm run build"
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {
87
87