@openrouter/sdk 0.13.49 → 0.13.50

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.
@@ -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.13.49";
52
+ readonly sdkVersion: "0.13.50";
53
53
  readonly genVersion: "2.884.4";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.13.49 2.884.4 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.13.50 2.884.4 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.13.49",
29
+ sdkVersion: "0.13.50",
30
30
  genVersion: "2.884.4",
31
- userAgent: "speakeasy-sdk/typescript 0.13.49 2.884.4 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.13.50 2.884.4 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -2,7 +2,7 @@ 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
- * A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.
5
+ * A conditional override of the base pricing. An entry applies only when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per price key; price keys absent from an entry inherit the base price.
6
6
  */
7
7
  export type PricingOverride = {
8
8
  /**
@@ -37,6 +37,14 @@ export type PricingOverride = {
37
37
  * Overridden price in USD per token for prompt (input) processing
38
38
  */
39
39
  prompt?: string | undefined;
40
+ /**
41
+ * Condition: exclusive end of a daily UTC time window as an HHMM clock number (e.g. 400 = 04:00)
42
+ */
43
+ utcEnd?: number | undefined;
44
+ /**
45
+ * Condition: inclusive start of a daily UTC time window as an HHMM clock number (e.g. 100 = 01:00, 1030 = 10:30). The entry applies while the current UTC time is inside the half-open window [utc_start, utc_end), which may wrap past midnight (utc_start > utc_end).
46
+ */
47
+ utcStart?: number | undefined;
40
48
  };
41
49
  /** @internal */
42
50
  export declare const PricingOverride$inboundSchema: z.ZodType<PricingOverride, unknown>;
@@ -15,6 +15,8 @@ export const PricingOverride$inboundSchema = z.object({
15
15
  input_cache_write_1h: z.string().optional(),
16
16
  min_prompt_tokens: z.number().optional(),
17
17
  prompt: z.string().optional(),
18
+ utc_end: z.number().optional(),
19
+ utc_start: z.number().optional(),
18
20
  }).transform((v) => {
19
21
  return remap$(v, {
20
22
  "input_audio_cache": "inputAudioCache",
@@ -22,6 +24,8 @@ export const PricingOverride$inboundSchema = z.object({
22
24
  "input_cache_write": "inputCacheWrite",
23
25
  "input_cache_write_1h": "inputCacheWrite1h",
24
26
  "min_prompt_tokens": "minPromptTokens",
27
+ "utc_end": "utcEnd",
28
+ "utc_start": "utcStart",
25
29
  });
26
30
  });
27
31
  export function pricingOverrideFromJSON(jsonString) {
@@ -57,7 +57,7 @@ export type Pricing = {
57
57
  */
58
58
  internalReasoning?: string | undefined;
59
59
  /**
60
- * Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
60
+ * Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
61
61
  */
62
62
  overrides?: Array<PricingOverride> | undefined;
63
63
  /**
@@ -55,7 +55,7 @@ export type PublicPricing = {
55
55
  */
56
56
  internalReasoning?: string | undefined;
57
57
  /**
58
- * Conditional overrides of the base pricing (e.g. long-context pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
58
+ * Conditional overrides of the base pricing (e.g. long-context or time-based pricing). An entry applies when all of its condition fields (e.g. min_prompt_tokens, or the utc_start/utc_end time window) match the request; among applicable entries, later entries win per key; price keys absent from an entry inherit the base price. The top-level pricing keys always reflect the price that applies under default conditions.
59
59
  */
60
60
  overrides?: Array<PricingOverride> | undefined;
61
61
  /**
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.13.49",
5
+ "version": "0.13.50",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openrouter/sdk",
3
- "version": "0.13.49",
3
+ "version": "0.13.50",
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
- "access": "public",
25
- "provenance": true
24
+ "provenance": true,
25
+ "access": "public"
26
26
  },
27
27
  "type": "module",
28
28
  "main": "./esm/index.js",
@@ -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
76
  "prepare": "npm run build",
78
77
  "test": "vitest --run --project unit",
79
78
  "test:e2e": "vitest --run --project e2e",
80
- "typecheck": "tsc --noEmit",
81
- "compile": "tsc",
82
79
  "test:transit": "exit 0",
83
80
  "test:watch": "vitest --watch --project unit",
84
- "typecheck:transit": "exit 0"
81
+ "typecheck": "tsc --noEmit",
82
+ "typecheck:transit": "exit 0",
83
+ "compile": "tsc",
84
+ "postinstall": "node scripts/check-types.js || true"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {