@openrouter/sdk 1.2.132 → 1.2.133

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.
@@ -56,12 +56,21 @@ async function $do(client, request, options) {
56
56
  if (payload.RequestBody.response_format !== undefined) {
57
57
  appendForm(body, "response_format", payload.RequestBody.response_format);
58
58
  }
59
+ if (payload.RequestBody.session_id !== undefined) {
60
+ appendForm(body, "session_id", payload.RequestBody.session_id);
61
+ }
59
62
  if (payload.RequestBody.temperature !== undefined) {
60
63
  appendForm(body, "temperature", payload.RequestBody.temperature);
61
64
  }
62
65
  if (payload.RequestBody["timestamp_granularities[]"] !== undefined) {
63
66
  appendForm(body, "timestamp_granularities[]", payload.RequestBody["timestamp_granularities[]"]);
64
67
  }
68
+ if (payload.RequestBody.trace !== undefined) {
69
+ appendForm(body, "trace", payload.RequestBody.trace);
70
+ }
71
+ if (payload.RequestBody.user !== undefined) {
72
+ appendForm(body, "user", payload.RequestBody.user);
73
+ }
65
74
  const path = pathToFunc("/audio/transcriptions")();
66
75
  const headers = new Headers(compactMap({
67
76
  Accept: "application/json",
@@ -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.132";
53
+ readonly sdkVersion: "1.2.133";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.2.132 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.2.133 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.132",
32
+ sdkVersion: "1.2.133",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.2.132 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.2.133 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -58,6 +58,10 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
58
58
  * The response format. "json" (default) returns { text, usage }; "verbose_json" additionally returns task, language, duration, and segment-level timestamps (OpenAI-compatible providers only).
59
59
  */
60
60
  responseFormat?: ResponseFormat | undefined;
61
+ /**
62
+ * A unique identifier for grouping related requests (e.g., a conversation or agent workflow). Used for observability grouping in Broadcast and private logging; never sent to the provider. If provided in both the request body and the x-session-id header, the body value takes precedence.
63
+ */
64
+ sessionId?: string | undefined;
61
65
  /**
62
66
  * The sampling temperature.
63
67
  */
@@ -66,6 +70,14 @@ export type CreateAudioTranscriptionsMultipartRequestBody = {
66
70
  * Timestamp detail levels to include when response_format is "verbose_json". "word" additionally returns word-level timestamps in the words array.
67
71
  */
68
72
  timestampGranularities?: Array<TimestampGranularities> | undefined;
73
+ /**
74
+ * JSON-encoded trace metadata object (trace_id, trace_name, span_name, generation_name, parent_span_id and custom keys) attached to the Broadcast trace. Must decode to a JSON object.
75
+ */
76
+ trace?: string | undefined;
77
+ /**
78
+ * A unique identifier representing your end-user. Forwarded to Broadcast and private logging as the end-user id; never sent to the provider.
79
+ */
80
+ user?: string | undefined;
69
81
  };
70
82
  export type CreateAudioTranscriptionsMultipartRequest = {
71
83
  /**
@@ -107,8 +119,11 @@ export type CreateAudioTranscriptionsMultipartRequestBody$Outbound = {
107
119
  language?: string | undefined;
108
120
  model: string;
109
121
  response_format?: string | undefined;
122
+ session_id?: string | undefined;
110
123
  temperature?: number | undefined;
111
124
  "timestamp_granularities[]"?: Array<string> | undefined;
125
+ trace?: string | undefined;
126
+ user?: string | undefined;
112
127
  };
113
128
  /** @internal */
114
129
  export declare const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema: z.ZodType<CreateAudioTranscriptionsMultipartRequestBody$Outbound, CreateAudioTranscriptionsMultipartRequestBody>;
@@ -41,12 +41,16 @@ export const CreateAudioTranscriptionsMultipartRequestBody$outboundSchema = z.ob
41
41
  language: z.string().optional(),
42
42
  model: z.string(),
43
43
  responseFormat: ResponseFormat$outboundSchema.optional(),
44
+ sessionId: z.string().optional(),
44
45
  temperature: z.number().optional(),
45
46
  timestampGranularities: z.array(TimestampGranularities$outboundSchema)
46
47
  .optional(),
48
+ trace: z.string().optional(),
49
+ user: z.string().optional(),
47
50
  }).transform((v) => {
48
51
  return remap$(v, {
49
52
  responseFormat: "response_format",
53
+ sessionId: "session_id",
50
54
  timestampGranularities: "timestamp_granularities[]",
51
55
  });
52
56
  });
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.2.132",
5
+ "version": "1.2.133",
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.2.132",
3
+ "version": "1.2.133",
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
- "typecheck": "tsc --noEmit",
76
+ "compile": "tsc",
77
77
  "test:e2e": "vitest --run --project e2e",
78
78
  "test:transit": "exit 0",
79
- "typecheck:transit": "exit 0",
80
- "compile": "tsc",
79
+ "test:watch": "vitest --watch --project unit",
80
+ "typecheck": "tsc --noEmit",
81
81
  "postinstall": "node scripts/check-types.js || true",
82
82
  "prepare": "npm run build",
83
83
  "test": "vitest --run --project unit",
84
- "test:watch": "vitest --watch --project unit"
84
+ "typecheck:transit": "exit 0"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {