@openrouter/sdk 1.2.91 → 1.2.93
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/anthropicsystemclearat.d.ts +1 -0
- package/esm/models/anthropicsystemclearat.js +1 -0
- package/esm/models/anthropicthinkingblockbinding.d.ts +6 -5
- package/esm/models/anthropicthinkingblockbinding.js +5 -2
- package/esm/models/costdetails.d.ts +1 -1
- package/esm/models/openresponsesresult.d.ts +1 -1
- 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.93";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.93 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.93",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.93 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
export declare const AnthropicSystemClearAt: {
|
|
4
4
|
readonly NextUserMessage: "next_user_message";
|
|
5
|
+
readonly Never: "never";
|
|
5
6
|
};
|
|
6
7
|
export type AnthropicSystemClearAt = OpenEnum<typeof AnthropicSystemClearAt>;
|
|
7
8
|
/** @internal */
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as openEnums from "../types/enums.js";
|
|
6
6
|
export const AnthropicSystemClearAt = {
|
|
7
7
|
NextUserMessage: "next_user_message",
|
|
8
|
+
Never: "never",
|
|
8
9
|
};
|
|
9
10
|
/** @internal */
|
|
10
11
|
export const AnthropicSystemClearAt$outboundSchema = openEnums.outboundSchema(AnthropicSystemClearAt);
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import {
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
3
|
export declare const PrefixMismatchBehavior: {
|
|
4
|
+
readonly Error: "error";
|
|
4
5
|
readonly DropBlock: "drop_block";
|
|
5
6
|
};
|
|
6
|
-
export type PrefixMismatchBehavior =
|
|
7
|
+
export type PrefixMismatchBehavior = OpenEnum<typeof PrefixMismatchBehavior>;
|
|
7
8
|
export type AnthropicThinkingBlockBinding = {
|
|
8
|
-
prefixMismatchBehavior
|
|
9
|
+
prefixMismatchBehavior?: PrefixMismatchBehavior | null | undefined;
|
|
9
10
|
};
|
|
10
11
|
/** @internal */
|
|
11
|
-
export declare const PrefixMismatchBehavior$outboundSchema: z.
|
|
12
|
+
export declare const PrefixMismatchBehavior$outboundSchema: z.ZodType<string, PrefixMismatchBehavior>;
|
|
12
13
|
/** @internal */
|
|
13
14
|
export type AnthropicThinkingBlockBinding$Outbound = {
|
|
14
|
-
prefix_mismatch_behavior
|
|
15
|
+
prefix_mismatch_behavior?: string | null | undefined;
|
|
15
16
|
};
|
|
16
17
|
/** @internal */
|
|
17
18
|
export declare const AnthropicThinkingBlockBinding$outboundSchema: z.ZodType<AnthropicThinkingBlockBinding$Outbound, AnthropicThinkingBlockBinding>;
|
|
@@ -4,14 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
7
8
|
export const PrefixMismatchBehavior = {
|
|
9
|
+
Error: "error",
|
|
8
10
|
DropBlock: "drop_block",
|
|
9
11
|
};
|
|
10
12
|
/** @internal */
|
|
11
|
-
export const PrefixMismatchBehavior$outboundSchema =
|
|
13
|
+
export const PrefixMismatchBehavior$outboundSchema = openEnums.outboundSchema(PrefixMismatchBehavior);
|
|
12
14
|
/** @internal */
|
|
13
15
|
export const AnthropicThinkingBlockBinding$outboundSchema = z.object({
|
|
14
|
-
prefixMismatchBehavior: PrefixMismatchBehavior$outboundSchema
|
|
16
|
+
prefixMismatchBehavior: z.nullable(PrefixMismatchBehavior$outboundSchema)
|
|
17
|
+
.optional(),
|
|
15
18
|
}).transform((v) => {
|
|
16
19
|
return remap$(v, {
|
|
17
20
|
prefixMismatchBehavior: "prefix_mismatch_behavior",
|
|
@@ -6,7 +6,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
|
6
6
|
*/
|
|
7
7
|
export type CostDetails = {
|
|
8
8
|
/**
|
|
9
|
-
* Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly.
|
|
9
|
+
* Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran.
|
|
10
10
|
*/
|
|
11
11
|
serverToolCost?: number | null | undefined;
|
|
12
12
|
upstreamInferenceCompletionsCost: number;
|
|
@@ -89,7 +89,7 @@ export type OutputTokensDetails = {
|
|
|
89
89
|
};
|
|
90
90
|
export type UsageCostDetails = {
|
|
91
91
|
/**
|
|
92
|
-
* Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly.
|
|
92
|
+
* Metered server-tool execution cost (for example, shell sandbox time) billed for this request, in USD. Matches the billed checkpoint and settlement amounts exactly. 0 when a metered server tool ran but settled at zero dollars; absent when no metered server tool ran.
|
|
93
93
|
*/
|
|
94
94
|
serverToolCost?: number | null | undefined;
|
|
95
95
|
upstreamInferenceCost?: number | null | undefined;
|
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.93",
|
|
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
|
-
"postinstall": "node scripts/check-types.js || true",
|
|
77
|
-
"prepare": "npm run build",
|
|
78
|
-
"test": "vitest --run --project unit",
|
|
79
|
-
"test:e2e": "vitest --run --project e2e",
|
|
80
76
|
"test:transit": "exit 0",
|
|
81
77
|
"typecheck": "tsc --noEmit",
|
|
82
|
-
"typecheck:transit": "exit 0",
|
|
83
78
|
"compile": "tsc",
|
|
84
|
-
"
|
|
79
|
+
"postinstall": "node scripts/check-types.js || true",
|
|
80
|
+
"test:watch": "vitest --watch --project unit",
|
|
81
|
+
"typecheck:transit": "exit 0",
|
|
82
|
+
"prepare": "npm run build",
|
|
83
|
+
"test": "vitest --run --project unit",
|
|
84
|
+
"test:e2e": "vitest --run --project e2e"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|
|
87
87
|
"devDependencies": {
|