@openrouter/sdk 1.3.8 → 1.3.10

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.
@@ -1,12 +1,10 @@
1
1
  import { OpenRouterCore } from "../core.js";
2
- import { EventStream } from "../lib/event-streams.js";
3
2
  import { RequestOptions } from "../lib/sdks.js";
4
3
  import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
5
4
  import * as errors from "../models/errors/index.js";
6
5
  import { OpenRouterError } from "../models/errors/openroutererror.js";
7
6
  import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
7
  import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import * as models from "../models/index.js";
10
8
  import * as operations from "../models/operations/index.js";
11
9
  import { APIPromise } from "../types/async.js";
12
10
  import { Result } from "../types/fp.js";
@@ -30,5 +28,5 @@ import { Result } from "../types/fp.js";
30
28
  *
31
29
  * If set, this operation will use {@link Security.apiKey} from the global security.
32
30
  */
33
- export declare function internsChat(client: OpenRouterCore, request: operations.CreateInternChatCompletionRequest, options?: RequestOptions): APIPromise<Result<EventStream<models.InternChatCompletionChunk>, errors.InternChatErrorResponse | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
31
+ export declare function internsChat(client: OpenRouterCore, request: operations.CreateInternChatCompletionRequest, options?: RequestOptions): APIPromise<Result<operations.CreateInternChatCompletionResponse, errors.InternChatErrorResponse | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
34
32
  //# sourceMappingURL=internsChat.d.ts.map
@@ -2,9 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  * @generated-id: 36149dc7ea8d
4
4
  */
5
- import * as z from "zod/v4";
6
5
  import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
- import { EventStream } from "../lib/event-streams.js";
8
6
  import { matchStatusCode } from "../lib/http.js";
9
7
  import * as M from "../lib/matchers.js";
10
8
  import { compactMap } from "../lib/primitives.js";
@@ -12,7 +10,6 @@ import { safeParse } from "../lib/schemas.js";
12
10
  import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
11
  import { pathToFunc } from "../lib/url.js";
14
12
  import * as errors from "../models/errors/index.js";
15
- import * as models from "../models/index.js";
16
13
  import * as operations from "../models/operations/index.js";
17
14
  import { APIPromise } from "../types/async.js";
18
15
  /**
@@ -113,18 +110,13 @@ async function $do(client, request, options) {
113
110
  const responseFields = {
114
111
  HttpMeta: { Response: response, Request: req },
115
112
  };
116
- const [result] = await M.match(M.sse(200, z.custom(x => x instanceof ReadableStream)
117
- .transform(stream => {
118
- return new EventStream(stream, rawEvent => {
119
- if (rawEvent.data === "[DONE]") {
120
- return { done: true, value: undefined };
121
- }
122
- return {
123
- done: false,
124
- value: models.InternChatStreamingResponse$inboundSchema.parse(rawEvent)?.data,
125
- };
126
- });
127
- })), M.jsonErr([400, 401, 403, 404, 409, 410, 413, 429], errors.InternChatErrorResponse$inboundSchema), M.jsonErr([502, 503, 504], errors.InternChatErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
113
+ const [result] = await M.match(M.sse(200, operations.CreateInternChatCompletionResponse$inboundSchema, {
114
+ key: "Result",
115
+ }), M.jsonErr([400, 401, 403, 404, 408, 410, 413], errors.InternChatErrorResponse$inboundSchema), M.jsonErr([409, 429], errors.InternChatErrorResponse$inboundSchema, {
116
+ hdrs: true,
117
+ }), M.jsonErr(503, errors.InternChatErrorResponse$inboundSchema, {
118
+ hdrs: true,
119
+ }), M.jsonErr([502, 504], errors.InternChatErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
128
120
  if (!result.ok) {
129
121
  return [result, { status: "complete", request: req, response }];
130
122
  }
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Provision an intern
14
14
  *
15
15
  * @remarks
16
- * Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Provision an intern
18
18
  *
19
19
  * @remarks
20
- * Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -96,7 +96,7 @@ async function $do(client, request, options) {
96
96
  const responseFields = {
97
97
  HttpMeta: { Response: response, Request: req },
98
98
  };
99
- const [result] = await M.match(M.json(202, models.ProvisionInternResponse$inboundSchema), M.jsonErr([401, 403, 404, 408, 409], errors.InternLifecycleError$inboundSchema), M.jsonErr([500, 502], errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
99
+ const [result] = await M.match(M.json(202, models.ProvisionInternResponse$inboundSchema), M.jsonErr([400, 401, 403, 404, 408, 409, 413], errors.InternLifecycleError$inboundSchema), M.jsonErr([500, 502], errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
100
100
  if (!result.ok) {
101
101
  return [result, { status: "complete", request: req, response }];
102
102
  }
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
13
13
  * Suspend an intern
14
14
  *
15
15
  * @remarks
16
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
16
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
17
17
  *
18
18
  * If set, this operation will use {@link Security.apiKey} from the global security.
19
19
  */
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
17
17
  * Suspend an intern
18
18
  *
19
19
  * @remarks
20
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
20
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
21
21
  *
22
22
  * If set, this operation will use {@link Security.apiKey} from the global security.
23
23
  */
@@ -96,7 +96,7 @@ async function $do(client, request, options) {
96
96
  const responseFields = {
97
97
  HttpMeta: { Response: response, Request: req },
98
98
  };
99
- const [result] = await M.match(M.json(200, models.SuspendInternResponse$inboundSchema), M.jsonErr([401, 403, 404, 408, 409], errors.InternLifecycleError$inboundSchema), M.jsonErr([500, 502], errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
99
+ const [result] = await M.match(M.json(200, models.SuspendInternResponse$inboundSchema), M.jsonErr([400, 401, 403, 404, 408, 409, 413], errors.InternLifecycleError$inboundSchema), M.jsonErr([500, 502], errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
100
100
  if (!result.ok) {
101
101
  return [result, { status: "complete", request: req, response }];
102
102
  }
@@ -99,7 +99,7 @@ async function $do(client, request, options) {
99
99
  const responseFields = {
100
100
  HttpMeta: { Response: response, Request: req },
101
101
  };
102
- const [result] = await M.match(M.json(200, models.Intern$inboundSchema), M.jsonErr([400, 401, 403, 404, 408, 413], errors.InternLifecycleError$inboundSchema), M.jsonErr(500, errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
102
+ const [result] = await M.match(M.json(200, models.Intern$inboundSchema), M.jsonErr([400, 401, 403, 404, 408, 409, 413], errors.InternLifecycleError$inboundSchema), M.jsonErr(500, errors.InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
103
103
  if (!result.ok) {
104
104
  return [result, { status: "complete", request: req, response }];
105
105
  }
@@ -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.3.8";
53
+ readonly sdkVersion: "1.3.10";
54
54
  readonly genVersion: "2.914.0";
55
- readonly userAgent: "speakeasy-sdk/typescript 1.3.8 2.914.0 1.0.0 @openrouter/sdk";
55
+ readonly userAgent: "speakeasy-sdk/typescript 1.3.10 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.3.8",
32
+ sdkVersion: "1.3.10",
33
33
  genVersion: "2.914.0",
34
- userAgent: "speakeasy-sdk/typescript 1.3.8 2.914.0 1.0.0 @openrouter/sdk",
34
+ userAgent: "speakeasy-sdk/typescript 1.3.10 2.914.0 1.0.0 @openrouter/sdk",
35
35
  };
36
36
  //# sourceMappingURL=config.js.map
@@ -35,6 +35,10 @@ export type InternChatErrorMetadata = {
35
35
  * A stable reason a client can branch on.
36
36
  */
37
37
  reason: InternChatErrorMetadataReason;
38
+ /**
39
+ * Whether the same request may be sent again unchanged. Always `true` for the transient refusals — `busy`, `intern_not_ready`, `intern_unreachable`, `rate_limited`, `stream_severed` and `timeout` — and always `false` for the ones a retry cannot fix. For `turn_failed` it varies by failure and is the intern's own classification of what went wrong: `true` for an upstream overload, rate limit, timeout or transport fault, `false` for an authentication or bad-request failure that would be rejected the same way again. Branch on this field rather than on `reason` when deciding whether to retry. A `429`, and a `409` or `503` with reason `busy`, also carry a `Retry-After` header saying how long to wait.
40
+ */
41
+ retryable: boolean;
38
42
  };
39
43
  /** @internal */
40
44
  export declare const InternChatErrorMetadataReason$inboundSchema: z.ZodType<InternChatErrorMetadataReason, unknown>;
@@ -31,6 +31,7 @@ export const InternChatErrorMetadataReason$inboundSchema = openEnums.inboundSche
31
31
  /** @internal */
32
32
  export const InternChatErrorMetadata$inboundSchema = z.object({
33
33
  reason: InternChatErrorMetadataReason$inboundSchema,
34
+ retryable: z.boolean(),
34
35
  });
35
36
  export function internChatErrorMetadataFromJSON(jsonString) {
36
37
  return safeParse(jsonString, (x) => InternChatErrorMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternChatErrorMetadata' from JSON`);
@@ -2,14 +2,22 @@ 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
  export type Code = string | number;
5
+ export type InternLifecycleErrorMetadata = {
6
+ reason: string;
7
+ retryable: boolean;
8
+ };
5
9
  export type InternLifecycleErrorError = {
6
10
  code: string | number;
7
11
  message: string;
12
+ metadata?: InternLifecycleErrorMetadata | undefined;
8
13
  };
9
14
  /** @internal */
10
15
  export declare const Code$inboundSchema: z.ZodType<Code, unknown>;
11
16
  export declare function codeFromJSON(jsonString: string): SafeParseResult<Code, SDKValidationError>;
12
17
  /** @internal */
18
+ export declare const InternLifecycleErrorMetadata$inboundSchema: z.ZodType<InternLifecycleErrorMetadata, unknown>;
19
+ export declare function internLifecycleErrorMetadataFromJSON(jsonString: string): SafeParseResult<InternLifecycleErrorMetadata, SDKValidationError>;
20
+ /** @internal */
13
21
  export declare const InternLifecycleErrorError$inboundSchema: z.ZodType<InternLifecycleErrorError, unknown>;
14
22
  export declare function internLifecycleErrorErrorFromJSON(jsonString: string): SafeParseResult<InternLifecycleErrorError, SDKValidationError>;
15
23
  //# sourceMappingURL=internlifecycleerror.d.ts.map
@@ -13,9 +13,18 @@ export function codeFromJSON(jsonString) {
13
13
  return safeParse(jsonString, (x) => Code$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Code' from JSON`);
14
14
  }
15
15
  /** @internal */
16
+ export const InternLifecycleErrorMetadata$inboundSchema = z.object({
17
+ reason: z.string(),
18
+ retryable: z.boolean(),
19
+ });
20
+ export function internLifecycleErrorMetadataFromJSON(jsonString) {
21
+ return safeParse(jsonString, (x) => InternLifecycleErrorMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternLifecycleErrorMetadata' from JSON`);
22
+ }
23
+ /** @internal */
16
24
  export const InternLifecycleErrorError$inboundSchema = z.object({
17
25
  code: z.union([z.string(), z.int()]),
18
26
  message: z.string(),
27
+ metadata: z.lazy(() => InternLifecycleErrorMetadata$inboundSchema).optional(),
19
28
  });
20
29
  export function internLifecycleErrorErrorFromJSON(jsonString) {
21
30
  return safeParse(jsonString, (x) => InternLifecycleErrorError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternLifecycleErrorError' from JSON`);
@@ -42,7 +42,7 @@ export type CreateInternRequest = {
42
42
  */
43
43
  appCategories?: string | undefined;
44
44
  /**
45
- * Key that makes retries resume the same create operation. Without one, the server derives a stable key from the request body.
45
+ * Key that makes retries resume the same create operation, from 1 through 255 characters. An empty or longer key is refused with 400. Without the header, the server derives a stable key from the request body.
46
46
  */
47
47
  idempotencyKey?: string | undefined;
48
48
  createInternRequest: models.CreateInternRequest;
@@ -1,4 +1,7 @@
1
1
  import * as z from "zod/v4";
2
+ import { EventStream } from "../../lib/event-streams.js";
3
+ import { Result as SafeParseResult } from "../../types/fp.js";
4
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
2
5
  import * as models from "../index.js";
3
6
  export type CreateInternChatCompletionGlobals = {
4
7
  /**
@@ -47,6 +50,12 @@ export type CreateInternChatCompletionRequest = {
47
50
  internId: string;
48
51
  internChatCompletionRequest: models.InternChatCompletionRequest;
49
52
  };
53
+ export type CreateInternChatCompletionResponse = {
54
+ headers: {
55
+ [k: string]: Array<string>;
56
+ };
57
+ result: EventStream<models.InternChatCompletionChunk>;
58
+ };
50
59
  /** @internal */
51
60
  export type CreateInternChatCompletionRequest$Outbound = {
52
61
  "HTTP-Referer"?: string | undefined;
@@ -58,4 +67,7 @@ export type CreateInternChatCompletionRequest$Outbound = {
58
67
  /** @internal */
59
68
  export declare const CreateInternChatCompletionRequest$outboundSchema: z.ZodType<CreateInternChatCompletionRequest$Outbound, CreateInternChatCompletionRequest>;
60
69
  export declare function createInternChatCompletionRequestToJSON(createInternChatCompletionRequest: CreateInternChatCompletionRequest): string;
70
+ /** @internal */
71
+ export declare const CreateInternChatCompletionResponse$inboundSchema: z.ZodType<CreateInternChatCompletionResponse, unknown>;
72
+ export declare function createInternChatCompletionResponseFromJSON(jsonString: string): SafeParseResult<CreateInternChatCompletionResponse, SDKValidationError>;
61
73
  //# sourceMappingURL=createinternchatcompletion.d.ts.map
@@ -3,7 +3,9 @@
3
3
  * @generated-id: 0d92e801a635
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { EventStream } from "../../lib/event-streams.js";
6
7
  import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
7
9
  import * as models from "../index.js";
8
10
  /** @internal */
9
11
  export const CreateInternChatCompletionRequest$outboundSchema = z.object({
@@ -21,4 +23,27 @@ export const CreateInternChatCompletionRequest$outboundSchema = z.object({
21
23
  export function createInternChatCompletionRequestToJSON(createInternChatCompletionRequest) {
22
24
  return JSON.stringify(CreateInternChatCompletionRequest$outboundSchema.parse(createInternChatCompletionRequest));
23
25
  }
26
+ /** @internal */
27
+ export const CreateInternChatCompletionResponse$inboundSchema = z.object({
28
+ Headers: z.record(z.string(), z.array(z.string())).default({}),
29
+ Result: z.custom(x => x instanceof ReadableStream)
30
+ .transform(stream => {
31
+ return new EventStream(stream, rawEvent => {
32
+ if (rawEvent.data === "[DONE]")
33
+ return { done: true, value: undefined };
34
+ return {
35
+ done: false,
36
+ value: models.InternChatStreamingResponse$inboundSchema.parse(rawEvent)?.data,
37
+ };
38
+ });
39
+ }),
40
+ }).transform((v) => {
41
+ return remap$(v, {
42
+ "Headers": "headers",
43
+ "Result": "result",
44
+ });
45
+ });
46
+ export function createInternChatCompletionResponseFromJSON(jsonString) {
47
+ return safeParse(jsonString, (x) => CreateInternChatCompletionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateInternChatCompletionResponse' from JSON`);
48
+ }
24
49
  //# sourceMappingURL=createinternchatcompletion.js.map
@@ -57,7 +57,7 @@ export type ListInternsRequest = {
57
57
  */
58
58
  limit?: number | undefined;
59
59
  /**
60
- * Comma-separated lifecycle statuses to include.
60
+ * Comma-separated lifecycle statuses to include, at most 8. Repeats are collapsed.
61
61
  */
62
62
  status?: Array<Status> | undefined;
63
63
  /**
@@ -465,6 +465,7 @@ export type VideoGenerationRequestProvider = {
465
465
  * Resolution of the generated video
466
466
  */
467
467
  export declare const VideoGenerationRequestResolution: {
468
+ readonly ThreeHundredAndSixtyp: "360p";
468
469
  readonly FourHundredAndEightyp: "480p";
469
470
  readonly SevenHundredAndTwentyp: "720p";
470
471
  readonly SevenHundredAndSixtyEightp: "768p";
@@ -26,6 +26,7 @@ export const VideoGenerationRequestAspectRatio = {
26
26
  * Resolution of the generated video
27
27
  */
28
28
  export const VideoGenerationRequestResolution = {
29
+ ThreeHundredAndSixtyp: "360p",
29
30
  FourHundredAndEightyp: "480p",
30
31
  SevenHundredAndTwentyp: "720p",
31
32
  SevenHundredAndSixtyEightp: "768p",
@@ -20,6 +20,7 @@ export declare const SupportedFrameImage: {
20
20
  };
21
21
  export type SupportedFrameImage = OpenEnum<typeof SupportedFrameImage>;
22
22
  export declare const SupportedResolution: {
23
+ readonly ThreeHundredAndSixtyp: "360p";
23
24
  readonly FourHundredAndEightyp: "480p";
24
25
  readonly SevenHundredAndTwentyp: "720p";
25
26
  readonly SevenHundredAndSixtyEightp: "768p";
@@ -30,12 +31,20 @@ export declare const SupportedResolution: {
30
31
  };
31
32
  export type SupportedResolution = OpenEnum<typeof SupportedResolution>;
32
33
  export declare const SupportedSize: {
34
+ readonly ThreeHundredAndSixtyx360: "360x360";
35
+ readonly ThreeHundredAndSixtyx480: "360x480";
36
+ readonly ThreeHundredAndSixtyx540: "360x540";
37
+ readonly ThreeHundredAndSixtyx640: "360x640";
38
+ readonly ThreeHundredAndSixtyx840: "360x840";
39
+ readonly FourHundredAndEightyx360: "480x360";
33
40
  readonly FourHundredAndEightyx480: "480x480";
34
41
  readonly FourHundredAndEightyx640: "480x640";
35
42
  readonly FourHundredAndEightyx720: "480x720";
36
43
  readonly FourHundredAndEightyx854: "480x854";
37
44
  readonly FourHundredAndEightyx1120: "480x1120";
45
+ readonly FiveHundredAndFortyx360: "540x360";
38
46
  readonly FiveHundredAndSixtyx752: "560x752";
47
+ readonly SixHundredAndFortyx360: "640x360";
39
48
  readonly SixHundredAndFortyx480: "640x480";
40
49
  readonly SixHundredAndFortyx640: "640x640";
41
50
  readonly SevenHundredAndTwentyx480: "720x480";
@@ -51,6 +60,7 @@ export declare const SupportedSize: {
51
60
  readonly SevenHundredAndSixtyEightx1366: "768x1366";
52
61
  readonly SevenHundredAndSixtyEightx1792: "768x1792";
53
62
  readonly EightHundredAndThirtyFourx1112: "834x1112";
63
+ readonly EightHundredAndFortyx360: "840x360";
54
64
  readonly EightHundredAndFiftyFourx480: "854x480";
55
65
  readonly NineHundredAndSixtyx720: "960x720";
56
66
  readonly NineHundredAndSixtyx960: "960x960";
@@ -22,6 +22,7 @@ export const SupportedFrameImage = {
22
22
  LastFrame: "last_frame",
23
23
  };
24
24
  export const SupportedResolution = {
25
+ ThreeHundredAndSixtyp: "360p",
25
26
  FourHundredAndEightyp: "480p",
26
27
  SevenHundredAndTwentyp: "720p",
27
28
  SevenHundredAndSixtyEightp: "768p",
@@ -31,12 +32,20 @@ export const SupportedResolution = {
31
32
  FourK: "4K",
32
33
  };
33
34
  export const SupportedSize = {
35
+ ThreeHundredAndSixtyx360: "360x360",
36
+ ThreeHundredAndSixtyx480: "360x480",
37
+ ThreeHundredAndSixtyx540: "360x540",
38
+ ThreeHundredAndSixtyx640: "360x640",
39
+ ThreeHundredAndSixtyx840: "360x840",
40
+ FourHundredAndEightyx360: "480x360",
34
41
  FourHundredAndEightyx480: "480x480",
35
42
  FourHundredAndEightyx640: "480x640",
36
43
  FourHundredAndEightyx720: "480x720",
37
44
  FourHundredAndEightyx854: "480x854",
38
45
  FourHundredAndEightyx1120: "480x1120",
46
+ FiveHundredAndFortyx360: "540x360",
39
47
  FiveHundredAndSixtyx752: "560x752",
48
+ SixHundredAndFortyx360: "640x360",
40
49
  SixHundredAndFortyx480: "640x480",
41
50
  SixHundredAndFortyx640: "640x640",
42
51
  SevenHundredAndTwentyx480: "720x480",
@@ -52,6 +61,7 @@ export const SupportedSize = {
52
61
  SevenHundredAndSixtyEightx1366: "768x1366",
53
62
  SevenHundredAndSixtyEightx1792: "768x1792",
54
63
  EightHundredAndThirtyFourx1112: "834x1112",
64
+ EightHundredAndFortyx360: "840x360",
55
65
  EightHundredAndFiftyFourx480: "854x480",
56
66
  NineHundredAndSixtyx720: "960x720",
57
67
  NineHundredAndSixtyx960: "960x960",
@@ -1,4 +1,3 @@
1
- import { EventStream } from "../lib/event-streams.js";
2
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
3
2
  import * as models from "../models/index.js";
4
3
  import * as operations from "../models/operations/index.js";
@@ -42,14 +41,14 @@ export declare class Interns extends ClientSDK {
42
41
  * Provision an intern
43
42
  *
44
43
  * @remarks
45
- * Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
44
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
46
45
  */
47
46
  provisionIntern(request: operations.ProvisionInternRequest, options?: RequestOptions): Promise<models.ProvisionInternResponse>;
48
47
  /**
49
48
  * Suspend an intern
50
49
  *
51
50
  * @remarks
52
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
51
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
53
52
  */
54
53
  suspendIntern(request: operations.SuspendInternRequest, options?: RequestOptions): Promise<models.SuspendInternResponse>;
55
54
  /**
@@ -70,6 +69,6 @@ export declare class Interns extends ClientSDK {
70
69
  *
71
70
  * Available to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`.
72
71
  */
73
- chat(request: operations.CreateInternChatCompletionRequest, options?: RequestOptions): Promise<EventStream<models.InternChatCompletionChunk>>;
72
+ chat(request: operations.CreateInternChatCompletionRequest, options?: RequestOptions): Promise<operations.CreateInternChatCompletionResponse>;
74
73
  }
75
74
  //# sourceMappingURL=interns.d.ts.map
@@ -62,7 +62,7 @@ export class Interns extends ClientSDK {
62
62
  * Provision an intern
63
63
  *
64
64
  * @remarks
65
- * Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
65
+ * Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
66
66
  */
67
67
  async provisionIntern(request, options) {
68
68
  return unwrapAsync(internsProvisionIntern(this, request, options));
@@ -71,7 +71,7 @@ export class Interns extends ClientSDK {
71
71
  * Suspend an intern
72
72
  *
73
73
  * @remarks
74
- * Stops the intern runtime while keeping its disk and configuration for a later provision call. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
74
+ * Stops the intern runtime while keeping its disk and configuration for a later provision call. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
75
75
  */
76
76
  async suspendIntern(request, options) {
77
77
  return unwrapAsync(internsSuspendIntern(this, request, options));
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@openrouter/sdk",
5
- "version": "1.3.8",
5
+ "version": "1.3.10",
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.3.8",
3
+ "version": "1.3.10",
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,14 +74,14 @@
74
74
  "build": "tsc",
75
75
  "prepublishOnly": "npm run build",
76
76
  "compile": "tsc",
77
- "postinstall": "node scripts/check-types.js || true",
77
+ "prepare": "npm run build",
78
78
  "test": "vitest --run --project unit",
79
79
  "test:e2e": "vitest --run --project e2e",
80
80
  "test:watch": "vitest --watch --project unit",
81
- "prepare": "npm run build",
81
+ "typecheck:transit": "exit 0",
82
+ "postinstall": "node scripts/check-types.js || true",
82
83
  "test:transit": "exit 0",
83
- "typecheck": "tsc --noEmit",
84
- "typecheck:transit": "exit 0"
84
+ "typecheck": "tsc --noEmit"
85
85
  },
86
86
  "peerDependencies": {},
87
87
  "devDependencies": {