@openrouter/sdk 1.2.45 → 1.2.46
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/failabletoolcallstatus.d.ts +14 -0
- package/esm/models/failabletoolcallstatus.js +16 -0
- package/esm/models/index.d.ts +1 -0
- package/esm/models/index.js +1 -0
- package/esm/models/outputadvisorservertoolitem.d.ts +3 -3
- package/esm/models/outputadvisorservertoolitem.js +3 -3
- package/esm/models/outputsubagentservertoolitem.d.ts +3 -3
- package/esm/models/outputsubagentservertoolitem.js +3 -3
- package/jsr.json +1 -1
- package/package.json +7 -7
package/esm/lib/config.d.ts
CHANGED
|
@@ -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.2.
|
|
53
|
+
readonly sdkVersion: "1.2.46";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.46 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.2.
|
|
32
|
+
sdkVersion: "1.2.46",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.46 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
export declare const FailableToolCallStatus: {
|
|
4
|
+
readonly InProgress: "in_progress";
|
|
5
|
+
readonly Completed: "completed";
|
|
6
|
+
readonly Incomplete: "incomplete";
|
|
7
|
+
readonly Failed: "failed";
|
|
8
|
+
};
|
|
9
|
+
export type FailableToolCallStatus = OpenEnum<typeof FailableToolCallStatus>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const FailableToolCallStatus$inboundSchema: z.ZodType<FailableToolCallStatus, unknown>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const FailableToolCallStatus$outboundSchema: z.ZodType<string, FailableToolCallStatus>;
|
|
14
|
+
//# sourceMappingURL=failabletoolcallstatus.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 142c03b0af9f
|
|
4
|
+
*/
|
|
5
|
+
import * as openEnums from "../types/enums.js";
|
|
6
|
+
export const FailableToolCallStatus = {
|
|
7
|
+
InProgress: "in_progress",
|
|
8
|
+
Completed: "completed",
|
|
9
|
+
Incomplete: "incomplete",
|
|
10
|
+
Failed: "failed",
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const FailableToolCallStatus$inboundSchema = openEnums.inboundSchema(FailableToolCallStatus);
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const FailableToolCallStatus$outboundSchema = openEnums.outboundSchema(FailableToolCallStatus);
|
|
16
|
+
//# sourceMappingURL=failabletoolcallstatus.js.map
|
package/esm/models/index.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ export * from "./endpointsmetadata.js";
|
|
|
201
201
|
export * from "./endpointstatus.js";
|
|
202
202
|
export * from "./enumcapability.js";
|
|
203
203
|
export * from "./errorevent.js";
|
|
204
|
+
export * from "./failabletoolcallstatus.js";
|
|
204
205
|
export * from "./filecitation.js";
|
|
205
206
|
export * from "./filedeleteresponse.js";
|
|
206
207
|
export * from "./filelistresponse.js";
|
package/esm/models/index.js
CHANGED
|
@@ -205,6 +205,7 @@ export * from "./endpointsmetadata.js";
|
|
|
205
205
|
export * from "./endpointstatus.js";
|
|
206
206
|
export * from "./enumcapability.js";
|
|
207
207
|
export * from "./errorevent.js";
|
|
208
|
+
export * from "./failabletoolcallstatus.js";
|
|
208
209
|
export * from "./filecitation.js";
|
|
209
210
|
export * from "./filedeleteresponse.js";
|
|
210
211
|
export * from "./filelistresponse.js";
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
6
|
export declare const OutputAdvisorServerToolItemType: {
|
|
7
7
|
readonly OpenrouterAdvisor: "openrouter:advisor";
|
|
8
8
|
};
|
|
@@ -16,7 +16,7 @@ export type OutputAdvisorServerToolItem = {
|
|
|
16
16
|
*/
|
|
17
17
|
advice?: string | undefined;
|
|
18
18
|
/**
|
|
19
|
-
* Error message when the advisor call did not produce advice.
|
|
19
|
+
* Error message when the advisor call did not produce advice. Set together with `status: 'failed'` on the terminal item.
|
|
20
20
|
*/
|
|
21
21
|
error?: string | undefined;
|
|
22
22
|
id?: string | undefined;
|
|
@@ -32,7 +32,7 @@ export type OutputAdvisorServerToolItem = {
|
|
|
32
32
|
* The prompt the executor sent to the advisor.
|
|
33
33
|
*/
|
|
34
34
|
prompt?: string | undefined;
|
|
35
|
-
status:
|
|
35
|
+
status: FailableToolCallStatus;
|
|
36
36
|
type: OutputAdvisorServerToolItemType;
|
|
37
37
|
};
|
|
38
38
|
/** @internal */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
9
9
|
export const OutputAdvisorServerToolItemType = {
|
|
10
10
|
OpenrouterAdvisor: "openrouter:advisor",
|
|
11
11
|
};
|
|
@@ -21,7 +21,7 @@ export const OutputAdvisorServerToolItem$inboundSchema = z.object({
|
|
|
21
21
|
instance_name: z.string().optional(),
|
|
22
22
|
model: z.string().optional(),
|
|
23
23
|
prompt: z.string().optional(),
|
|
24
|
-
status:
|
|
24
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
25
25
|
type: OutputAdvisorServerToolItemType$inboundSchema,
|
|
26
26
|
}).transform((v) => {
|
|
27
27
|
return remap$(v, {
|
|
@@ -36,7 +36,7 @@ export const OutputAdvisorServerToolItem$outboundSchema = z.object({
|
|
|
36
36
|
instanceName: z.string().optional(),
|
|
37
37
|
model: z.string().optional(),
|
|
38
38
|
prompt: z.string().optional(),
|
|
39
|
-
status:
|
|
39
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
40
40
|
type: OutputAdvisorServerToolItemType$outboundSchema,
|
|
41
41
|
}).transform((v) => {
|
|
42
42
|
return remap$(v, {
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
import {
|
|
5
|
+
import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
|
|
6
6
|
export declare const OutputSubagentServerToolItemType: {
|
|
7
7
|
readonly OpenrouterSubagent: "openrouter:subagent";
|
|
8
8
|
};
|
|
@@ -16,7 +16,7 @@ export type OutputSubagentServerToolItem = {
|
|
|
16
16
|
*/
|
|
17
17
|
callId?: string | undefined;
|
|
18
18
|
/**
|
|
19
|
-
* Error message when the subagent task did not produce an outcome.
|
|
19
|
+
* Error message when the subagent task did not produce an outcome. Set together with `status: 'failed'` on the terminal item.
|
|
20
20
|
*/
|
|
21
21
|
error?: string | undefined;
|
|
22
22
|
id?: string | undefined;
|
|
@@ -36,7 +36,7 @@ export type OutputSubagentServerToolItem = {
|
|
|
36
36
|
* The worker model's result (the outcome text returned to the delegating model).
|
|
37
37
|
*/
|
|
38
38
|
outcome?: string | undefined;
|
|
39
|
-
status:
|
|
39
|
+
status: FailableToolCallStatus;
|
|
40
40
|
/**
|
|
41
41
|
* The task description the delegating model sent to the worker.
|
|
42
42
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import {
|
|
8
|
+
import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
|
|
9
9
|
export const OutputSubagentServerToolItemType = {
|
|
10
10
|
OpenrouterSubagent: "openrouter:subagent",
|
|
11
11
|
};
|
|
@@ -22,7 +22,7 @@ export const OutputSubagentServerToolItem$inboundSchema = z.object({
|
|
|
22
22
|
model: z.string().optional(),
|
|
23
23
|
name: z.string().optional(),
|
|
24
24
|
outcome: z.string().optional(),
|
|
25
|
-
status:
|
|
25
|
+
status: FailableToolCallStatus$inboundSchema,
|
|
26
26
|
task_description: z.string().optional(),
|
|
27
27
|
task_name: z.string().optional(),
|
|
28
28
|
type: OutputSubagentServerToolItemType$inboundSchema,
|
|
@@ -43,7 +43,7 @@ export const OutputSubagentServerToolItem$outboundSchema = z.object({
|
|
|
43
43
|
model: z.string().optional(),
|
|
44
44
|
name: z.string().optional(),
|
|
45
45
|
outcome: z.string().optional(),
|
|
46
|
-
status:
|
|
46
|
+
status: FailableToolCallStatus$outboundSchema,
|
|
47
47
|
taskDescription: z.string().optional(),
|
|
48
48
|
taskName: z.string().optional(),
|
|
49
49
|
type: OutputSubagentServerToolItemType$outboundSchema,
|
package/jsr.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openrouter/sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.46",
|
|
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",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
|
-
"
|
|
76
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
77
77
|
"prepare": "npm run build",
|
|
78
78
|
"test": "vitest --run --project unit",
|
|
79
|
-
"test:transit": "exit 0",
|
|
80
|
-
"typecheck": "tsc --noEmit",
|
|
81
|
-
"typecheck:transit": "exit 0",
|
|
82
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
83
79
|
"test:e2e": "vitest --run --project e2e",
|
|
84
|
-
"test:watch": "vitest --watch --project unit"
|
|
80
|
+
"test:watch": "vitest --watch --project unit",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"compile": "tsc",
|
|
83
|
+
"test:transit": "exit 0",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|