@openrouter/sdk 1.1.10 → 1.1.13
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 +1 -1
- package/esm/models/fusionanalysisresult.d.ts +1 -1
- package/esm/models/fusioncallanalysiscompletedevent.d.ts +2 -2
- package/esm/models/fusioncallanalysisinprogressevent.d.ts +10 -1
- package/esm/models/fusioncallanalysisinprogressevent.js +2 -0
- package/esm/models/fusionplugin.d.ts +7 -7
- package/esm/models/fusionplugin.js +1 -1
- package/esm/models/fusionservertoolconfig.d.ts +12 -12
- package/esm/models/fusionservertoolconfig.js +1 -1
- package/esm/models/fusionservertoolopenrouter.d.ts +1 -1
- package/esm/models/fusionsource.d.ts +1 -1
- package/esm/models/outputfusionservertoolitem.d.ts +3 -3
- package/esm/models/websearchconfig.d.ts +1 -1
- package/esm/models/websearchdomainfilter.d.ts +2 -0
- package/esm/models/websearchdomainfilter.js +4 -0
- package/esm/models/websearchservertoolconfig.d.ts +1 -1
- package/jsr.json +1 -1
- package/package.json +7 -7
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.1.
|
|
52
|
+
readonly sdkVersion: "1.1.13";
|
|
53
53
|
readonly genVersion: "2.914.0";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.1.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.1.13 2.914.0 1.0.0 @openrouter/sdk";
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -26,8 +26,8 @@ export function serverURLFromOptions(options) {
|
|
|
26
26
|
export const SDK_METADATA = {
|
|
27
27
|
language: "typescript",
|
|
28
28
|
openapiDocVersion: "1.0.0",
|
|
29
|
-
sdkVersion: "1.1.
|
|
29
|
+
sdkVersion: "1.1.13",
|
|
30
30
|
genVersion: "2.914.0",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 1.1.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 1.1.13 2.914.0 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
|
@@ -24,7 +24,7 @@ export type ChatWebSearchShorthand = {
|
|
|
24
24
|
*/
|
|
25
25
|
engine?: WebSearchEngineEnum | undefined;
|
|
26
26
|
/**
|
|
27
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI.
|
|
27
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and xAI. Cannot be used with allowed_domains.
|
|
28
28
|
*/
|
|
29
29
|
excludedDomains?: Array<string> | undefined;
|
|
30
30
|
/**
|
|
@@ -18,7 +18,7 @@ export type UniqueInsight = {
|
|
|
18
18
|
model: string;
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
|
-
* Structured analysis produced by the fusion
|
|
21
|
+
* Structured analysis produced by the fusion analyst model.
|
|
22
22
|
*/
|
|
23
23
|
export type FusionAnalysisResult = {
|
|
24
24
|
blindSpots: Array<string>;
|
|
@@ -3,11 +3,11 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
import { FusionAnalysisResult } from "./fusionanalysisresult.js";
|
|
5
5
|
/**
|
|
6
|
-
* Emitted when the fusion
|
|
6
|
+
* Emitted when the fusion analyst completes with the structured analysis.
|
|
7
7
|
*/
|
|
8
8
|
export type FusionCallAnalysisCompletedEvent = {
|
|
9
9
|
/**
|
|
10
|
-
* Structured analysis produced by the fusion
|
|
10
|
+
* Structured analysis produced by the fusion analyst model.
|
|
11
11
|
*/
|
|
12
12
|
analysis: FusionAnalysisResult;
|
|
13
13
|
itemId: string;
|
|
@@ -2,10 +2,19 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
/**
|
|
5
|
-
* Emitted when the fusion
|
|
5
|
+
* Emitted when the fusion analyst starts producing the structured analysis.
|
|
6
6
|
*/
|
|
7
7
|
export type FusionCallAnalysisInProgressEvent = {
|
|
8
|
+
/**
|
|
9
|
+
* Slug of the model producing the structured analysis.
|
|
10
|
+
*/
|
|
11
|
+
analystModel: string;
|
|
8
12
|
itemId: string;
|
|
13
|
+
/**
|
|
14
|
+
* Deprecated alias of `analyst_model`, kept so existing consumers keep working. Always carries the same value. Use `analyst_model`.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
17
|
+
*/
|
|
9
18
|
judgeModel: string;
|
|
10
19
|
outputIndex: number;
|
|
11
20
|
sequenceNumber: number;
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const FusionCallAnalysisInProgressEvent$inboundSchema = z.object({
|
|
10
|
+
analyst_model: z.string(),
|
|
10
11
|
item_id: z.string(),
|
|
11
12
|
judge_model: z.string(),
|
|
12
13
|
output_index: z.int(),
|
|
@@ -14,6 +15,7 @@ export const FusionCallAnalysisInProgressEvent$inboundSchema = z.object({
|
|
|
14
15
|
type: z.literal("response.fusion_call.analysis.in_progress"),
|
|
15
16
|
}).transform((v) => {
|
|
16
17
|
return remap$(v, {
|
|
18
|
+
"analyst_model": "analystModel",
|
|
17
19
|
"item_id": "itemId",
|
|
18
20
|
"judge_model": "judgeModel",
|
|
19
21
|
"output_index": "outputIndex",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
/**
|
|
4
|
-
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and
|
|
4
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PresetEnum: {
|
|
7
7
|
readonly GeneralHigh: "general-high";
|
|
@@ -9,7 +9,7 @@ export declare const PresetEnum: {
|
|
|
9
9
|
readonly GeneralFast: "general-fast";
|
|
10
10
|
};
|
|
11
11
|
/**
|
|
12
|
-
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and
|
|
12
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
13
13
|
*/
|
|
14
14
|
export type PresetEnum = OpenEnum<typeof PresetEnum>;
|
|
15
15
|
export type Parameters2 = string | number | boolean;
|
|
@@ -33,7 +33,7 @@ export type FusionPluginTool = {
|
|
|
33
33
|
};
|
|
34
34
|
export type FusionPlugin = {
|
|
35
35
|
/**
|
|
36
|
-
* Slugs of models to run in parallel as the "expert panel" the
|
|
36
|
+
* Slugs of models to run in parallel as the "expert panel" the analyst analyzes. Each model receives the same user prompt with web_search + web_fetch enabled. Capped at 8 models to bound cost amplification. When omitted, defaults to the Quality preset from the /labs/fusion UI (~anthropic/claude-opus-latest, ~openai/gpt-latest, ~google/gemini-pro-latest).
|
|
37
37
|
*/
|
|
38
38
|
analysisModels?: Array<string> | undefined;
|
|
39
39
|
/**
|
|
@@ -42,19 +42,19 @@ export type FusionPlugin = {
|
|
|
42
42
|
enabled?: boolean | undefined;
|
|
43
43
|
id: "fusion";
|
|
44
44
|
/**
|
|
45
|
-
* Maximum number of tool-calling steps each panelist (analysis model) and the
|
|
45
|
+
* Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.
|
|
46
46
|
*/
|
|
47
47
|
maxToolCalls?: number | undefined;
|
|
48
48
|
/**
|
|
49
|
-
* Slug of the model that performs both the
|
|
49
|
+
* Slug of the model that performs both the analyst step (with web_search + web_fetch) and the final synthesis. When omitted, defaults to the first model in the Quality preset.
|
|
50
50
|
*/
|
|
51
51
|
model?: string | undefined;
|
|
52
52
|
/**
|
|
53
|
-
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and
|
|
53
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
54
54
|
*/
|
|
55
55
|
preset?: PresetEnum | undefined;
|
|
56
56
|
/**
|
|
57
|
-
* Server tools available to panelist and
|
|
57
|
+
* Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
|
|
58
58
|
*/
|
|
59
59
|
tools?: Array<FusionPluginTool> | undefined;
|
|
60
60
|
};
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
/**
|
|
9
|
-
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and
|
|
9
|
+
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and analyst model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
10
10
|
*/
|
|
11
11
|
export const PresetEnum = {
|
|
12
12
|
GeneralHigh: "general-high",
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
4
4
|
/**
|
|
5
|
-
* Reasoning effort level for panelist and
|
|
5
|
+
* Reasoning effort level for panelist and analyst inner calls.
|
|
6
6
|
*/
|
|
7
7
|
export declare const FusionServerToolConfigEffort: {
|
|
8
8
|
readonly Max: "max";
|
|
@@ -14,19 +14,19 @@ export declare const FusionServerToolConfigEffort: {
|
|
|
14
14
|
readonly None: "none";
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Reasoning effort level for panelist and
|
|
17
|
+
* Reasoning effort level for panelist and analyst inner calls.
|
|
18
18
|
*/
|
|
19
19
|
export type FusionServerToolConfigEffort = OpenEnum<typeof FusionServerToolConfigEffort>;
|
|
20
20
|
/**
|
|
21
|
-
* Reasoning configuration forwarded to panelist and
|
|
21
|
+
* Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.
|
|
22
22
|
*/
|
|
23
23
|
export type FusionServerToolConfigReasoning = {
|
|
24
24
|
/**
|
|
25
|
-
* Reasoning effort level for panelist and
|
|
25
|
+
* Reasoning effort level for panelist and analyst inner calls.
|
|
26
26
|
*/
|
|
27
27
|
effort?: FusionServerToolConfigEffort | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* Maximum number of reasoning tokens each panelist and
|
|
29
|
+
* Maximum number of reasoning tokens each panelist and analyst model may use. Helps bound cost when models allocate too much budget to chain-of-thought.
|
|
30
30
|
*/
|
|
31
31
|
maxTokens?: number | undefined;
|
|
32
32
|
};
|
|
@@ -47,7 +47,7 @@ export type FusionServerToolConfigTool = {
|
|
|
47
47
|
*/
|
|
48
48
|
export type FusionServerToolConfig = {
|
|
49
49
|
/**
|
|
50
|
-
* Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then
|
|
50
|
+
* Slugs of models to run in parallel as the analysis panel. Each model receives the user prompt with openrouter:web_search and openrouter:web_fetch enabled, then an analyst model summarizes the collective output into structured analysis JSON. Capped at 8 models to bound cost amplification. Defaults to the Quality preset from /labs/fusion.
|
|
51
51
|
*/
|
|
52
52
|
analysisModels?: Array<string> | undefined;
|
|
53
53
|
/**
|
|
@@ -55,27 +55,27 @@ export type FusionServerToolConfig = {
|
|
|
55
55
|
*/
|
|
56
56
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
57
57
|
/**
|
|
58
|
-
* Maximum number of output tokens (including reasoning tokens) each panelist and the
|
|
58
|
+
* Maximum number of output tokens (including reasoning tokens) each panelist and the analyst model may produce per inner call. Controls the total output budget so reasoning-heavy models like GPT-5.5 do not exhaust their token allowance before producing visible text. When omitted, panelists default to 32000 and the analyst to 20000.
|
|
59
59
|
*/
|
|
60
60
|
maxCompletionTokens?: number | undefined;
|
|
61
61
|
/**
|
|
62
|
-
* Maximum number of tool-calling steps each panelist (analysis model) and the
|
|
62
|
+
* Maximum number of tool-calling steps each panelist (analysis model) and the analyst model may take during their agentic web-research loop. Models with web_search/web_fetch enabled iterate until they produce a text response or hit this ceiling. Defaults to 8. Capped at 16.
|
|
63
63
|
*/
|
|
64
64
|
maxToolCalls?: number | undefined;
|
|
65
65
|
/**
|
|
66
|
-
* Slug of the
|
|
66
|
+
* Slug of the analyst model that produces the structured analysis JSON. Defaults to the model used in the outer API request.
|
|
67
67
|
*/
|
|
68
68
|
model?: string | undefined;
|
|
69
69
|
/**
|
|
70
|
-
* Reasoning configuration forwarded to panelist and
|
|
70
|
+
* Reasoning configuration forwarded to panelist and analyst inner calls. Use this to control reasoning effort and token budget for models that support extended thinking.
|
|
71
71
|
*/
|
|
72
72
|
reasoning?: FusionServerToolConfigReasoning | undefined;
|
|
73
73
|
/**
|
|
74
|
-
* Temperature forwarded to panelist inner calls. The
|
|
74
|
+
* Temperature forwarded to panelist inner calls. The analyst always runs at temperature 0 regardless of this value. When omitted, the provider's default applies.
|
|
75
75
|
*/
|
|
76
76
|
temperature?: number | undefined;
|
|
77
77
|
/**
|
|
78
|
-
* Server tools available to panelist and
|
|
78
|
+
* Server tools available to panelist and analyst inner calls. Each entry uses the same `{ type, parameters? }` shorthand as the outer Chat Completions request. When omitted, defaults to `[{ type: "openrouter:web_search" }, { type: "openrouter:web_fetch" }]`. Pass an empty array to disable tools entirely (panelists answer from parametric knowledge only).
|
|
79
79
|
*/
|
|
80
80
|
tools?: Array<FusionServerToolConfigTool> | undefined;
|
|
81
81
|
};
|
|
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
9
9
|
/**
|
|
10
|
-
* Reasoning effort level for panelist and
|
|
10
|
+
* Reasoning effort level for panelist and analyst inner calls.
|
|
11
11
|
*/
|
|
12
12
|
export const FusionServerToolConfigEffort = {
|
|
13
13
|
Max: "max",
|
|
@@ -6,7 +6,7 @@ export declare const FusionServerToolOpenRouterType: {
|
|
|
6
6
|
};
|
|
7
7
|
export type FusionServerToolOpenRouterType = ClosedEnum<typeof FusionServerToolOpenRouterType>;
|
|
8
8
|
/**
|
|
9
|
-
* OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks
|
|
9
|
+
* OpenRouter built-in server tool: fans out the user prompt to a panel of analysis models, then asks an analyst model to summarize their collective output as structured JSON the outer model can synthesize from.
|
|
10
10
|
*/
|
|
11
11
|
export type FusionServerToolOpenRouter = {
|
|
12
12
|
/**
|
|
@@ -32,7 +32,7 @@ export type OutputFusionServerToolItemType = ClosedEnum<typeof OutputFusionServe
|
|
|
32
32
|
*/
|
|
33
33
|
export type OutputFusionServerToolItem = {
|
|
34
34
|
/**
|
|
35
|
-
* Structured analysis produced by the fusion
|
|
35
|
+
* Structured analysis produced by the fusion analyst model.
|
|
36
36
|
*/
|
|
37
37
|
analysis?: FusionAnalysisResult | undefined;
|
|
38
38
|
/**
|
|
@@ -44,7 +44,7 @@ export type OutputFusionServerToolItem = {
|
|
|
44
44
|
*/
|
|
45
45
|
failedModels?: Array<FailedModel> | undefined;
|
|
46
46
|
/**
|
|
47
|
-
* Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion.
|
|
47
|
+
* Typed failure reason when the fusion run failed. Possible values include: all_panels_failed, insufficient_credits, rate_limited, judge_not_valid_json, judge_schema_mismatch, judge_upstream_error, judge_empty_completion. The four analysis-stage codes keep their pre-rename `judge_` spelling so existing consumers keep matching.
|
|
48
48
|
*/
|
|
49
49
|
failureReason?: string | undefined;
|
|
50
50
|
id?: string | undefined;
|
|
@@ -53,7 +53,7 @@ export type OutputFusionServerToolItem = {
|
|
|
53
53
|
*/
|
|
54
54
|
responses?: Array<ResponseT> | undefined;
|
|
55
55
|
/**
|
|
56
|
-
* Web pages the analysis panels and
|
|
56
|
+
* Web pages the analysis panels and analyst retrieved via web search during this fusion run, deduplicated by URL across the whole run. Present when at least one model cited a source.
|
|
57
57
|
*/
|
|
58
58
|
sources?: Array<FusionSource> | undefined;
|
|
59
59
|
status: ToolCallStatus;
|
|
@@ -12,7 +12,7 @@ export type WebSearchConfig = {
|
|
|
12
12
|
*/
|
|
13
13
|
engine?: WebSearchEngineEnum | undefined;
|
|
14
14
|
/**
|
|
15
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI.
|
|
15
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and xAI. Cannot be used with allowed_domains.
|
|
16
16
|
*/
|
|
17
17
|
excludedDomains?: Array<string> | undefined;
|
|
18
18
|
/**
|
|
@@ -3,6 +3,7 @@ import { Result as SafeParseResult } from "../types/fp.js";
|
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type WebSearchDomainFilter = {
|
|
5
5
|
allowedDomains?: Array<string> | null | undefined;
|
|
6
|
+
blockedDomains?: Array<string> | null | undefined;
|
|
6
7
|
excludedDomains?: Array<string> | null | undefined;
|
|
7
8
|
};
|
|
8
9
|
/** @internal */
|
|
@@ -10,6 +11,7 @@ export declare const WebSearchDomainFilter$inboundSchema: z.ZodType<WebSearchDom
|
|
|
10
11
|
/** @internal */
|
|
11
12
|
export type WebSearchDomainFilter$Outbound = {
|
|
12
13
|
allowed_domains?: Array<string> | null | undefined;
|
|
14
|
+
blocked_domains?: Array<string> | null | undefined;
|
|
13
15
|
excluded_domains?: Array<string> | null | undefined;
|
|
14
16
|
};
|
|
15
17
|
/** @internal */
|
|
@@ -8,20 +8,24 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
/** @internal */
|
|
9
9
|
export const WebSearchDomainFilter$inboundSchema = z.object({
|
|
10
10
|
allowed_domains: z.nullable(z.array(z.string())).optional(),
|
|
11
|
+
blocked_domains: z.nullable(z.array(z.string())).optional(),
|
|
11
12
|
excluded_domains: z.nullable(z.array(z.string())).optional(),
|
|
12
13
|
}).transform((v) => {
|
|
13
14
|
return remap$(v, {
|
|
14
15
|
"allowed_domains": "allowedDomains",
|
|
16
|
+
"blocked_domains": "blockedDomains",
|
|
15
17
|
"excluded_domains": "excludedDomains",
|
|
16
18
|
});
|
|
17
19
|
});
|
|
18
20
|
/** @internal */
|
|
19
21
|
export const WebSearchDomainFilter$outboundSchema = z.object({
|
|
20
22
|
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
23
|
+
blockedDomains: z.nullable(z.array(z.string())).optional(),
|
|
21
24
|
excludedDomains: z.nullable(z.array(z.string())).optional(),
|
|
22
25
|
}).transform((v) => {
|
|
23
26
|
return remap$(v, {
|
|
24
27
|
allowedDomains: "allowed_domains",
|
|
28
|
+
blockedDomains: "blocked_domains",
|
|
25
29
|
excludedDomains: "excluded_domains",
|
|
26
30
|
});
|
|
27
31
|
});
|
|
@@ -15,7 +15,7 @@ export type WebSearchServerToolConfig = {
|
|
|
15
15
|
*/
|
|
16
16
|
engine?: WebSearchEngineEnum | undefined;
|
|
17
17
|
/**
|
|
18
|
-
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI.
|
|
18
|
+
* Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, OpenAI, and xAI. Cannot be used with allowed_domains.
|
|
19
19
|
*/
|
|
20
20
|
excludedDomains?: Array<string> | undefined;
|
|
21
21
|
/**
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
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
|
-
"
|
|
25
|
-
"
|
|
24
|
+
"access": "public",
|
|
25
|
+
"provenance": true
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
28
|
"main": "./esm/index.js",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
76
|
"compile": "tsc",
|
|
77
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
78
|
+
"prepare": "npm run build",
|
|
78
79
|
"test": "vitest --run --project unit",
|
|
79
|
-
"test:transit": "exit 0",
|
|
80
80
|
"test:watch": "vitest --watch --project unit",
|
|
81
|
-
"typecheck:transit": "exit 0",
|
|
82
|
-
"prepare": "npm run build",
|
|
83
81
|
"test:e2e": "vitest --run --project e2e",
|
|
84
|
-
"
|
|
82
|
+
"test:transit": "exit 0",
|
|
83
|
+
"typecheck": "tsc --noEmit",
|
|
84
|
+
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|