@openrouter/sdk 1.5.118 → 1.5.119

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.
@@ -60,6 +60,9 @@ async function $do(client, request, options) {
60
60
  if (payload.RequestBody.language !== undefined) {
61
61
  appendForm(body, "language", payload.RequestBody.language);
62
62
  }
63
+ if (payload.RequestBody.prompt !== undefined) {
64
+ appendForm(body, "prompt", payload.RequestBody.prompt);
65
+ }
63
66
  if (payload.RequestBody.provider !== undefined) {
64
67
  appendForm(body, "provider", payload.RequestBody.provider);
65
68
  }
@@ -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: "1.5.118";
52
+ readonly sdkVersion: "1.5.119";
53
53
  readonly genVersion: "2.960.8";
54
- readonly userAgent: "speakeasy-sdk/typescript 1.5.118 2.960.8 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 1.5.119 2.960.8 1.0.0 @openrouter/sdk";
55
55
  };
56
56
  //# sourceMappingURL=config.d.ts.map
package/esm/lib/config.js CHANGED
@@ -25,8 +25,8 @@ export function serverURLFromOptions(options) {
25
25
  export const SDK_METADATA = {
26
26
  language: "typescript",
27
27
  openapiDocVersion: "1.0.0",
28
- sdkVersion: "1.5.118",
28
+ sdkVersion: "1.5.119",
29
29
  genVersion: "2.960.8",
30
- userAgent: "speakeasy-sdk/typescript 1.5.118 2.960.8 1.0.0 @openrouter/sdk",
30
+ userAgent: "speakeasy-sdk/typescript 1.5.119 2.960.8 1.0.0 @openrouter/sdk",
31
31
  };
32
32
  //# sourceMappingURL=config.js.map
@@ -62,6 +62,10 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
62
62
  * The model to use for transcription.
63
63
  */
64
64
  model: string;
65
+ /**
66
+ * Context to guide transcription on providers that support contextual prompting. Takes precedence over provider-specific prompt options, including when empty.
67
+ */
68
+ prompt?: string | undefined;
65
69
  /**
66
70
  * JSON-encoded provider preferences object, the same shape as the JSON body field: { "zdr": true, "data_collection": "deny", "options": { "<provider-slug>": { ... } } }. Only options for the matched provider are forwarded. Must decode to a JSON object.
67
71
  */
@@ -136,6 +140,7 @@ export type CreateAudioTranscriptionsMultipartRequestBody$Outbound = {
136
140
  "keyterms[]"?: Array<string> | undefined;
137
141
  language?: string | undefined;
138
142
  model: string;
143
+ prompt?: string | undefined;
139
144
  provider?: string | undefined;
140
145
  response_format?: string | undefined;
141
146
  session_id?: string | undefined;
@@ -41,6 +41,7 @@ export const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema = z.ob
41
41
  keyterms: z.array(z.string()).optional(),
42
42
  language: z.string().optional(),
43
43
  model: z.string(),
44
+ prompt: z.string().optional(),
44
45
  provider: z.string().optional(),
45
46
  responseFormat: ResponseFormat$outboundSchema.optional(),
46
47
  sessionId: z.string().optional(),
@@ -106,6 +106,10 @@ export type STTRequest = {
106
106
  * STT model identifier
107
107
  */
108
108
  model: string;
109
+ /**
110
+ * Context to guide transcription, such as domain vocabulary or a previous segment. Honored by OpenAI (except gpt-4o-transcribe-diarize), Azure OpenAI, Groq, Together, Alibaba, and AssemblyAI endpoints with prompted pricing configured. Other providers ignore it; use keyterms for supported keyword boosting. Takes precedence over provider-specific prompt options, including when empty.
111
+ */
112
+ prompt?: string | undefined;
109
113
  /**
110
114
  * Provider configuration: provider routing preferences (`order`, `only`, `ignore`, `allow_fallbacks`), data policy routing preferences (`zdr`, `data_collection`) and provider-specific passthrough options
111
115
  */
@@ -174,6 +178,7 @@ export type STTRequest$Outbound = {
174
178
  keyterms?: Array<string> | undefined;
175
179
  language?: string | undefined;
176
180
  model: string;
181
+ prompt?: string | undefined;
177
182
  provider?: STTRequestProvider$Outbound | undefined;
178
183
  response_format?: string | undefined;
179
184
  session_id?: string | undefined;
@@ -75,6 +75,7 @@ export const STTRequest$outboundSchema = z.object({
75
75
  keyterms: z.array(z.string()).optional(),
76
76
  language: z.string().optional(),
77
77
  model: z.string(),
78
+ prompt: z.string().optional(),
78
79
  provider: z.lazy(() => STTRequestProvider$outboundSchema).optional(),
79
80
  responseFormat: STTRequestResponseFormat$outboundSchema.optional(),
80
81
  sessionId: z.string().optional(),
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.5.118",
5
+ "version": "1.5.119",
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": "1.5.118",
3
+ "version": "1.5.119",
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": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
75
75
  "prepublishOnly": "npm run build",
76
- "postinstall": "node scripts/check-types.js || true",
76
+ "typecheck": "tsc --noEmit",
77
+ "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js",
77
78
  "prepare": "npm run build",
78
79
  "test": "vitest --run --project unit",
79
- "test:transit": "exit 0",
80
- "typecheck": "tsc --noEmit",
81
80
  "test:e2e": "vitest --run --project e2e",
82
81
  "test:watch": "vitest --watch --project unit",
83
82
  "typecheck:transit": "exit 0",
84
- "compile": "node --max-old-space-size=8192 ./node_modules/typescript/bin/tsc && node scripts/unbarrel-imports.js"
83
+ "postinstall": "node scripts/check-types.js || true",
84
+ "test:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {
87
87