@openrouter/sdk 1.5.124 → 1.5.125
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.
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/chatwebsearchshorthand.d.ts +3 -3
- package/esm/models/legacywebsearchservertool.d.ts +1 -1
- package/esm/models/preview20250311websearchservertool.d.ts +1 -1
- package/esm/models/previewwebsearchservertool.d.ts +1 -1
- package/esm/models/websearchconfig.d.ts +3 -3
- package/esm/models/websearchplugin.d.ts +1 -1
- package/esm/models/websearchservertool.d.ts +1 -1
- package/esm/models/websearchservertoolconfig.d.ts +3 -3
- package/esm/models/xsearchoptions.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -6
package/esm/lib/config.d.ts
CHANGED
|
@@ -49,8 +49,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
49
49
|
export declare const SDK_METADATA: {
|
|
50
50
|
readonly language: "typescript";
|
|
51
51
|
readonly openapiDocVersion: "1.0.0";
|
|
52
|
-
readonly sdkVersion: "1.5.
|
|
52
|
+
readonly sdkVersion: "1.5.125";
|
|
53
53
|
readonly genVersion: "2.960.8";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.5.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.125 2.960.8 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
|
|
|
25
25
|
export const SDK_METADATA = {
|
|
26
26
|
language: "typescript",
|
|
27
27
|
openapiDocVersion: "1.0.0",
|
|
28
|
-
sdkVersion: "1.5.
|
|
28
|
+
sdkVersion: "1.5.125",
|
|
29
29
|
genVersion: "2.960.8",
|
|
30
|
-
userAgent: "speakeasy-sdk/typescript 1.5.
|
|
30
|
+
userAgent: "speakeasy-sdk/typescript 1.5.125 2.960.8 1.0.0 @openrouter/sdk",
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=config.js.map
|
|
@@ -18,7 +18,7 @@ export type ChatWebSearchShorthandType = OpenEnum<typeof ChatWebSearchShorthandT
|
|
|
18
18
|
*/
|
|
19
19
|
export type ChatWebSearchShorthand = {
|
|
20
20
|
/**
|
|
21
|
-
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI,
|
|
21
|
+
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXSI). Cannot be used with excluded_domains.
|
|
22
22
|
*/
|
|
23
23
|
allowedDomains?: Array<string> | undefined;
|
|
24
24
|
/**
|
|
@@ -26,7 +26,7 @@ export type ChatWebSearchShorthand = {
|
|
|
26
26
|
*/
|
|
27
27
|
engine?: WebSearchEngineEnum | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and
|
|
29
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXSI. Cannot be used with allowed_domains.
|
|
30
30
|
*/
|
|
31
31
|
excludedDomains?: Array<string> | undefined;
|
|
32
32
|
/**
|
|
@@ -60,7 +60,7 @@ export type ChatWebSearchShorthand = {
|
|
|
60
60
|
*/
|
|
61
61
|
userLocation?: WebSearchUserLocationServerTool | undefined;
|
|
62
62
|
/**
|
|
63
|
-
* Enable
|
|
63
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
64
64
|
*/
|
|
65
65
|
xSearch?: XSearchOptions | undefined;
|
|
66
66
|
};
|
|
@@ -43,7 +43,7 @@ export type LegacyWebSearchServerTool = {
|
|
|
43
43
|
*/
|
|
44
44
|
userLocation?: WebSearchUserLocation | null | undefined;
|
|
45
45
|
/**
|
|
46
|
-
* Enable
|
|
46
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
47
47
|
*/
|
|
48
48
|
xSearch?: XSearchOptions | undefined;
|
|
49
49
|
};
|
|
@@ -40,7 +40,7 @@ export type Preview20250311WebSearchServerTool = {
|
|
|
40
40
|
type: Preview20250311WebSearchServerToolType;
|
|
41
41
|
userLocation?: PreviewWebSearchUserLocation | null | undefined;
|
|
42
42
|
/**
|
|
43
|
-
* Enable
|
|
43
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
44
44
|
*/
|
|
45
45
|
xSearch?: XSearchOptions | undefined;
|
|
46
46
|
};
|
|
@@ -40,7 +40,7 @@ export type PreviewWebSearchServerTool = {
|
|
|
40
40
|
type: PreviewWebSearchServerToolType;
|
|
41
41
|
userLocation?: PreviewWebSearchUserLocation | null | undefined;
|
|
42
42
|
/**
|
|
43
|
-
* Enable
|
|
43
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
44
44
|
*/
|
|
45
45
|
xSearch?: XSearchOptions | undefined;
|
|
46
46
|
};
|
|
@@ -6,7 +6,7 @@ import { WebSearchUserLocationServerTool, WebSearchUserLocationServerTool$Outbou
|
|
|
6
6
|
import { XSearchOptions, XSearchOptions$Outbound } from "./xsearchoptions.js";
|
|
7
7
|
export type WebSearchConfig = {
|
|
8
8
|
/**
|
|
9
|
-
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI,
|
|
9
|
+
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXSI). Cannot be used with excluded_domains.
|
|
10
10
|
*/
|
|
11
11
|
allowedDomains?: Array<string> | undefined;
|
|
12
12
|
/**
|
|
@@ -14,7 +14,7 @@ export type WebSearchConfig = {
|
|
|
14
14
|
*/
|
|
15
15
|
engine?: WebSearchEngineEnum | undefined;
|
|
16
16
|
/**
|
|
17
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and
|
|
17
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXSI. Cannot be used with allowed_domains.
|
|
18
18
|
*/
|
|
19
19
|
excludedDomains?: Array<string> | undefined;
|
|
20
20
|
/**
|
|
@@ -46,7 +46,7 @@ export type WebSearchConfig = {
|
|
|
46
46
|
*/
|
|
47
47
|
userLocation?: WebSearchUserLocationServerTool | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* Enable
|
|
49
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
50
50
|
*/
|
|
51
51
|
xSearch?: XSearchOptions | undefined;
|
|
52
52
|
};
|
|
@@ -47,7 +47,7 @@ export type WebSearchPlugin = {
|
|
|
47
47
|
searchPrompt?: string | undefined;
|
|
48
48
|
userLocation?: UserLocation | null | undefined;
|
|
49
49
|
/**
|
|
50
|
-
* Enable
|
|
50
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
51
51
|
*/
|
|
52
52
|
xSearch?: XSearchOptions | undefined;
|
|
53
53
|
};
|
|
@@ -43,7 +43,7 @@ export type WebSearchServerTool = {
|
|
|
43
43
|
*/
|
|
44
44
|
userLocation?: WebSearchUserLocation | null | undefined;
|
|
45
45
|
/**
|
|
46
|
-
* Enable
|
|
46
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
47
47
|
*/
|
|
48
48
|
xSearch?: XSearchOptions | undefined;
|
|
49
49
|
};
|
|
@@ -9,7 +9,7 @@ import { XSearchOptions, XSearchOptions$Outbound } from "./xsearchoptions.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export type WebSearchServerToolConfig = {
|
|
11
11
|
/**
|
|
12
|
-
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI,
|
|
12
|
+
* Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, SpaceXSI). Cannot be used with excluded_domains.
|
|
13
13
|
*/
|
|
14
14
|
allowedDomains?: Array<string> | undefined;
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ export type WebSearchServerToolConfig = {
|
|
|
17
17
|
*/
|
|
18
18
|
engine?: WebSearchEngineEnum | undefined;
|
|
19
19
|
/**
|
|
20
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and
|
|
20
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and SpaceXSI. Cannot be used with allowed_domains.
|
|
21
21
|
*/
|
|
22
22
|
excludedDomains?: Array<string> | undefined;
|
|
23
23
|
/**
|
|
@@ -49,7 +49,7 @@ export type WebSearchServerToolConfig = {
|
|
|
49
49
|
*/
|
|
50
50
|
userLocation?: WebSearchUserLocationServerTool | undefined;
|
|
51
51
|
/**
|
|
52
|
-
* Enable
|
|
52
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
53
53
|
*/
|
|
54
54
|
xSearch?: XSearchOptions | undefined;
|
|
55
55
|
};
|
|
@@ -3,7 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { RFCDate } from "../types/rfcdate.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
/**
|
|
6
|
-
* Enable
|
|
6
|
+
* Enable SpaceXSI X (Twitter) search alongside native web search, with optional filters. Only applies to SpaceXSI endpoints with native search; omit to search the web only. X search is billed separately by SpaceXSI, per post and per user profile fetched.
|
|
7
7
|
*/
|
|
8
8
|
export type XSearchOptions = {
|
|
9
9
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.125",
|
|
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
-
"prepare": "npm run build",
|
|
78
|
-
"test:watch": "vitest --watch --project unit",
|
|
79
|
-
"typecheck:transit": "exit 0",
|
|
80
76
|
"compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
|
|
77
|
+
"prepare": "npm run build",
|
|
81
78
|
"test": "vitest --run --project unit",
|
|
79
|
+
"typecheck": "tsc --noEmit",
|
|
80
|
+
"typecheck:transit": "exit 0",
|
|
81
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
82
82
|
"test:e2e": "vitest --run --project e2e",
|
|
83
83
|
"test:transit": "exit 0",
|
|
84
|
-
"
|
|
84
|
+
"test:watch": "vitest --watch --project unit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
|