@openrouter/sdk 0.12.8 → 0.12.10
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/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/esm/models/outputitems.d.ts +2 -1
- package/esm/models/outputitems.js +2 -0
- package/esm/models/outputsearchmodelsservertoolitem.d.ts +21 -0
- package/esm/models/outputsearchmodelsservertoolitem.js +19 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
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: "0.12.
|
|
52
|
+
readonly sdkVersion: "0.12.10";
|
|
53
53
|
readonly genVersion: "2.879.1";
|
|
54
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.12.
|
|
54
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.12.10 2.879.1 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: "0.12.
|
|
29
|
+
sdkVersion: "0.12.10",
|
|
30
30
|
genVersion: "2.879.1",
|
|
31
|
-
userAgent: "speakeasy-sdk/typescript 0.12.
|
|
31
|
+
userAgent: "speakeasy-sdk/typescript 0.12.10 2.879.1 1.0.0 @openrouter/sdk",
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=config.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ export * from "./outputmessageitem.js";
|
|
|
167
167
|
export * from "./outputmodality.js";
|
|
168
168
|
export * from "./outputmodalityenum.js";
|
|
169
169
|
export * from "./outputreasoningitem.js";
|
|
170
|
+
export * from "./outputsearchmodelsservertoolitem.js";
|
|
170
171
|
export * from "./outputtexteditorservertoolitem.js";
|
|
171
172
|
export * from "./outputtoolsearchservertoolitem.js";
|
|
172
173
|
export * from "./outputwebfetchservertoolitem.js";
|
package/esm/models/index.js
CHANGED
|
@@ -171,6 +171,7 @@ export * from "./outputmessageitem.js";
|
|
|
171
171
|
export * from "./outputmodality.js";
|
|
172
172
|
export * from "./outputmodalityenum.js";
|
|
173
173
|
export * from "./outputreasoningitem.js";
|
|
174
|
+
export * from "./outputsearchmodelsservertoolitem.js";
|
|
174
175
|
export * from "./outputtexteditorservertoolitem.js";
|
|
175
176
|
export * from "./outputtoolsearchservertoolitem.js";
|
|
176
177
|
export * from "./outputwebfetchservertoolitem.js";
|
|
@@ -18,6 +18,7 @@ import { OutputMcpServerToolItem } from "./outputmcpservertoolitem.js";
|
|
|
18
18
|
import { OutputMemoryServerToolItem } from "./outputmemoryservertoolitem.js";
|
|
19
19
|
import { OutputMessageItem } from "./outputmessageitem.js";
|
|
20
20
|
import { OutputReasoningItem } from "./outputreasoningitem.js";
|
|
21
|
+
import { OutputSearchModelsServerToolItem } from "./outputsearchmodelsservertoolitem.js";
|
|
21
22
|
import { OutputTextEditorServerToolItem } from "./outputtexteditorservertoolitem.js";
|
|
22
23
|
import { OutputToolSearchServerToolItem } from "./outputtoolsearchservertoolitem.js";
|
|
23
24
|
import { OutputWebFetchServerToolItem } from "./outputwebfetchservertoolitem.js";
|
|
@@ -34,7 +35,7 @@ export type OutputItems = OutputCodeInterpreterCallItem | OutputComputerCallItem
|
|
|
34
35
|
type: "image_generation_call";
|
|
35
36
|
}) | OutputMessageItem | OutputApplyPatchServerToolItem | OutputBashServerToolItem | OutputBrowserUseServerToolItem | OutputCodeInterpreterServerToolItem | (OutputDatetimeItem & {
|
|
36
37
|
type: "openrouter:datetime";
|
|
37
|
-
}) | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputMcpServerToolItem | OutputMemoryServerToolItem | OutputTextEditorServerToolItem | OutputToolSearchServerToolItem | OutputWebFetchServerToolItem | (OutputWebSearchServerToolItem & {
|
|
38
|
+
}) | OutputSearchModelsServerToolItem | OutputFileSearchServerToolItem | OutputImageGenerationServerToolItem | OutputMcpServerToolItem | OutputMemoryServerToolItem | OutputTextEditorServerToolItem | OutputToolSearchServerToolItem | OutputWebFetchServerToolItem | (OutputWebSearchServerToolItem & {
|
|
38
39
|
type: "openrouter:web_search";
|
|
39
40
|
}) | OutputReasoningItem | (OutputWebSearchCallItem & {
|
|
40
41
|
type: "web_search_call";
|
|
@@ -21,6 +21,7 @@ import { OutputMcpServerToolItem$inboundSchema, } from "./outputmcpservertoolite
|
|
|
21
21
|
import { OutputMemoryServerToolItem$inboundSchema, } from "./outputmemoryservertoolitem.js";
|
|
22
22
|
import { OutputMessageItem$inboundSchema, } from "./outputmessageitem.js";
|
|
23
23
|
import { OutputReasoningItem$inboundSchema, } from "./outputreasoningitem.js";
|
|
24
|
+
import { OutputSearchModelsServerToolItem$inboundSchema, } from "./outputsearchmodelsservertoolitem.js";
|
|
24
25
|
import { OutputTextEditorServerToolItem$inboundSchema, } from "./outputtexteditorservertoolitem.js";
|
|
25
26
|
import { OutputToolSearchServerToolItem$inboundSchema, } from "./outputtoolsearchservertoolitem.js";
|
|
26
27
|
import { OutputWebFetchServerToolItem$inboundSchema, } from "./outputwebfetchservertoolitem.js";
|
|
@@ -39,6 +40,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
|
39
40
|
["openrouter:browser_use"]: OutputBrowserUseServerToolItem$inboundSchema,
|
|
40
41
|
["openrouter:code_interpreter"]: OutputCodeInterpreterServerToolItem$inboundSchema,
|
|
41
42
|
["openrouter:datetime"]: OutputDatetimeItem$inboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
43
|
+
["openrouter:experimental__search_models"]: OutputSearchModelsServerToolItem$inboundSchema,
|
|
42
44
|
["openrouter:file_search"]: OutputFileSearchServerToolItem$inboundSchema,
|
|
43
45
|
["openrouter:image_generation"]: OutputImageGenerationServerToolItem$inboundSchema,
|
|
44
46
|
["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
5
|
+
/**
|
|
6
|
+
* An openrouter:experimental__search_models server tool output item
|
|
7
|
+
*/
|
|
8
|
+
export type OutputSearchModelsServerToolItem = {
|
|
9
|
+
/**
|
|
10
|
+
* The JSON arguments submitted to the search tool (e.g. {"query":"Claude"})
|
|
11
|
+
*/
|
|
12
|
+
arguments?: string | undefined;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
query?: string | undefined;
|
|
15
|
+
status: ToolCallStatus;
|
|
16
|
+
type: "openrouter:experimental__search_models";
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const OutputSearchModelsServerToolItem$inboundSchema: z.ZodType<OutputSearchModelsServerToolItem, unknown>;
|
|
20
|
+
export declare function outputSearchModelsServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputSearchModelsServerToolItem, SDKValidationError>;
|
|
21
|
+
//# sourceMappingURL=outputsearchmodelsservertoolitem.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e7518c133cf6
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const OutputSearchModelsServerToolItem$inboundSchema = z.object({
|
|
10
|
+
arguments: z.string().optional(),
|
|
11
|
+
id: z.string().optional(),
|
|
12
|
+
query: z.string().optional(),
|
|
13
|
+
status: ToolCallStatus$inboundSchema,
|
|
14
|
+
type: z.literal("openrouter:experimental__search_models"),
|
|
15
|
+
});
|
|
16
|
+
export function outputSearchModelsServerToolItemFromJSON(jsonString) {
|
|
17
|
+
return safeParse(jsonString, (x) => OutputSearchModelsServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputSearchModelsServerToolItem' from JSON`);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=outputsearchmodelsservertoolitem.js.map
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.10",
|
|
4
4
|
"author": "OpenRouter",
|
|
5
5
|
"description": "The OpenRouter TypeScript SDK is a type-safe toolkit for building AI applications with access to 300+ language models through a unified API.",
|
|
6
6
|
"keywords": [
|
|
@@ -69,15 +69,15 @@
|
|
|
69
69
|
"lint": "eslint --cache --max-warnings=0 src",
|
|
70
70
|
"build": "tsc",
|
|
71
71
|
"prepublishOnly": "npm run build",
|
|
72
|
-
"
|
|
72
|
+
"test:watch": "vitest --watch --project unit",
|
|
73
73
|
"prepare": "npm run build",
|
|
74
74
|
"test:e2e": "vitest --run --project e2e",
|
|
75
|
-
"
|
|
75
|
+
"typecheck": "tsc --noEmit",
|
|
76
76
|
"typecheck:transit": "exit 0",
|
|
77
77
|
"compile": "tsc",
|
|
78
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
78
79
|
"test": "vitest --run --project unit",
|
|
79
|
-
"test:
|
|
80
|
-
"typecheck": "tsc --noEmit"
|
|
80
|
+
"test:transit": "exit 0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {},
|
|
83
83
|
"devDependencies": {
|