@opencode/ai 0.0.0-dev-1285 → 0.0.0-dev-1288
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.
- package/README.md +69 -9
- package/dist/effect.d.ts +3 -1
- package/dist/image-client.d.ts +52 -59
- package/dist/image-client.js +47 -8
- package/dist/image.d.ts +27 -7
- package/dist/image.js +10 -6
- package/dist/index.d.ts +12 -7
- package/dist/index.js +12 -7
- package/dist/media-client.d.ts +13 -5
- package/dist/media-client.js +42 -37
- package/dist/media.d.ts +8 -0
- package/dist/media.js +14 -0
- package/dist/protocols/google-interactions-video.d.ts +38 -0
- package/dist/protocols/google-interactions-video.js +187 -0
- package/dist/protocols/google-interactions.d.ts +14 -1
- package/dist/protocols/google-interactions.js +1 -1
- package/dist/protocols/minimax-video.d.ts +45 -0
- package/dist/protocols/minimax-video.js +293 -0
- package/dist/protocols/openrouter-video.d.ts +36 -0
- package/dist/protocols/openrouter-video.js +139 -0
- package/dist/protocols/seedance-video.d.ts +45 -0
- package/dist/protocols/seedance-video.js +217 -0
- package/dist/protocols/utils/responses-compaction.js +1 -1
- package/dist/protocols/xai-video.d.ts +4 -9
- package/dist/protocols/xai-video.js +8 -7
- package/dist/providers/byteplus/videos.d.ts +2 -0
- package/dist/providers/byteplus/videos.js +1 -0
- package/dist/providers/byteplus.d.ts +26 -0
- package/dist/providers/byteplus.js +21 -0
- package/dist/providers/google/videos.d.ts +2 -0
- package/dist/providers/google/videos.js +1 -0
- package/dist/providers/google.d.ts +5 -0
- package/dist/providers/google.js +7 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +2 -0
- package/dist/providers/minimax/videos.d.ts +3 -0
- package/dist/providers/minimax/videos.js +1 -0
- package/dist/providers/minimax.d.ts +6 -1
- package/dist/providers/minimax.js +10 -1
- package/dist/providers/openrouter/videos.d.ts +2 -0
- package/dist/providers/openrouter/videos.js +1 -0
- package/dist/providers/openrouter.d.ts +5 -0
- package/dist/providers/openrouter.js +8 -0
- package/dist/providers/volcengine/videos.d.ts +2 -0
- package/dist/providers/volcengine/videos.js +1 -0
- package/dist/providers/volcengine.d.ts +26 -0
- package/dist/providers/volcengine.js +21 -0
- package/dist/providers/xai/videos.d.ts +2 -0
- package/dist/providers/xai/videos.js +1 -0
- package/dist/providers/xai.d.ts +4 -3
- package/dist/providers/xai.js +5 -1
- package/dist/public.d.ts +1 -1
- package/dist/route/executor-service.d.ts +6 -0
- package/dist/route/executor-service.js +7 -0
- package/dist/route/executor.d.ts +7 -1
- package/dist/route/executor.js +7 -2
- package/dist/route/media-protocol.d.ts +10 -0
- package/dist/route/media.js +17 -3
- package/dist/route/transport/http.js +1 -1
- package/dist/schema/options.d.ts +8 -0
- package/dist/schema/options.js +1 -0
- package/dist/video-client.d.ts +6 -6
- package/dist/video-client.js +13 -11
- package/dist/video.d.ts +14 -72
- package/dist/video.js +9 -8
- package/package.json +47 -3
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { Duration, Effect, Schema } from "effect";
|
|
2
|
+
import { Media } from "../media.js";
|
|
3
|
+
import { MediaProtocol } from "../route/media-protocol.js";
|
|
4
|
+
import { MediaRoute } from "../route/media.js";
|
|
5
|
+
import { mergeJsonRecords } from "../schema/index.js";
|
|
6
|
+
import { VideoModel, VideoResponse, seconds } from "../video.js";
|
|
7
|
+
import { ProviderShared, optionalNull } from "./shared.js";
|
|
8
|
+
// One Ark API (`/contents/generations/tasks`) served by Volcengine Ark in China and BytePlus ModelArk elsewhere.
|
|
9
|
+
export const VOLCENGINE_BASE_URL = "https://ark.cn-beijing.volces.com/api/v3";
|
|
10
|
+
export const BYTEPLUS_BASE_URL = "https://ark.ap-southeast.bytepluses.com/api/v3";
|
|
11
|
+
export const PATH = "/contents/generations/tasks";
|
|
12
|
+
// Video and last-frame URLs are documented as valid for 24 hours.
|
|
13
|
+
const OUTPUT_RETENTION = Duration.hours(24);
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// 2. Token and response schemas
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
/** The provider's job ID; it is all a later status, result or cancel call needs. */
|
|
18
|
+
export const Token = Schema.String;
|
|
19
|
+
const StartResponse = Schema.Struct({ id: Schema.String });
|
|
20
|
+
const Task = Schema.Struct({
|
|
21
|
+
id: optionalNull(Schema.String),
|
|
22
|
+
model: optionalNull(Schema.String),
|
|
23
|
+
status: Schema.String,
|
|
24
|
+
content: optionalNull(Schema.Struct({
|
|
25
|
+
video_url: optionalNull(Schema.String),
|
|
26
|
+
last_frame_url: optionalNull(Schema.String),
|
|
27
|
+
})),
|
|
28
|
+
error: optionalNull(Schema.Struct({
|
|
29
|
+
code: optionalNull(Schema.String),
|
|
30
|
+
message: optionalNull(Schema.String),
|
|
31
|
+
})),
|
|
32
|
+
usage: optionalNull(Schema.Struct({
|
|
33
|
+
completion_tokens: optionalNull(Schema.Number),
|
|
34
|
+
total_tokens: optionalNull(Schema.Number),
|
|
35
|
+
})),
|
|
36
|
+
updated_at: optionalNull(Schema.Number),
|
|
37
|
+
seed: optionalNull(Schema.Number),
|
|
38
|
+
resolution: optionalNull(Schema.String),
|
|
39
|
+
ratio: optionalNull(Schema.String),
|
|
40
|
+
duration: optionalNull(Schema.Number),
|
|
41
|
+
frames: optionalNull(Schema.Number),
|
|
42
|
+
framespersecond: optionalNull(Schema.Number),
|
|
43
|
+
generate_audio: optionalNull(Schema.Boolean),
|
|
44
|
+
output_format: optionalNull(Schema.String),
|
|
45
|
+
draft: optionalNull(Schema.Boolean),
|
|
46
|
+
service_tier: optionalNull(Schema.String),
|
|
47
|
+
});
|
|
48
|
+
const STATUS = {
|
|
49
|
+
queued: "queued",
|
|
50
|
+
running: "running",
|
|
51
|
+
succeeded: "completed",
|
|
52
|
+
failed: "failed",
|
|
53
|
+
cancelled: "cancelled",
|
|
54
|
+
expired: "expired",
|
|
55
|
+
};
|
|
56
|
+
// ---------------------------------------------------------------------------
|
|
57
|
+
// 3. Failures
|
|
58
|
+
// ---------------------------------------------------------------------------
|
|
59
|
+
// Ark error codes are dotted (`InvalidParameter.TaskTypeConstraint`); the leading segment is the category.
|
|
60
|
+
// `InternalServiceError`, `ServerOverloaded` and unknown codes are provider-side.
|
|
61
|
+
const FAILURE = {
|
|
62
|
+
InvalidParameter: "InvalidRequest",
|
|
63
|
+
MissingParameter: "InvalidRequest",
|
|
64
|
+
InvalidArgumentError: "InvalidRequest",
|
|
65
|
+
InvalidImageURL: "InvalidRequest",
|
|
66
|
+
AuthenticationError: "Authentication",
|
|
67
|
+
AccessDenied: "Authentication",
|
|
68
|
+
QuotaExceeded: "RateLimit",
|
|
69
|
+
RateLimitExceeded: "RateLimit",
|
|
70
|
+
};
|
|
71
|
+
// Input and output moderation codes: `InputImageSensitiveContentDetected.PrivacyInformation`,
|
|
72
|
+
// `OutputVideoSensitiveContentDetected`, `SensitiveContentDetected`, ...
|
|
73
|
+
const moderated = (code) => code !== undefined && code.includes("SensitiveContentDetected");
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// 4. Request body construction
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
const nativeOptions = (options) => {
|
|
78
|
+
if (!options)
|
|
79
|
+
return undefined;
|
|
80
|
+
const { draft_task: _draftTask, ...native } = options;
|
|
81
|
+
return native;
|
|
82
|
+
};
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// 5. Response decoding
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
// Ark returns `frames` when the request set it, otherwise `duration` rounded down to whole seconds.
|
|
87
|
+
const durationSeconds = (task) => {
|
|
88
|
+
if (task.frames !== undefined && task.frames !== null && task.framespersecond)
|
|
89
|
+
return task.frames / task.framespersecond;
|
|
90
|
+
return task.duration ?? undefined;
|
|
91
|
+
};
|
|
92
|
+
const make = (provider) => {
|
|
93
|
+
const route = MediaProtocol.identity({ id: "seedance-video", name: "Seedance Video", provider });
|
|
94
|
+
// `asset://<ID>` addresses a ModelArk digital character or authorized asset.
|
|
95
|
+
const item = (asset, type, role) => ProviderShared.mediaReference(asset, route.provider, route.name).pipe(Effect.map((reference) => ({
|
|
96
|
+
type,
|
|
97
|
+
[type]: { url: reference.type === "ref" ? `asset://${reference.value}` : reference.value },
|
|
98
|
+
role,
|
|
99
|
+
})));
|
|
100
|
+
const reference = (asset) => {
|
|
101
|
+
if (asset.kind === "video")
|
|
102
|
+
return item(asset, "video_url", "reference_video");
|
|
103
|
+
if (asset.kind === "audio")
|
|
104
|
+
return item(asset, "audio_url", "reference_audio");
|
|
105
|
+
return item(asset, "image_url", "reference_image");
|
|
106
|
+
};
|
|
107
|
+
// Frames and references are separate Seedance modes; mixing them is sent as-is and rejected by the provider.
|
|
108
|
+
const fromRequest = Effect.fn("SeedanceVideo.fromRequest")(function* (request) {
|
|
109
|
+
const content = [
|
|
110
|
+
// Every media mode accepts an optional prompt, so an empty one adds no text item.
|
|
111
|
+
...(request.prompt === "" ? [] : [{ type: "text", text: request.prompt }]),
|
|
112
|
+
...(request.start === undefined ? [] : [yield* item(request.start, "image_url", "first_frame")]),
|
|
113
|
+
...(request.end === undefined ? [] : [yield* item(request.end, "image_url", "last_frame")]),
|
|
114
|
+
...(yield* Effect.forEach(request.references ?? [], reference)),
|
|
115
|
+
...(request.providerOptions?.draft_task === undefined
|
|
116
|
+
? []
|
|
117
|
+
: [{ type: "draft_task", draft_task: request.providerOptions.draft_task }]),
|
|
118
|
+
];
|
|
119
|
+
return MediaProtocol.json(mergeJsonRecords({
|
|
120
|
+
model: request.model.id,
|
|
121
|
+
content,
|
|
122
|
+
duration: request.duration === undefined ? undefined : seconds(request.duration),
|
|
123
|
+
ratio: request.aspect === "auto" ? "adaptive" : request.aspect,
|
|
124
|
+
resolution: request.resolution,
|
|
125
|
+
generate_audio: request.sound,
|
|
126
|
+
}, nativeOptions(request.providerOptions), request.http?.body) ?? {});
|
|
127
|
+
});
|
|
128
|
+
const decodeStart = route.decodeStarted(StartResponse, (value) => ({
|
|
129
|
+
token: value.id,
|
|
130
|
+
snapshot: { id: value.id, status: "queued" },
|
|
131
|
+
}));
|
|
132
|
+
const decodeTask = route.decodeJson(Task);
|
|
133
|
+
const decodeStatus = Effect.fn("SeedanceVideo.decodeStatus")(function* (response, context) {
|
|
134
|
+
const output = yield* decodeTask(response);
|
|
135
|
+
return { id: context.token, status: MediaProtocol.status(STATUS, output.value.status) };
|
|
136
|
+
});
|
|
137
|
+
const decodeResult = Effect.fn("SeedanceVideo.decodeResult")(function* (response, context) {
|
|
138
|
+
const output = yield* decodeTask(response);
|
|
139
|
+
const task = output.value;
|
|
140
|
+
const status = MediaProtocol.status(STATUS, task.status);
|
|
141
|
+
if (status === "queued" || status === "running")
|
|
142
|
+
return yield* output.pending(context.token);
|
|
143
|
+
if (status === "failed") {
|
|
144
|
+
const code = task.error?.code ?? undefined;
|
|
145
|
+
const detail = task.error?.message ?? undefined;
|
|
146
|
+
const message = `${route.name} generation failed${code === undefined ? "" : ` (${code})`}${detail === undefined ? "" : `: ${detail}`}`;
|
|
147
|
+
if (moderated(code))
|
|
148
|
+
return yield* output.contentPolicy(message);
|
|
149
|
+
return yield* output.ended("failed", message, MediaProtocol.failure(FAILURE, code?.split(".")[0]));
|
|
150
|
+
}
|
|
151
|
+
if (status === "cancelled")
|
|
152
|
+
return yield* output.ended("cancelled", `${route.name} task ${context.token} was cancelled`);
|
|
153
|
+
if (status === "expired")
|
|
154
|
+
return yield* output.ended("expired", `${route.name} task ${context.token} expired`);
|
|
155
|
+
const videoURL = task.content?.video_url ?? undefined;
|
|
156
|
+
if (videoURL === undefined)
|
|
157
|
+
return yield* output.invalid(`${route.name} completed without a video URL`);
|
|
158
|
+
const duration = durationSeconds(task);
|
|
159
|
+
const options = {
|
|
160
|
+
mediaType: task.output_format === "mov" ? "video/quicktime" : "video/mp4",
|
|
161
|
+
info: duration === undefined ? undefined : { durationSeconds: duration },
|
|
162
|
+
};
|
|
163
|
+
// `updated_at` is when the task reached `succeeded`, which starts the URL's retention window.
|
|
164
|
+
const video = task.updated_at === undefined || task.updated_at === null
|
|
165
|
+
? yield* MediaProtocol.expiringUrl(videoURL, OUTPUT_RETENTION, options)
|
|
166
|
+
: Media.url(videoURL, {
|
|
167
|
+
...options,
|
|
168
|
+
expiresAt: task.updated_at * 1000 + Duration.toMillis(OUTPUT_RETENTION),
|
|
169
|
+
});
|
|
170
|
+
return new VideoResponse({
|
|
171
|
+
videos: [video],
|
|
172
|
+
usage: task.usage?.completion_tokens === undefined || task.usage.completion_tokens === null
|
|
173
|
+
? undefined
|
|
174
|
+
: {
|
|
175
|
+
type: "tokens",
|
|
176
|
+
output: task.usage.completion_tokens,
|
|
177
|
+
total: task.usage.total_tokens ?? undefined,
|
|
178
|
+
},
|
|
179
|
+
providerMetadata: {
|
|
180
|
+
[provider]: {
|
|
181
|
+
taskId: context.token,
|
|
182
|
+
model: task.model ?? undefined,
|
|
183
|
+
seed: task.seed ?? undefined,
|
|
184
|
+
ratio: task.ratio ?? undefined,
|
|
185
|
+
resolution: task.resolution ?? undefined,
|
|
186
|
+
duration: task.duration ?? undefined,
|
|
187
|
+
frames: task.frames ?? undefined,
|
|
188
|
+
framesPerSecond: task.framespersecond ?? undefined,
|
|
189
|
+
generateAudio: task.generate_audio ?? undefined,
|
|
190
|
+
outputFormat: task.output_format ?? undefined,
|
|
191
|
+
draft: task.draft ?? undefined,
|
|
192
|
+
serviceTier: task.service_tier ?? undefined,
|
|
193
|
+
lastFrameUrl: task.content?.last_frame_url ?? undefined,
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
const taskPath = (token) => `${PATH}/${encodeURIComponent(token)}`;
|
|
199
|
+
// DELETE cancels a queued task. Ark refuses it for a running task, and deletes the record of a finished one.
|
|
200
|
+
const protocol = MediaProtocol.queued(route, {
|
|
201
|
+
token: Token,
|
|
202
|
+
start: { body: { from: fromRequest }, decode: decodeStart },
|
|
203
|
+
status: { path: taskPath, decode: decodeStatus },
|
|
204
|
+
result: { path: taskPath, decode: decodeResult },
|
|
205
|
+
cancel: { method: "DELETE", path: taskPath },
|
|
206
|
+
});
|
|
207
|
+
const model = (input) => VideoModel.fromRoute({
|
|
208
|
+
protocol,
|
|
209
|
+
baseURL: provider === "volcengine" ? VOLCENGINE_BASE_URL : BYTEPLUS_BASE_URL,
|
|
210
|
+
path: PATH,
|
|
211
|
+
}, input);
|
|
212
|
+
return { protocol, model };
|
|
213
|
+
};
|
|
214
|
+
export const SeedanceVideo = {
|
|
215
|
+
volcengine: make("volcengine"),
|
|
216
|
+
byteplus: make("byteplus"),
|
|
217
|
+
};
|
|
@@ -88,7 +88,7 @@ export const make = (adapter, lowerTools) => Effect.fn("ResponsesCompaction.exec
|
|
|
88
88
|
auth: route.auth,
|
|
89
89
|
encodeBody: Schema.encodeSync(Schema.fromJsonString(Body)),
|
|
90
90
|
});
|
|
91
|
-
const response = yield* executor.execute(ProviderShared.jsonPost({
|
|
91
|
+
const response = yield* RequestExecutor.withTls(executor.execute, request.http?.tls)(ProviderShared.jsonPost({
|
|
92
92
|
url: parts.url,
|
|
93
93
|
body: parts.bodyText,
|
|
94
94
|
headers: parts.headers,
|
|
@@ -24,17 +24,12 @@ export type XAIVideoOptions = {
|
|
|
24
24
|
}>;
|
|
25
25
|
} & Record<string, unknown>;
|
|
26
26
|
export type Request = VideoRequest<VideoModel<XAIVideoOptions>>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}>;
|
|
27
|
+
/** The provider's job ID; it is all a later status, result or cancel call needs. */
|
|
28
|
+
export declare const Token: Schema.String;
|
|
30
29
|
export type Token = Schema.Schema.Type<typeof Token>;
|
|
31
|
-
export declare const protocol: MediaProtocol.Queued<Request, VideoResponse,
|
|
32
|
-
readonly requestID: string;
|
|
33
|
-
}>;
|
|
30
|
+
export declare const protocol: MediaProtocol.Queued<Request, VideoResponse, string>;
|
|
34
31
|
export declare const model: (input: MediaRoute.ModelInput) => VideoModel<XAIVideoOptions>;
|
|
35
32
|
export declare const XAIVideo: {
|
|
36
|
-
readonly protocol: MediaProtocol.Queued<Request, VideoResponse,
|
|
37
|
-
readonly requestID: string;
|
|
38
|
-
}>;
|
|
33
|
+
readonly protocol: MediaProtocol.Queued<Request, VideoResponse, string>;
|
|
39
34
|
readonly model: typeof model;
|
|
40
35
|
};
|
|
@@ -14,7 +14,8 @@ export const STATUS_PATH = "/videos";
|
|
|
14
14
|
// ---------------------------------------------------------------------------
|
|
15
15
|
// 2. Token and response schemas
|
|
16
16
|
// ---------------------------------------------------------------------------
|
|
17
|
-
|
|
17
|
+
/** The provider's job ID; it is all a later status, result or cancel call needs. */
|
|
18
|
+
export const Token = Schema.String;
|
|
18
19
|
const StartResponse = Schema.Struct({ request_id: Schema.String });
|
|
19
20
|
const VideoStatus = Schema.Struct({
|
|
20
21
|
status: Schema.String,
|
|
@@ -78,7 +79,7 @@ const fromRequest = Effect.fn("XAIVideo.fromRequest")(function* (request) {
|
|
|
78
79
|
// 6. Response decoding
|
|
79
80
|
// ---------------------------------------------------------------------------
|
|
80
81
|
const decodeStart = route.decodeStarted(StartResponse, (value) => ({
|
|
81
|
-
token:
|
|
82
|
+
token: value.request_id,
|
|
82
83
|
snapshot: { id: value.request_id, status: "running" },
|
|
83
84
|
}));
|
|
84
85
|
// `progress` is undocumented but observed live as a 0..100 percentage (recorded cassette: 1 → 10 → 37 → 100).
|
|
@@ -87,21 +88,21 @@ const decodeVideoStatus = route.decodeJson(VideoStatus);
|
|
|
87
88
|
const decodeStatus = Effect.fn("XAIVideo.decodeStatus")(function* (response, context) {
|
|
88
89
|
const output = yield* decodeVideoStatus(response);
|
|
89
90
|
const status = MediaProtocol.status(STATUS, output.value.status);
|
|
90
|
-
return { id: context.token
|
|
91
|
+
return { id: context.token, status, progress: fraction(output.value.progress) };
|
|
91
92
|
});
|
|
92
93
|
const decodeResult = Effect.fn("XAIVideo.decodeResult")(function* (response, context) {
|
|
93
94
|
const output = yield* decodeVideoStatus(response);
|
|
94
95
|
const decoded = output.value;
|
|
95
96
|
const status = MediaProtocol.status(STATUS, decoded.status);
|
|
96
97
|
if (status === "running")
|
|
97
|
-
return yield* output.pending(context.token
|
|
98
|
+
return yield* output.pending(context.token);
|
|
98
99
|
if (status === "failed") {
|
|
99
100
|
const code = decoded.error?.code ?? undefined;
|
|
100
101
|
const message = decoded.error?.message ?? undefined;
|
|
101
102
|
return yield* output.ended("failed", `${route.name} generation failed${code === undefined ? "" : ` (${code})`}${message === undefined ? "" : `: ${message}`}`, MediaProtocol.failure(FAILURE, code));
|
|
102
103
|
}
|
|
103
104
|
if (status !== "completed")
|
|
104
|
-
return yield* output.ended("expired", `${route.name} request ${context.token
|
|
105
|
+
return yield* output.ended("expired", `${route.name} request ${context.token} expired`);
|
|
105
106
|
// `respect_moderation: false` marks a filtered result; a URL may still be present, so only a missing one fails.
|
|
106
107
|
const moderated = decoded.video?.respect_moderation === false;
|
|
107
108
|
const url = decoded.video?.url ?? undefined;
|
|
@@ -119,7 +120,7 @@ const decodeResult = Effect.fn("XAIVideo.decodeResult")(function* (response, con
|
|
|
119
120
|
],
|
|
120
121
|
providerMetadata: {
|
|
121
122
|
xai: {
|
|
122
|
-
requestId: context.token
|
|
123
|
+
requestId: context.token,
|
|
123
124
|
model: decoded.model ?? undefined,
|
|
124
125
|
respectModeration: decoded.video?.respect_moderation ?? undefined,
|
|
125
126
|
},
|
|
@@ -129,7 +130,7 @@ const decodeResult = Effect.fn("XAIVideo.decodeResult")(function* (response, con
|
|
|
129
130
|
// ---------------------------------------------------------------------------
|
|
130
131
|
// 7. Protocol and route
|
|
131
132
|
// ---------------------------------------------------------------------------
|
|
132
|
-
const statusPath = (token) => `${STATUS_PATH}/${token
|
|
133
|
+
const statusPath = (token) => `${STATUS_PATH}/${encodeURIComponent(token)}`;
|
|
133
134
|
export const protocol = MediaProtocol.queued(route, {
|
|
134
135
|
token: Token,
|
|
135
136
|
start: { body: { from: fromRequest }, decode: decodeStart },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { videoModel as model } from "../byteplus.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ProviderPackage } from "../provider-package.js";
|
|
2
|
+
import { type ProviderAuthOption } from "../route/auth-options.js";
|
|
3
|
+
import { type HttpOptions, type ModelID, type ProviderOptions } from "../schema/index.js";
|
|
4
|
+
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
5
|
+
export type Config = ProviderAuthOption<"optional"> & {
|
|
6
|
+
readonly baseURL?: string;
|
|
7
|
+
readonly headers?: Record<string, string>;
|
|
8
|
+
readonly http?: HttpOptions;
|
|
9
|
+
};
|
|
10
|
+
export type Settings = ProviderPackage.Settings & {
|
|
11
|
+
readonly apiKey?: string | false;
|
|
12
|
+
readonly baseURL?: string;
|
|
13
|
+
};
|
|
14
|
+
export type { SeedanceVideoOptions } from "../protocols/seedance-video.js";
|
|
15
|
+
export declare const configure: (input?: Config) => {
|
|
16
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
17
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/seedance-video.js").SeedanceVideoOptions>;
|
|
18
|
+
configure: typeof configure;
|
|
19
|
+
};
|
|
20
|
+
export declare const provider: {
|
|
21
|
+
id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
22
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/seedance-video.js").SeedanceVideoOptions>;
|
|
23
|
+
configure: typeof configure;
|
|
24
|
+
};
|
|
25
|
+
export declare const videoModel: (modelID: string, settings?: Settings) => import("../video.js").VideoModel<import("../protocols/seedance-video.js").SeedanceVideoOptions>;
|
|
26
|
+
export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/seedance-video.js").SeedanceVideoOptions>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SeedanceVideo } from "../protocols/seedance-video.js";
|
|
2
|
+
import { AuthOptions } from "../route/auth-options.js";
|
|
3
|
+
import { MediaRoute } from "../route/media.js";
|
|
4
|
+
import { ProviderID } from "../schema/index.js";
|
|
5
|
+
import { toConfig } from "./settings.js";
|
|
6
|
+
export const id = ProviderID.make("byteplus");
|
|
7
|
+
const auth = (options) => AuthOptions.bearer(options, "BYTEPLUS_API_KEY");
|
|
8
|
+
export const configure = (input = {}) => {
|
|
9
|
+
const media = MediaRoute.deployment(input, auth(input));
|
|
10
|
+
return {
|
|
11
|
+
id,
|
|
12
|
+
video: (modelID, providerOptions) => SeedanceVideo.byteplus.model({ ...media, id: modelID, providerOptions }),
|
|
13
|
+
configure,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export const provider = configure();
|
|
17
|
+
export const videoModel = (modelID, settings) => {
|
|
18
|
+
const input = toConfig(settings);
|
|
19
|
+
return configure(input).video(modelID, input.providerOptions);
|
|
20
|
+
};
|
|
21
|
+
export const video = provider.video;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { videoModel as model } from "../google.js";
|
|
@@ -7,6 +7,7 @@ import { GoogleDecisions } from "../protocols/google-decisions.js";
|
|
|
7
7
|
import { GoogleInteractions } from "../protocols/google-interactions.js";
|
|
8
8
|
export type { OptionsInput as GoogleEmbeddingOptions } from "../protocols/google-embed-content.js";
|
|
9
9
|
export type { GoogleImageOptions } from "../protocols/google-images.js";
|
|
10
|
+
export type { GoogleVideoOptions } from "../protocols/google-interactions-video.js";
|
|
10
11
|
export type { GoogleSpeechOptions } from "../protocols/google-speech.js";
|
|
11
12
|
export type { GoogleTranscriptionOptions } from "../protocols/google-transcription.js";
|
|
12
13
|
export type GeminiOptionsInput = Gemini.OptionsInput;
|
|
@@ -181,6 +182,7 @@ export declare const configure: (input?: Config) => {
|
|
|
181
182
|
readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
|
|
182
183
|
}, import("../route.js").CompactionOperations | undefined>;
|
|
183
184
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
185
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
|
|
184
186
|
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
185
187
|
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
|
186
188
|
embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
|
|
@@ -199,6 +201,7 @@ export declare const provider: {
|
|
|
199
201
|
readonly serviceTier?: import("../schema/options.js").OpenString<"deferred" | "flex" | "priority" | "standard"> | undefined;
|
|
200
202
|
}, import("../route.js").CompactionOperations | undefined>;
|
|
201
203
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
204
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
|
|
202
205
|
speech: (modelID: string | ModelID) => import("../speech.js").SpeechModel<import("../protocols/google-speech.js").GoogleSpeechOptions>;
|
|
203
206
|
transcription: (modelID: string | ModelID) => import("../transcription.js").TranscriptionModel<import("../protocols/google-transcription.js").GoogleTranscriptionOptions>;
|
|
204
207
|
embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
|
|
@@ -207,9 +210,11 @@ export declare const provider: {
|
|
|
207
210
|
};
|
|
208
211
|
export declare const model: ProviderPackage.Model<Settings, Gemini.ProviderOptionsInput>;
|
|
209
212
|
export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
213
|
+
export declare const videoModel: (modelID: string, settings?: Settings) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
|
|
210
214
|
export declare const embeddingModel: (modelID: string, settings?: Settings) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
|
|
211
215
|
export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<GoogleDecisions.OptionsInput>;
|
|
212
216
|
export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/google-images.js").GoogleImageOptions>;
|
|
217
|
+
export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("../protocols/google-interactions-video.js").GoogleVideoOptions>;
|
|
213
218
|
export declare const embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<GoogleEmbeddingOptionsInput>;
|
|
214
219
|
export declare const gemini: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<Gemini.OptionsInput, import("../route.js").CompactionOperations | undefined>;
|
|
215
220
|
export declare const interactions: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<{
|
package/dist/providers/google.js
CHANGED
|
@@ -6,6 +6,7 @@ import { Gemini } from "../protocols/gemini.js";
|
|
|
6
6
|
import { GoogleEmbedContent, } from "../protocols/google-embed-content.js";
|
|
7
7
|
import { GoogleDecisions } from "../protocols/google-decisions.js";
|
|
8
8
|
import { GoogleInteractions } from "../protocols/google-interactions.js";
|
|
9
|
+
import { GoogleInteractionsVideo } from "../protocols/google-interactions-video.js";
|
|
9
10
|
import { GoogleImages } from "../protocols/google-images.js";
|
|
10
11
|
import { GoogleSpeech } from "../protocols/google-speech.js";
|
|
11
12
|
import { GoogleTranscription } from "../protocols/google-transcription.js";
|
|
@@ -38,6 +39,7 @@ export const configure = (input = {}) => {
|
|
|
38
39
|
gemini,
|
|
39
40
|
interactions: (modelID) => interactionsRoute(input).model({ id: modelID }),
|
|
40
41
|
image: (modelID, providerOptions) => GoogleImages.model({ ...media, id: modelID, providerOptions }),
|
|
42
|
+
video: (modelID, providerOptions) => GoogleInteractionsVideo.model({ ...media, id: modelID, providerOptions }),
|
|
41
43
|
speech: (modelID) => GoogleSpeech.model({ ...media, id: modelID }),
|
|
42
44
|
transcription: (modelID) => GoogleTranscription.model({ ...media, id: modelID }),
|
|
43
45
|
embedding: (modelID, providerOptions) => embeddingRoute.model({ id: modelID, providerOptions }),
|
|
@@ -53,6 +55,10 @@ export const imageModel = (modelID, settings) => {
|
|
|
53
55
|
const input = toConfig(settings);
|
|
54
56
|
return configure(input).image(modelID, input.providerOptions);
|
|
55
57
|
};
|
|
58
|
+
export const videoModel = (modelID, settings) => {
|
|
59
|
+
const input = toConfig(settings);
|
|
60
|
+
return configure(input).video(modelID, input.providerOptions);
|
|
61
|
+
};
|
|
56
62
|
export const embeddingModel = (modelID, settings) => {
|
|
57
63
|
const input = toConfig(settings);
|
|
58
64
|
return configure(input).embedding(modelID, input.providerOptions);
|
|
@@ -62,6 +68,7 @@ export const decisionModel = (modelID, settings) => {
|
|
|
62
68
|
return configure(input).decision(modelID, input.providerOptions);
|
|
63
69
|
};
|
|
64
70
|
export const image = provider.image;
|
|
71
|
+
export const video = provider.video;
|
|
65
72
|
export const embedding = provider.embedding;
|
|
66
73
|
export const gemini = provider.gemini;
|
|
67
74
|
export const interactions = provider.interactions;
|
|
@@ -6,6 +6,7 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
|
6
6
|
export * as AssemblyAI from "./assemblyai.js";
|
|
7
7
|
export * as Azure from "./azure.js";
|
|
8
8
|
export * as Baseten from "./baseten.js";
|
|
9
|
+
export * as BytePlus from "./byteplus.js";
|
|
9
10
|
export * as Cartesia from "./cartesia.js";
|
|
10
11
|
export * as Cerebras from "./cerebras.js";
|
|
11
12
|
export * as Cohere from "./cohere.js";
|
|
@@ -38,6 +39,7 @@ export * as TogetherAI from "./togetherai.js";
|
|
|
38
39
|
export * as TypeSafeAI from "./typesafe-ai.js";
|
|
39
40
|
export * as VercelAIGateway from "./vercel-ai-gateway.js";
|
|
40
41
|
export * as Venice from "./venice.js";
|
|
42
|
+
export * as Volcengine from "./volcengine.js";
|
|
41
43
|
export * as XAI from "./xai.js";
|
|
42
44
|
export * as ZAI from "./zai.js";
|
|
43
45
|
export * as ZAICodingPlan from "./zai-coding-plan.js";
|
package/dist/providers/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * as AmazonBedrockMantle from "./amazon-bedrock-mantle.js";
|
|
|
6
6
|
export * as AssemblyAI from "./assemblyai.js";
|
|
7
7
|
export * as Azure from "./azure.js";
|
|
8
8
|
export * as Baseten from "./baseten.js";
|
|
9
|
+
export * as BytePlus from "./byteplus.js";
|
|
9
10
|
export * as Cartesia from "./cartesia.js";
|
|
10
11
|
export * as Cerebras from "./cerebras.js";
|
|
11
12
|
export * as Cohere from "./cohere.js";
|
|
@@ -38,6 +39,7 @@ export * as TogetherAI from "./togetherai.js";
|
|
|
38
39
|
export * as TypeSafeAI from "./typesafe-ai.js";
|
|
39
40
|
export * as VercelAIGateway from "./vercel-ai-gateway.js";
|
|
40
41
|
export * as Venice from "./venice.js";
|
|
42
|
+
export * as Volcengine from "./volcengine.js";
|
|
41
43
|
export * as XAI from "./xai.js";
|
|
42
44
|
export * as ZAI from "./zai.js";
|
|
43
45
|
export * as ZAICodingPlan from "./zai-coding-plan.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { videoModel as model } from "../minimax.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ProviderPackage } from "../provider-package.js";
|
|
2
2
|
import { AnthropicMessages } from "../protocols/anthropic-messages.js";
|
|
3
3
|
import { type MiniMaxImageOptions } from "../protocols/minimax-images.js";
|
|
4
|
+
import { type MiniMaxVideoOptions } from "../protocols/minimax-video.js";
|
|
4
5
|
import type { ProviderAuthOption } from "../route/auth-options.js";
|
|
5
6
|
import { Route } from "../route/client.js";
|
|
6
7
|
import { type ModelID, type ProviderOptions, type RequestOptions } from "../schema/index.js";
|
|
@@ -34,7 +35,7 @@ export type Settings<Options = MessagesOptionsInput> = ProviderPackage.Settings
|
|
|
34
35
|
readonly apiKey?: string | false;
|
|
35
36
|
readonly baseURL?: string;
|
|
36
37
|
};
|
|
37
|
-
export type { MiniMaxImageOptions };
|
|
38
|
+
export type { MiniMaxImageOptions, MiniMaxVideoOptions };
|
|
38
39
|
export declare const routes: (Route<{
|
|
39
40
|
readonly context_management?: {
|
|
40
41
|
readonly edits: readonly {
|
|
@@ -725,6 +726,7 @@ export declare const configure: (input?: Config) => {
|
|
|
725
726
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
726
727
|
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
727
728
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
|
|
729
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
|
|
728
730
|
configure: typeof configure;
|
|
729
731
|
};
|
|
730
732
|
export declare const provider: {
|
|
@@ -734,12 +736,15 @@ export declare const provider: {
|
|
|
734
736
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
735
737
|
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
736
738
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
|
|
739
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
|
|
737
740
|
configure: typeof configure;
|
|
738
741
|
};
|
|
739
742
|
export declare const model: ProviderPackage.Model<Settings<MessagesOptionsInput>, MessagesOptionsInput>;
|
|
740
743
|
export declare const imageModel: (modelID: string, settings?: Settings<MiniMaxImageOptions>) => import("../image.js").ImageModel<MiniMaxImageOptions>;
|
|
744
|
+
export declare const videoModel: (modelID: string, settings?: Settings<MiniMaxVideoOptions>) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
|
|
741
745
|
export declare const messages: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<MessagesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
742
746
|
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ChatOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
743
747
|
export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<ResponsesOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
744
748
|
export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<MiniMaxImageOptions>;
|
|
749
|
+
export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<MiniMaxVideoOptions>;
|
|
745
750
|
export * as MiniMax from "./minimax.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
2
|
import { AnthropicMessages } from "../protocols/anthropic-messages.js";
|
|
3
3
|
import { MiniMaxImages } from "../protocols/minimax-images.js";
|
|
4
|
+
import { MiniMaxVideo } from "../protocols/minimax-video.js";
|
|
4
5
|
import { OpenAIChat } from "../protocols/openai-chat.js";
|
|
5
6
|
import { OpenResponses } from "../protocols/open-responses.js";
|
|
6
7
|
import { ProviderShared } from "../protocols/shared.js";
|
|
@@ -75,7 +76,10 @@ export const configure = (input = {}) => {
|
|
|
75
76
|
const responses = (modelID) => responsesRoute.with(defaults).model({ id: modelID });
|
|
76
77
|
const media = MediaRoute.deployment(input, defaults.auth);
|
|
77
78
|
const image = (modelID, providerOptions) => MiniMaxImages.model({ ...media, id: modelID, providerOptions });
|
|
78
|
-
|
|
79
|
+
// H3 is under /v2 and Hailuo under /v1, so video drops the version a shared `baseURL` carries for the other APIs.
|
|
80
|
+
const videoBaseURL = media.baseURL?.replace(/(\/v1)?\/*$/, "");
|
|
81
|
+
const video = (modelID, providerOptions) => MiniMaxVideo.model({ ...media, baseURL: videoBaseURL, id: modelID, providerOptions });
|
|
82
|
+
return { id, model: messages, messages, chat, responses, image, video, configure };
|
|
79
83
|
};
|
|
80
84
|
export const provider = configure();
|
|
81
85
|
export const model = (modelID, settings) => configure(toConfig(settings)).model(modelID);
|
|
@@ -83,8 +87,13 @@ export const imageModel = (modelID, settings) => {
|
|
|
83
87
|
const input = toConfig(settings);
|
|
84
88
|
return configure(input).image(modelID, input.providerOptions);
|
|
85
89
|
};
|
|
90
|
+
export const videoModel = (modelID, settings) => {
|
|
91
|
+
const input = toConfig(settings);
|
|
92
|
+
return configure(input).video(modelID, input.providerOptions);
|
|
93
|
+
};
|
|
86
94
|
export const messages = provider.messages;
|
|
87
95
|
export const chat = provider.chat;
|
|
88
96
|
export const responses = provider.responses;
|
|
89
97
|
export const image = provider.image;
|
|
98
|
+
export const video = provider.video;
|
|
90
99
|
export * as MiniMax from "./minimax.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { videoModel as model } from "../openrouter.js";
|
|
@@ -7,6 +7,7 @@ import type { ProviderPackage } from "../provider-package.js";
|
|
|
7
7
|
import { HttpTransport } from "../route/transport/index.js";
|
|
8
8
|
import { OpenAIChat } from "../protocols/openai-chat.js";
|
|
9
9
|
import type { OpenResponsesProviderOptionsInput } from "./open-responses-options.js";
|
|
10
|
+
export type { OpenRouterVideoOptions } from "../protocols/openrouter-video.js";
|
|
10
11
|
export declare const id: string & import("effect/Brand").Brand<"AI.ProviderID">;
|
|
11
12
|
export interface OpenRouterProviderRouting {
|
|
12
13
|
readonly [key: string]: unknown;
|
|
@@ -1146,6 +1147,7 @@ export declare const configure: (input?: Config) => {
|
|
|
1146
1147
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
|
|
1147
1148
|
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterResponsesProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
1148
1149
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1150
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("./openrouter.js").OpenRouterVideoOptions>;
|
|
1149
1151
|
decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
|
|
1150
1152
|
embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<OpenRouterEmbeddingOptions>;
|
|
1151
1153
|
configure: typeof configure;
|
|
@@ -1156,6 +1158,7 @@ export declare const provider: {
|
|
|
1156
1158
|
chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
|
|
1157
1159
|
responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterResponsesProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
1158
1160
|
image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1161
|
+
video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("./openrouter.js").OpenRouterVideoOptions>;
|
|
1159
1162
|
decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
|
|
1160
1163
|
embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<OpenRouterEmbeddingOptions>;
|
|
1161
1164
|
configure: typeof configure;
|
|
@@ -1163,11 +1166,13 @@ export declare const provider: {
|
|
|
1163
1166
|
export declare const decision: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
|
|
1164
1167
|
export declare const embedding: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../embedding.js").EmbeddingModel<OpenRouterEmbeddingOptions>;
|
|
1165
1168
|
export declare const image: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1169
|
+
export declare const video: (modelID: string | ModelID, providerOptions?: ProviderOptions) => import("../video.js").VideoModel<import("./openrouter.js").OpenRouterVideoOptions>;
|
|
1166
1170
|
export declare const chat: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterOptions, import("../route/client.js").CompactionOperations | undefined>;
|
|
1167
1171
|
export declare const responses: (modelID: string | ModelID) => import("../schema/options.js").LanguageModel<OpenRouterResponsesProviderOptionsInput, import("../route/client.js").CompactionOperations | undefined>;
|
|
1168
1172
|
export declare const model: ProviderPackage.Model<Settings, OpenRouterProviderOptionsInput>;
|
|
1169
1173
|
export declare const responsesModel: ProviderPackage.Model<Settings<OpenRouterResponsesProviderOptionsInput>, OpenRouterResponsesProviderOptionsInput>;
|
|
1170
1174
|
export declare const imageModel: (modelID: string, settings?: Settings) => import("../image.js").ImageModel<import("../protocols/openai-images.js").OpenAIImageOptions>;
|
|
1175
|
+
export declare const videoModel: (modelID: string, settings?: Settings) => import("../video.js").VideoModel<import("./openrouter.js").OpenRouterVideoOptions>;
|
|
1171
1176
|
export declare const decisionModel: (modelID: string, settings?: Settings) => import("../decision.js").DecisionModel<OpenRouterDecisionOptions>;
|
|
1172
1177
|
export declare const embeddingModel: (modelID: string, settings?: Settings) => import("../embedding.js").EmbeddingModel<OpenRouterEmbeddingOptions>;
|
|
1173
1178
|
export * as OpenRouter from "./openrouter.js";
|