@openrouter/sdk 1.2.133 → 1.2.134
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
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.134";
|
|
54
54
|
readonly genVersion: "2.914.0";
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.2.
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.2.134 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.134",
|
|
33
33
|
genVersion: "2.914.0",
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.2.
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.2.134 2.914.0 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { AnthropicBase64ImageSource, AnthropicBase64ImageSource$Outbound } from "./anthropicbase64imagesource.js";
|
|
3
3
|
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
4
|
+
import { AnthropicFileDocumentSource, AnthropicFileDocumentSource$Outbound } from "./anthropicfiledocumentsource.js";
|
|
4
5
|
import { AnthropicUrlImageSource, AnthropicUrlImageSource$Outbound } from "./anthropicurlimagesource.js";
|
|
5
|
-
export type AnthropicImageBlockParamSource = AnthropicBase64ImageSource | AnthropicUrlImageSource;
|
|
6
|
+
export type AnthropicImageBlockParamSource = AnthropicBase64ImageSource | AnthropicFileDocumentSource | AnthropicUrlImageSource;
|
|
6
7
|
export type AnthropicImageBlockParam = {
|
|
7
8
|
/**
|
|
8
9
|
* Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
|
|
9
10
|
*/
|
|
10
11
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
11
|
-
source: AnthropicBase64ImageSource | AnthropicUrlImageSource;
|
|
12
|
+
source: AnthropicBase64ImageSource | AnthropicFileDocumentSource | AnthropicUrlImageSource;
|
|
12
13
|
type: "image";
|
|
13
14
|
};
|
|
14
15
|
/** @internal */
|
|
15
|
-
export type AnthropicImageBlockParamSource$Outbound = AnthropicBase64ImageSource$Outbound | AnthropicUrlImageSource$Outbound;
|
|
16
|
+
export type AnthropicImageBlockParamSource$Outbound = AnthropicBase64ImageSource$Outbound | AnthropicFileDocumentSource$Outbound | AnthropicUrlImageSource$Outbound;
|
|
16
17
|
/** @internal */
|
|
17
18
|
export declare const AnthropicImageBlockParamSource$outboundSchema: z.ZodType<AnthropicImageBlockParamSource$Outbound, AnthropicImageBlockParamSource>;
|
|
18
19
|
export declare function anthropicImageBlockParamSourceToJSON(anthropicImageBlockParamSource: AnthropicImageBlockParamSource): string;
|
|
19
20
|
/** @internal */
|
|
20
21
|
export type AnthropicImageBlockParam$Outbound = {
|
|
21
22
|
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
22
|
-
source: AnthropicBase64ImageSource$Outbound | AnthropicUrlImageSource$Outbound;
|
|
23
|
+
source: AnthropicBase64ImageSource$Outbound | AnthropicFileDocumentSource$Outbound | AnthropicUrlImageSource$Outbound;
|
|
23
24
|
type: "image";
|
|
24
25
|
};
|
|
25
26
|
/** @internal */
|
|
@@ -6,10 +6,12 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { AnthropicBase64ImageSource$outboundSchema, } from "./anthropicbase64imagesource.js";
|
|
8
8
|
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
9
|
+
import { AnthropicFileDocumentSource$outboundSchema, } from "./anthropicfiledocumentsource.js";
|
|
9
10
|
import { AnthropicUrlImageSource$outboundSchema, } from "./anthropicurlimagesource.js";
|
|
10
11
|
/** @internal */
|
|
11
12
|
export const AnthropicImageBlockParamSource$outboundSchema = z.union([
|
|
12
13
|
AnthropicBase64ImageSource$outboundSchema,
|
|
14
|
+
AnthropicFileDocumentSource$outboundSchema,
|
|
13
15
|
AnthropicUrlImageSource$outboundSchema,
|
|
14
16
|
]);
|
|
15
17
|
export function anthropicImageBlockParamSourceToJSON(anthropicImageBlockParamSource) {
|
|
@@ -20,6 +22,7 @@ export const AnthropicImageBlockParam$outboundSchema = z.object({
|
|
|
20
22
|
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
21
23
|
source: z.union([
|
|
22
24
|
AnthropicBase64ImageSource$outboundSchema,
|
|
25
|
+
AnthropicFileDocumentSource$outboundSchema,
|
|
23
26
|
AnthropicUrlImageSource$outboundSchema,
|
|
24
27
|
]),
|
|
25
28
|
type: z.literal("image"),
|
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.134",
|
|
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": [
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"build": "tsc",
|
|
75
75
|
"prepublishOnly": "npm run build",
|
|
76
76
|
"compile": "tsc",
|
|
77
|
-
"test:e2e": "vitest --run --project e2e",
|
|
78
|
-
"test:transit": "exit 0",
|
|
79
|
-
"test:watch": "vitest --watch --project unit",
|
|
80
|
-
"typecheck": "tsc --noEmit",
|
|
81
77
|
"postinstall": "node scripts/check-types.js || true",
|
|
82
78
|
"prepare": "npm run build",
|
|
83
79
|
"test": "vitest --run --project unit",
|
|
80
|
+
"test:transit": "exit 0",
|
|
81
|
+
"test:watch": "vitest --watch --project unit",
|
|
82
|
+
"typecheck": "tsc --noEmit",
|
|
83
|
+
"test:e2e": "vitest --run --project e2e",
|
|
84
84
|
"typecheck:transit": "exit 0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {},
|