@openrouter/sdk 1.5.95 → 1.5.97

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.95";
53
+ readonly sdkVersion: "1.5.97";
54
54
  readonly genVersion: "2.960.8";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.5.95 2.960.8 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.97 2.960.8 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.95",
32
+ sdkVersion: "1.5.97",
33
33
  genVersion: "2.960.8",
34
- userAgent: "speakeasy-sdk/typescript 1.5.95 2.960.8 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.5.97 2.960.8 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -11,6 +11,14 @@ export type ObservabilityOtelCollectorDestinationConfig = {
11
11
  headers?: {
12
12
  [k: string]: string;
13
13
  } | undefined;
14
+ /**
15
+ * OTLP/HTTP metrics URL. Required when `shouldSendMetrics` (Send OTLP metrics) is true; ignored otherwise.
16
+ */
17
+ metricsEndpoint?: string | undefined;
18
+ /**
19
+ * Also send OTLP metrics for each delivered generation to the metrics endpoint, with the same headers.
20
+ */
21
+ shouldSendMetrics: boolean;
14
22
  };
15
23
  export type ObservabilityOtelCollectorDestination = {
16
24
  /**
@@ -11,6 +11,8 @@ import { ObservabilityFilterRulesConfig$inboundSchema, } from "./observabilityfi
11
11
  export const ObservabilityOtelCollectorDestinationConfig$inboundSchema = z.object({
12
12
  endpoint: z.string(),
13
13
  headers: z.record(z.string(), z.string()).optional(),
14
+ metricsEndpoint: z.string().optional(),
15
+ shouldSendMetrics: z.boolean().default(false),
14
16
  });
15
17
  export function observabilityOtelCollectorDestinationConfigFromJSON(jsonString) {
16
18
  return safeParse(jsonString, (x) => ObservabilityOtelCollectorDestinationConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ObservabilityOtelCollectorDestinationConfig' from JSON`);
@@ -44,6 +44,10 @@ export type OutputToolSearchServerToolItem = {
44
44
  * The deferred-tool index the router showed the model with a pre-search, listing tool sources and names. Replaying the item shows the same index.
45
45
  */
46
46
  catalogIndex?: string | undefined;
47
+ /**
48
+ * Whether the model read, after the catalog index, that the listed sources are those connected so far. Replaying the item shows that note only when this is true. Its wording follows the replaying request: it names `WaitForMcpServers` only while that request carries the tool.
49
+ */
50
+ catalogIndexNote?: boolean | undefined;
47
51
  /**
48
52
  * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
49
53
  */
@@ -102,6 +106,7 @@ export type OutputToolSearchServerToolItem$Outbound = {
102
106
  call_id?: string | undefined;
103
107
  catalog_changes?: string | undefined;
104
108
  catalog_index?: string | undefined;
109
+ catalog_index_note?: boolean | undefined;
105
110
  error?: string | undefined;
106
111
  format?: string | undefined;
107
112
  hint?: string | undefined;
@@ -57,6 +57,7 @@ export const OutputToolSearchServerToolItem$inboundSchema = z.object({
57
57
  call_id: z.string().optional(),
58
58
  catalog_changes: z.string().optional(),
59
59
  catalog_index: z.string().optional(),
60
+ catalog_index_note: z.boolean().optional(),
60
61
  error: z.string().optional(),
61
62
  format: OutputToolSearchServerToolItemFormat$inboundSchema.optional(),
62
63
  hint: z.string().optional(),
@@ -72,6 +73,7 @@ export const OutputToolSearchServerToolItem$inboundSchema = z.object({
72
73
  "call_id": "callId",
73
74
  "catalog_changes": "catalogChanges",
74
75
  "catalog_index": "catalogIndex",
76
+ "catalog_index_note": "catalogIndexNote",
75
77
  "turn_call_ids": "turnCallIds",
76
78
  });
77
79
  });
@@ -81,6 +83,7 @@ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
81
83
  callId: z.string().optional(),
82
84
  catalogChanges: z.string().optional(),
83
85
  catalogIndex: z.string().optional(),
86
+ catalogIndexNote: z.boolean().optional(),
84
87
  error: z.string().optional(),
85
88
  format: OutputToolSearchServerToolItemFormat$outboundSchema.optional(),
86
89
  hint: z.string().optional(),
@@ -96,6 +99,7 @@ export const OutputToolSearchServerToolItem$outboundSchema = z.object({
96
99
  callId: "call_id",
97
100
  catalogChanges: "catalog_changes",
98
101
  catalogIndex: "catalog_index",
102
+ catalogIndexNote: "catalog_index_note",
99
103
  turnCallIds: "turn_call_ids",
100
104
  });
101
105
  });
@@ -7,6 +7,8 @@ export declare const ResponseIncludesEnum: {
7
7
  readonly ReasoningEncryptedContent: "reasoning.encrypted_content";
8
8
  readonly OutputEncryptedContent: "output.encrypted_content";
9
9
  readonly CodeInterpreterCallOutputs: "code_interpreter_call.outputs";
10
+ readonly WebSearchCallResults: "web_search_call.results";
11
+ readonly WebSearchCallActionSources: "web_search_call.action.sources";
10
12
  };
11
13
  export type ResponseIncludesEnum = OpenEnum<typeof ResponseIncludesEnum>;
12
14
  /** @internal */
@@ -10,6 +10,8 @@ export const ResponseIncludesEnum = {
10
10
  ReasoningEncryptedContent: "reasoning.encrypted_content",
11
11
  OutputEncryptedContent: "output.encrypted_content",
12
12
  CodeInterpreterCallOutputs: "code_interpreter_call.outputs",
13
+ WebSearchCallResults: "web_search_call.results",
14
+ WebSearchCallActionSources: "web_search_call.action.sources",
13
15
  };
14
16
  /** @internal */
15
17
  export const ResponseIncludesEnum$outboundSchema = openEnums.outboundSchema(ResponseIncludesEnum);
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.95",
5
+ "version": "1.5.97",
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.95",
3
+ "version": "1.5.97",
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": [
@@ -21,8 +21,8 @@
21
21
  "license": "Apache-2.0",
22
22
  "packageManager": "pnpm@10.22.0",
23
23
  "publishConfig": {
24
- "access": "public",
25
- "provenance": true
24
+ "provenance": true,
25
+ "access": "public"
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./esm/index.js",
@@ -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:transit": "exit 0",
77
+ "typecheck": "tsc --noEmit",
78
+ "typecheck:transit": "exit 0",
76
79
  "compile": "tsc && node scripts/unbarrel-imports.js",
77
- "prepare": "npm run build",
78
- "test:watch": "vitest --watch --project unit",
79
80
  "postinstall": "node scripts/check-types.js || true",
80
81
  "test": "vitest --run --project unit",
81
- "test:e2e": "vitest --run --project e2e",
82
- "test:transit": "exit 0",
83
- "typecheck": "tsc --noEmit",
84
- "typecheck:transit": "exit 0"
82
+ "test:watch": "vitest --watch --project unit",
83
+ "prepare": "npm run build",
84
+ "test:e2e": "vitest --run --project e2e"
85
85
  },
86
86
  "peerDependencies": {
87
87