@openrouter/sdk 0.13.37 → 0.13.38

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.
@@ -0,0 +1,19 @@
1
+ import { OpenRouterCore } from "../core.js";
2
+ import { RequestOptions } from "../lib/sdks.js";
3
+ import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
+ import * as errors from "../models/errors/index.js";
5
+ import { OpenRouterError } from "../models/errors/openroutererror.js";
6
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
7
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
8
+ import * as models from "../models/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { APIPromise } from "../types/async.js";
11
+ import { Result } from "../types/fp.js";
12
+ /**
13
+ * Submit feedback for a generation
14
+ *
15
+ * @remarks
16
+ * Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
17
+ */
18
+ export declare function generationsSubmitFeedback(client: OpenRouterCore, request: operations.SubmitGenerationFeedbackRequest, options?: RequestOptions): APIPromise<Result<models.SubmitGenerationFeedbackResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.NotFoundResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
19
+ //# sourceMappingURL=generationsSubmitFeedback.d.ts.map
@@ -0,0 +1,100 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 7164852deaac
4
+ */
5
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import * as errors from "../models/errors/index.js";
13
+ import * as models from "../models/index.js";
14
+ import * as operations from "../models/operations/index.js";
15
+ import { APIPromise } from "../types/async.js";
16
+ /**
17
+ * Submit feedback for a generation
18
+ *
19
+ * @remarks
20
+ * Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
21
+ */
22
+ export function generationsSubmitFeedback(client, request, options) {
23
+ return new APIPromise($do(client, request, options));
24
+ }
25
+ async function $do(client, request, options) {
26
+ const parsed = safeParse(request, (value) => operations.SubmitGenerationFeedbackRequest$outboundSchema.parse(value), "Input validation failed");
27
+ if (!parsed.ok) {
28
+ return [parsed, { status: "invalid" }];
29
+ }
30
+ const payload = parsed.value;
31
+ const body = encodeJSON("body", payload.SubmitGenerationFeedbackRequest, {
32
+ explode: true,
33
+ });
34
+ const path = pathToFunc("/generation/feedback")();
35
+ const headers = new Headers(compactMap({
36
+ "Content-Type": "application/json",
37
+ Accept: "application/json",
38
+ "HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
39
+ "X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
40
+ "X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
41
+ }));
42
+ const secConfig = await extractSecurity(client._options.apiKey);
43
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
44
+ const requestSecurity = resolveGlobalSecurity(securityInput);
45
+ const context = {
46
+ options: client._options,
47
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48
+ operationID: "submitGenerationFeedback",
49
+ oAuth2Scopes: null,
50
+ resolvedSecurity: requestSecurity,
51
+ securitySource: client._options.apiKey,
52
+ retryConfig: options?.retries
53
+ || client._options.retryConfig
54
+ || {
55
+ strategy: "backoff",
56
+ backoff: {
57
+ initialInterval: 500,
58
+ maxInterval: 60000,
59
+ exponent: 1.5,
60
+ maxElapsedTime: 3600000,
61
+ },
62
+ retryConnectionErrors: true,
63
+ }
64
+ || { strategy: "none" },
65
+ retryCodes: options?.retryCodes || ["5XX"],
66
+ };
67
+ const requestRes = client._createRequest(context, {
68
+ security: requestSecurity,
69
+ method: "POST",
70
+ baseURL: options?.serverURL,
71
+ path: path,
72
+ headers: headers,
73
+ body: body,
74
+ userAgent: client._options.userAgent,
75
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
76
+ }, options);
77
+ if (!requestRes.ok) {
78
+ return [requestRes, { status: "invalid" }];
79
+ }
80
+ const req = requestRes.value;
81
+ const doResult = await client._do(req, {
82
+ context,
83
+ isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
84
+ retryConfig: context.retryConfig,
85
+ retryCodes: context.retryCodes,
86
+ });
87
+ if (!doResult.ok) {
88
+ return [doResult, { status: "request-error", request: req }];
89
+ }
90
+ const response = doResult.value;
91
+ const responseFields = {
92
+ HttpMeta: { Response: response, Request: req },
93
+ };
94
+ const [result] = await M.match(M.json(200, models.SubmitGenerationFeedbackResponse$inboundSchema), M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), M.jsonErr(401, errors.UnauthorizedResponseError$inboundSchema), M.jsonErr(404, errors.NotFoundResponseError$inboundSchema), M.jsonErr(429, errors.TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
95
+ if (!result.ok) {
96
+ return [result, { status: "complete", request: req, response }];
97
+ }
98
+ return [result, { status: "complete", request: req, response }];
99
+ }
100
+ //# sourceMappingURL=generationsSubmitFeedback.js.map
@@ -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.37";
52
+ readonly sdkVersion: "0.13.38";
53
53
  readonly genVersion: "2.884.4";
54
- readonly userAgent: "speakeasy-sdk/typescript 0.13.37 2.884.4 1.0.0 @openrouter/sdk";
54
+ readonly userAgent: "speakeasy-sdk/typescript 0.13.38 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.37",
29
+ sdkVersion: "0.13.38",
30
30
  genVersion: "2.884.4",
31
- userAgent: "speakeasy-sdk/typescript 0.13.37 2.884.4 1.0.0 @openrouter/sdk",
31
+ userAgent: "speakeasy-sdk/typescript 0.13.38 2.884.4 1.0.0 @openrouter/sdk",
32
32
  };
33
33
  //# sourceMappingURL=config.js.map
@@ -18,7 +18,7 @@ export declare function updateState<TTools extends readonly Tool[] = readonly To
18
18
  /**
19
19
  * Append new items to the message history
20
20
  */
21
- export declare function appendToMessages(current: models.InputsUnion, newItems: models.BaseInputsUnion[]): models.InputsUnion;
21
+ export declare function appendToMessages(current: models.InputsUnion, newItems: models.InputsUnion1[]): models.InputsUnion;
22
22
  /**
23
23
  * Check if a tool call requires approval
24
24
  * @param toolCall - The tool call to check
@@ -46,5 +46,5 @@ export declare function buildTurnContext(options: BuildTurnContextOptions): Turn
46
46
  * // Returns: [{ role: "user", content: "Hello!" }]
47
47
  * ```
48
48
  */
49
- export declare function normalizeInputToArray(input: models.InputsUnion): Array<models.BaseInputsUnion>;
49
+ export declare function normalizeInputToArray(input: models.InputsUnion): Array<models.InputsUnion1>;
50
50
  //# sourceMappingURL=turn-context.d.ts.map
@@ -75,7 +75,7 @@ export declare const BYOKProviderSlug: {
75
75
  readonly Recraft: "recraft";
76
76
  readonly Reka: "reka";
77
77
  readonly Relace: "relace";
78
- readonly SakanaAi: "sakana-ai";
78
+ readonly Sakana: "sakana";
79
79
  readonly Sambanova: "sambanova";
80
80
  readonly Seed: "seed";
81
81
  readonly Siliconflow: "siliconflow";
@@ -78,7 +78,7 @@ export const BYOKProviderSlug = {
78
78
  Recraft: "recraft",
79
79
  Reka: "reka",
80
80
  Relace: "relace",
81
- SakanaAi: "sakana-ai",
81
+ Sakana: "sakana",
82
82
  Sambanova: "sambanova",
83
83
  Seed: "seed",
84
84
  Siliconflow: "siliconflow",
@@ -352,7 +352,7 @@ export type ImageGenerationRequestOptions = {
352
352
  replicate?: {
353
353
  [k: string]: any | null;
354
354
  } | undefined;
355
- sakanaAi?: {
355
+ sakana?: {
356
356
  [k: string]: any | null;
357
357
  } | undefined;
358
358
  sambanova?: {
@@ -814,7 +814,7 @@ export type ImageGenerationRequestOptions$Outbound = {
814
814
  replicate?: {
815
815
  [k: string]: any | null;
816
816
  } | undefined;
817
- "sakana-ai"?: {
817
+ sakana?: {
818
818
  [k: string]: any | null;
819
819
  } | undefined;
820
820
  sambanova?: {
@@ -173,7 +173,7 @@ export const ImageGenerationRequestOptions$outboundSchema = z.object({
173
173
  reka: z.record(z.string(), z.nullable(z.any())).optional(),
174
174
  relace: z.record(z.string(), z.nullable(z.any())).optional(),
175
175
  replicate: z.record(z.string(), z.nullable(z.any())).optional(),
176
- sakanaAi: z.record(z.string(), z.nullable(z.any())).optional(),
176
+ sakana: z.record(z.string(), z.nullable(z.any())).optional(),
177
177
  sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
178
178
  sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
179
179
  seed: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -216,7 +216,6 @@ export const ImageGenerationRequestOptions$outboundSchema = z.object({
216
216
  mancerOld: "mancer-old",
217
217
  nexAgi: "nex-agi",
218
218
  openInference: "open-inference",
219
- sakanaAi: "sakana-ai",
220
219
  sambanovaCloaked: "sambanova-cloaked",
221
220
  sfCompute: "sf-compute",
222
221
  togetherLite: "together-lite",
@@ -481,6 +481,8 @@ export * from "./subagentnestedtool.js";
481
481
  export * from "./subagentreasoning.js";
482
482
  export * from "./subagentservertoolconfig.js";
483
483
  export * from "./subagentservertoolopenrouter.js";
484
+ export * from "./submitgenerationfeedbackrequest.js";
485
+ export * from "./submitgenerationfeedbackresponse.js";
484
486
  export * from "./taskclassificationitem.js";
485
487
  export * from "./taskclassificationmacrocategory.js";
486
488
  export * from "./taskclassificationmodel.js";
@@ -485,6 +485,8 @@ export * from "./subagentnestedtool.js";
485
485
  export * from "./subagentreasoning.js";
486
486
  export * from "./subagentservertoolconfig.js";
487
487
  export * from "./subagentservertoolopenrouter.js";
488
+ export * from "./submitgenerationfeedbackrequest.js";
489
+ export * from "./submitgenerationfeedbackresponse.js";
488
490
  export * from "./taskclassificationitem.js";
489
491
  export * from "./taskclassificationmacrocategory.js";
490
492
  export * from "./taskclassificationmodel.js";
@@ -78,6 +78,7 @@ export * from "./listworkspacemembers.js";
78
78
  export * from "./listworkspaces.js";
79
79
  export * from "./queryanalytics.js";
80
80
  export * from "./sendchatcompletionrequest.js";
81
+ export * from "./submitgenerationfeedback.js";
81
82
  export * from "./updatebyokkey.js";
82
83
  export * from "./updateguardrail.js";
83
84
  export * from "./updatekeys.js";
@@ -82,6 +82,7 @@ export * from "./listworkspacemembers.js";
82
82
  export * from "./listworkspaces.js";
83
83
  export * from "./queryanalytics.js";
84
84
  export * from "./sendchatcompletionrequest.js";
85
+ export * from "./submitgenerationfeedback.js";
85
86
  export * from "./updatebyokkey.js";
86
87
  export * from "./updateguardrail.js";
87
88
  export * from "./updatekeys.js";
@@ -99,7 +99,7 @@ export declare const Provider: {
99
99
  readonly Recraft: "recraft";
100
100
  readonly Reka: "reka";
101
101
  readonly Relace: "relace";
102
- readonly SakanaAi: "sakana-ai";
102
+ readonly Sakana: "sakana";
103
103
  readonly Sambanova: "sambanova";
104
104
  readonly Seed: "seed";
105
105
  readonly Siliconflow: "siliconflow";
@@ -82,7 +82,7 @@ export const Provider = {
82
82
  Recraft: "recraft",
83
83
  Reka: "reka",
84
84
  Relace: "relace",
85
- SakanaAi: "sakana-ai",
85
+ Sakana: "sakana",
86
86
  Sambanova: "sambanova",
87
87
  Seed: "seed",
88
88
  Siliconflow: "siliconflow",
@@ -0,0 +1,56 @@
1
+ import * as z from "zod/v4";
2
+ import * as models from "../index.js";
3
+ export type SubmitGenerationFeedbackGlobals = {
4
+ /**
5
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
+ *
7
+ * @remarks
8
+ * This is used to track API usage per application.
9
+ */
10
+ httpReferer?: string | undefined;
11
+ /**
12
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
+ *
14
+ * @remarks
15
+ */
16
+ appTitle?: string | undefined;
17
+ /**
18
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
+ *
20
+ * @remarks
21
+ */
22
+ appCategories?: string | undefined;
23
+ };
24
+ export type SubmitGenerationFeedbackRequest = {
25
+ /**
26
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
27
+ *
28
+ * @remarks
29
+ * This is used to track API usage per application.
30
+ */
31
+ httpReferer?: string | undefined;
32
+ /**
33
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
34
+ *
35
+ * @remarks
36
+ */
37
+ appTitle?: string | undefined;
38
+ /**
39
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
40
+ *
41
+ * @remarks
42
+ */
43
+ appCategories?: string | undefined;
44
+ submitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest;
45
+ };
46
+ /** @internal */
47
+ export type SubmitGenerationFeedbackRequest$Outbound = {
48
+ "HTTP-Referer"?: string | undefined;
49
+ appTitle?: string | undefined;
50
+ appCategories?: string | undefined;
51
+ SubmitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest$Outbound;
52
+ };
53
+ /** @internal */
54
+ export declare const SubmitGenerationFeedbackRequest$outboundSchema: z.ZodType<SubmitGenerationFeedbackRequest$Outbound, SubmitGenerationFeedbackRequest>;
55
+ export declare function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest: SubmitGenerationFeedbackRequest): string;
56
+ //# sourceMappingURL=submitgenerationfeedback.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 0c88d9ca4722
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import * as models from "../index.js";
8
+ /** @internal */
9
+ export const SubmitGenerationFeedbackRequest$outboundSchema = z.object({
10
+ httpReferer: z.string().optional(),
11
+ appTitle: z.string().optional(),
12
+ appCategories: z.string().optional(),
13
+ submitGenerationFeedbackRequest: models.SubmitGenerationFeedbackRequest$outboundSchema,
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ httpReferer: "HTTP-Referer",
17
+ submitGenerationFeedbackRequest: "SubmitGenerationFeedbackRequest",
18
+ });
19
+ });
20
+ export function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest) {
21
+ return JSON.stringify(SubmitGenerationFeedbackRequest$outboundSchema.parse(submitGenerationFeedbackRequest));
22
+ }
23
+ //# sourceMappingURL=submitgenerationfeedback.js.map
@@ -294,7 +294,7 @@ export type ProviderOptions = {
294
294
  replicate?: {
295
295
  [k: string]: any | null;
296
296
  } | undefined;
297
- sakanaAi?: {
297
+ sakana?: {
298
298
  [k: string]: any | null;
299
299
  } | undefined;
300
300
  sambanova?: {
@@ -657,7 +657,7 @@ export type ProviderOptions$Outbound = {
657
657
  replicate?: {
658
658
  [k: string]: any | null;
659
659
  } | undefined;
660
- "sakana-ai"?: {
660
+ sakana?: {
661
661
  [k: string]: any | null;
662
662
  } | undefined;
663
663
  sambanova?: {
@@ -103,7 +103,7 @@ export const ProviderOptions$outboundSchema = z.object({
103
103
  reka: z.record(z.string(), z.nullable(z.any())).optional(),
104
104
  relace: z.record(z.string(), z.nullable(z.any())).optional(),
105
105
  replicate: z.record(z.string(), z.nullable(z.any())).optional(),
106
- sakanaAi: z.record(z.string(), z.nullable(z.any())).optional(),
106
+ sakana: z.record(z.string(), z.nullable(z.any())).optional(),
107
107
  sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
108
108
  sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
109
109
  seed: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -146,7 +146,6 @@ export const ProviderOptions$outboundSchema = z.object({
146
146
  mancerOld: "mancer-old",
147
147
  nexAgi: "nex-agi",
148
148
  openInference: "open-inference",
149
- sakanaAi: "sakana-ai",
150
149
  sambanovaCloaked: "sambanova-cloaked",
151
150
  sfCompute: "sf-compute",
152
151
  togetherLite: "together-lite",
@@ -0,0 +1,47 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * The category of feedback being reported
5
+ */
6
+ export declare const Category: {
7
+ readonly Latency: "latency";
8
+ readonly Incoherence: "incoherence";
9
+ readonly IncorrectResponse: "incorrect_response";
10
+ readonly Formatting: "formatting";
11
+ readonly Billing: "billing";
12
+ readonly ApiError: "api_error";
13
+ readonly Other: "other";
14
+ };
15
+ /**
16
+ * The category of feedback being reported
17
+ */
18
+ export type Category = OpenEnum<typeof Category>;
19
+ /**
20
+ * Structured feedback about a specific generation
21
+ */
22
+ export type SubmitGenerationFeedbackRequest = {
23
+ /**
24
+ * The category of feedback being reported
25
+ */
26
+ category: Category;
27
+ /**
28
+ * An optional free-text comment describing the feedback
29
+ */
30
+ comment?: string | undefined;
31
+ /**
32
+ * The generation to submit feedback on
33
+ */
34
+ generationId: string;
35
+ };
36
+ /** @internal */
37
+ export declare const Category$outboundSchema: z.ZodType<string, Category>;
38
+ /** @internal */
39
+ export type SubmitGenerationFeedbackRequest$Outbound = {
40
+ category: string;
41
+ comment?: string | undefined;
42
+ generation_id: string;
43
+ };
44
+ /** @internal */
45
+ export declare const SubmitGenerationFeedbackRequest$outboundSchema: z.ZodType<SubmitGenerationFeedbackRequest$Outbound, SubmitGenerationFeedbackRequest>;
46
+ export declare function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest: SubmitGenerationFeedbackRequest): string;
47
+ //# sourceMappingURL=submitgenerationfeedbackrequest.d.ts.map
@@ -0,0 +1,36 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: c8bd4306e20e
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ /**
9
+ * The category of feedback being reported
10
+ */
11
+ export const Category = {
12
+ Latency: "latency",
13
+ Incoherence: "incoherence",
14
+ IncorrectResponse: "incorrect_response",
15
+ Formatting: "formatting",
16
+ Billing: "billing",
17
+ ApiError: "api_error",
18
+ Other: "other",
19
+ };
20
+ /** @internal */
21
+ export const Category$outboundSchema = openEnums
22
+ .outboundSchema(Category);
23
+ /** @internal */
24
+ export const SubmitGenerationFeedbackRequest$outboundSchema = z.object({
25
+ category: Category$outboundSchema,
26
+ comment: z.string().optional(),
27
+ generationId: z.string(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ generationId: "generation_id",
31
+ });
32
+ });
33
+ export function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest) {
34
+ return JSON.stringify(SubmitGenerationFeedbackRequest$outboundSchema.parse(submitGenerationFeedbackRequest));
35
+ }
36
+ //# sourceMappingURL=submitgenerationfeedbackrequest.js.map
@@ -0,0 +1,22 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ export type SubmitGenerationFeedbackResponseData = {
5
+ /**
6
+ * Whether the feedback was recorded
7
+ */
8
+ success: true;
9
+ };
10
+ /**
11
+ * Confirmation that the feedback was recorded
12
+ */
13
+ export type SubmitGenerationFeedbackResponse = {
14
+ data: SubmitGenerationFeedbackResponseData;
15
+ };
16
+ /** @internal */
17
+ export declare const SubmitGenerationFeedbackResponseData$inboundSchema: z.ZodType<SubmitGenerationFeedbackResponseData, unknown>;
18
+ export declare function submitGenerationFeedbackResponseDataFromJSON(jsonString: string): SafeParseResult<SubmitGenerationFeedbackResponseData, SDKValidationError>;
19
+ /** @internal */
20
+ export declare const SubmitGenerationFeedbackResponse$inboundSchema: z.ZodType<SubmitGenerationFeedbackResponse, unknown>;
21
+ export declare function submitGenerationFeedbackResponseFromJSON(jsonString: string): SafeParseResult<SubmitGenerationFeedbackResponse, SDKValidationError>;
22
+ //# sourceMappingURL=submitgenerationfeedbackresponse.d.ts.map
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 16760a92290d
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { safeParse } from "../lib/schemas.js";
7
+ /** @internal */
8
+ export const SubmitGenerationFeedbackResponseData$inboundSchema = z.object({
9
+ success: z.literal(true),
10
+ });
11
+ export function submitGenerationFeedbackResponseDataFromJSON(jsonString) {
12
+ return safeParse(jsonString, (x) => SubmitGenerationFeedbackResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitGenerationFeedbackResponseData' from JSON`);
13
+ }
14
+ /** @internal */
15
+ export const SubmitGenerationFeedbackResponse$inboundSchema = z.object({
16
+ data: z.lazy(() => SubmitGenerationFeedbackResponseData$inboundSchema),
17
+ });
18
+ export function submitGenerationFeedbackResponseFromJSON(jsonString) {
19
+ return safeParse(jsonString, (x) => SubmitGenerationFeedbackResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitGenerationFeedbackResponse' from JSON`);
20
+ }
21
+ //# sourceMappingURL=submitgenerationfeedbackresponse.js.map
@@ -315,7 +315,7 @@ export type VideoGenerationRequestOptions = {
315
315
  replicate?: {
316
316
  [k: string]: any | null;
317
317
  } | undefined;
318
- sakanaAi?: {
318
+ sakana?: {
319
319
  [k: string]: any | null;
320
320
  } | undefined;
321
321
  sambanova?: {
@@ -745,7 +745,7 @@ export type VideoGenerationRequestOptions$Outbound = {
745
745
  replicate?: {
746
746
  [k: string]: any | null;
747
747
  } | undefined;
748
- "sakana-ai"?: {
748
+ sakana?: {
749
749
  [k: string]: any | null;
750
750
  } | undefined;
751
751
  sambanova?: {
@@ -133,7 +133,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
133
133
  reka: z.record(z.string(), z.nullable(z.any())).optional(),
134
134
  relace: z.record(z.string(), z.nullable(z.any())).optional(),
135
135
  replicate: z.record(z.string(), z.nullable(z.any())).optional(),
136
- sakanaAi: z.record(z.string(), z.nullable(z.any())).optional(),
136
+ sakana: z.record(z.string(), z.nullable(z.any())).optional(),
137
137
  sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
138
138
  sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
139
139
  seed: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -176,7 +176,6 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
176
176
  mancerOld: "mancer-old",
177
177
  nexAgi: "nex-agi",
178
178
  openInference: "open-inference",
179
- sakanaAi: "sakana-ai",
180
179
  sambanovaCloaked: "sambanova-cloaked",
181
180
  sfCompute: "sf-compute",
182
181
  togetherLite: "together-lite",
@@ -10,5 +10,12 @@ export declare class Generations extends ClientSDK {
10
10
  * Get stored prompt and completion content for a generation
11
11
  */
12
12
  listGenerationContent(request: operations.ListGenerationContentRequest, options?: RequestOptions): Promise<models.GenerationContentResponse>;
13
+ /**
14
+ * Submit feedback for a generation
15
+ *
16
+ * @remarks
17
+ * Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
18
+ */
19
+ submitFeedback(request: operations.SubmitGenerationFeedbackRequest, options?: RequestOptions): Promise<models.SubmitGenerationFeedbackResponse>;
13
20
  }
14
21
  //# sourceMappingURL=generations.d.ts.map
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import { generationsGetGeneration } from "../funcs/generationsGetGeneration.js";
6
6
  import { generationsListGenerationContent } from "../funcs/generationsListGenerationContent.js";
7
+ import { generationsSubmitFeedback } from "../funcs/generationsSubmitFeedback.js";
7
8
  import { ClientSDK } from "../lib/sdks.js";
8
9
  import { unwrapAsync } from "../types/fp.js";
9
10
  export class Generations extends ClientSDK {
@@ -19,5 +20,14 @@ export class Generations extends ClientSDK {
19
20
  async listGenerationContent(request, options) {
20
21
  return unwrapAsync(generationsListGenerationContent(this, request, options));
21
22
  }
23
+ /**
24
+ * Submit feedback for a generation
25
+ *
26
+ * @remarks
27
+ * Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
28
+ */
29
+ async submitFeedback(request, options) {
30
+ return unwrapAsync(generationsSubmitFeedback(this, request, options));
31
+ }
22
32
  }
23
33
  //# sourceMappingURL=generations.js.map
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "0.13.37",
5
+ "version": "0.13.38",
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.37",
3
+ "version": "0.13.38",
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
- "test": "vitest --run --project unit",
78
- "test:e2e": "vitest --run --project e2e",
79
76
  "test:transit": "exit 0",
80
77
  "test:watch": "vitest --watch --project unit",
81
- "compile": "tsc",
82
- "prepare": "npm run build",
83
78
  "typecheck": "tsc --noEmit",
84
- "typecheck:transit": "exit 0"
79
+ "typecheck:transit": "exit 0",
80
+ "prepare": "npm run build",
81
+ "test:e2e": "vitest --run --project e2e",
82
+ "compile": "tsc",
83
+ "postinstall": "node scripts/check-types.js || true",
84
+ "test": "vitest --run --project unit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {