@hebo-ai/gateway 0.4.0-beta.3 → 0.4.0
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 +40 -5
- package/dist/config.js +21 -7
- package/dist/endpoints/chat-completions/converters.d.ts +3 -3
- package/dist/endpoints/chat-completions/converters.js +16 -8
- package/dist/endpoints/chat-completions/handler.js +34 -27
- package/dist/endpoints/chat-completions/otel.d.ts +6 -0
- package/dist/endpoints/chat-completions/otel.js +127 -0
- package/dist/endpoints/embeddings/handler.js +19 -10
- package/dist/endpoints/embeddings/otel.d.ts +6 -0
- package/dist/endpoints/embeddings/otel.js +35 -0
- package/dist/endpoints/models/handler.js +3 -4
- package/dist/errors/gateway.d.ts +1 -1
- package/dist/errors/gateway.js +3 -4
- package/dist/errors/openai.js +11 -12
- package/dist/errors/utils.d.ts +3 -4
- package/dist/errors/utils.js +6 -6
- package/dist/gateway.js +1 -1
- package/dist/lifecycle.js +71 -29
- package/dist/middleware/matcher.js +1 -1
- package/dist/models/amazon/presets.d.ts +37 -37
- package/dist/models/amazon/presets.js +1 -1
- package/dist/models/anthropic/presets.d.ts +56 -56
- package/dist/models/cohere/presets.d.ts +54 -54
- package/dist/models/cohere/presets.js +2 -2
- package/dist/models/google/presets.d.ts +31 -31
- package/dist/models/google/presets.js +1 -1
- package/dist/models/meta/presets.d.ts +42 -42
- package/dist/models/openai/presets.d.ts +96 -96
- package/dist/models/openai/presets.js +1 -1
- package/dist/models/types.d.ts +1 -1
- package/dist/models/voyage/presets.d.ts +92 -92
- package/dist/models/voyage/presets.js +1 -1
- package/dist/providers/registry.js +2 -2
- package/dist/telemetry/baggage.d.ts +1 -0
- package/dist/telemetry/baggage.js +24 -0
- package/dist/telemetry/fetch.d.ts +2 -1
- package/dist/telemetry/fetch.js +13 -3
- package/dist/telemetry/gen-ai.d.ts +5 -0
- package/dist/telemetry/gen-ai.js +60 -0
- package/dist/telemetry/http.d.ts +3 -0
- package/dist/telemetry/http.js +57 -0
- package/dist/telemetry/memory.d.ts +2 -0
- package/dist/telemetry/memory.js +27 -0
- package/dist/telemetry/span.d.ts +6 -3
- package/dist/telemetry/span.js +24 -36
- package/dist/telemetry/stream.d.ts +3 -7
- package/dist/telemetry/stream.js +26 -29
- package/dist/types.d.ts +16 -15
- package/dist/utils/headers.d.ts +1 -1
- package/dist/utils/headers.js +7 -9
- package/dist/utils/request.d.ts +0 -4
- package/dist/utils/request.js +0 -9
- package/dist/utils/response.js +1 -1
- package/package.json +5 -2
- package/src/config.ts +28 -7
- package/src/endpoints/chat-completions/converters.ts +18 -11
- package/src/endpoints/chat-completions/handler.ts +46 -28
- package/src/endpoints/chat-completions/otel.ts +161 -0
- package/src/endpoints/embeddings/handler.test.ts +2 -2
- package/src/endpoints/embeddings/handler.ts +28 -10
- package/src/endpoints/embeddings/otel.ts +56 -0
- package/src/endpoints/models/handler.ts +3 -5
- package/src/errors/gateway.ts +5 -5
- package/src/errors/openai.ts +25 -17
- package/src/errors/utils.ts +6 -7
- package/src/gateway.ts +1 -1
- package/src/lifecycle.ts +85 -32
- package/src/middleware/matcher.ts +1 -1
- package/src/models/amazon/presets.ts +1 -1
- package/src/models/cohere/presets.ts +2 -2
- package/src/models/google/presets.ts +1 -1
- package/src/models/openai/presets.ts +1 -1
- package/src/models/types.ts +1 -1
- package/src/models/voyage/presets.ts +1 -1
- package/src/providers/registry.ts +2 -2
- package/src/telemetry/baggage.ts +27 -0
- package/src/telemetry/fetch.ts +15 -3
- package/src/telemetry/gen-ai.ts +88 -0
- package/src/telemetry/http.ts +65 -0
- package/src/telemetry/memory.ts +36 -0
- package/src/telemetry/span.ts +28 -40
- package/src/telemetry/stream.ts +36 -40
- package/src/types.ts +18 -18
- package/src/utils/headers.ts +8 -19
- package/src/utils/request.ts +0 -11
- package/src/utils/response.ts +1 -1
- package/dist/telemetry/otel.d.ts +0 -2
- package/dist/telemetry/otel.js +0 -50
- package/dist/telemetry/utils.d.ts +0 -4
- package/dist/telemetry/utils.js +0 -223
- package/src/telemetry/otel.ts +0 -91
- package/src/telemetry/utils.ts +0 -273
package/dist/errors/openai.js
CHANGED
|
@@ -17,23 +17,22 @@ export class OpenAIError {
|
|
|
17
17
|
this.error = { message, type, code: code?.toLowerCase(), param };
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
const mapType = (status) => (status < 500 ? "invalid_request_error" : "server_error");
|
|
21
|
+
const maybeMaskMessage = (meta, requestId) => {
|
|
22
|
+
// FUTURE: consider masking all upstream errors, also 4xx
|
|
23
|
+
if (!(isProduction() && meta.status >= 500)) {
|
|
24
|
+
return meta.message;
|
|
25
|
+
}
|
|
26
|
+
// FUTURE: always attach requestId to errors (masked and unmasked)
|
|
27
|
+
return `${STATUS_CODE(meta.status)} (${requestId ?? "see requestId in response headers"})`;
|
|
28
|
+
};
|
|
20
29
|
export function toOpenAIError(error) {
|
|
21
30
|
const meta = getErrorMeta(error);
|
|
22
|
-
return new OpenAIError(meta
|
|
31
|
+
return new OpenAIError(maybeMaskMessage(meta), mapType(meta.status), meta.code);
|
|
23
32
|
}
|
|
24
33
|
export function toOpenAIErrorResponse(error, responseInit) {
|
|
25
34
|
const meta = getErrorMeta(error);
|
|
26
|
-
|
|
27
|
-
let message;
|
|
28
|
-
if (shouldMask) {
|
|
29
|
-
const requestId = resolveRequestId(responseInit);
|
|
30
|
-
// FUTURE: always attach requestId to errors (masked and unmasked)
|
|
31
|
-
message = `${STATUS_CODE(meta.status)} (${requestId})`;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
message = meta.message;
|
|
35
|
-
}
|
|
36
|
-
return toResponse(new OpenAIError(message, meta.type, meta.code), {
|
|
35
|
+
return toResponse(new OpenAIError(maybeMaskMessage(meta, resolveRequestId(responseInit)), mapType(meta.status), meta.code), {
|
|
37
36
|
...responseInit,
|
|
38
37
|
status: meta.status,
|
|
39
38
|
statusText: meta.code,
|
package/dist/errors/utils.d.ts
CHANGED
|
@@ -8,16 +8,15 @@ export declare const STATUS_CODES: {
|
|
|
8
8
|
readonly 409: "CONFLICT";
|
|
9
9
|
readonly 422: "UNPROCESSABLE_ENTITY";
|
|
10
10
|
readonly 429: "TOO_MANY_REQUESTS";
|
|
11
|
+
readonly 499: "CLIENT_CLOSED_REQUEST";
|
|
11
12
|
readonly 500: "INTERNAL_SERVER_ERROR";
|
|
12
13
|
readonly 502: "BAD_GATEWAY";
|
|
13
14
|
readonly 503: "SERVICE_UNAVAILABLE";
|
|
14
15
|
readonly 504: "GATEWAY_TIMEOUT";
|
|
15
16
|
};
|
|
16
|
-
export declare const STATUS_CODE: (status: number) => "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "CONFLICT" | "UNPROCESSABLE_ENTITY" | "TOO_MANY_REQUESTS" | "INTERNAL_SERVER_ERROR" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT";
|
|
17
|
+
export declare const STATUS_CODE: (status: number) => "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "CONFLICT" | "UNPROCESSABLE_ENTITY" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST" | "INTERNAL_SERVER_ERROR" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT";
|
|
17
18
|
export declare function getErrorMeta(error: unknown): {
|
|
18
|
-
code: string;
|
|
19
19
|
status: number;
|
|
20
|
-
|
|
21
|
-
type: string;
|
|
20
|
+
code: string;
|
|
22
21
|
message: string;
|
|
23
22
|
};
|
package/dist/errors/utils.js
CHANGED
|
@@ -10,6 +10,7 @@ export const STATUS_CODES = {
|
|
|
10
10
|
409: "CONFLICT",
|
|
11
11
|
422: "UNPROCESSABLE_ENTITY",
|
|
12
12
|
429: "TOO_MANY_REQUESTS",
|
|
13
|
+
499: "CLIENT_CLOSED_REQUEST",
|
|
13
14
|
500: "INTERNAL_SERVER_ERROR",
|
|
14
15
|
502: "BAD_GATEWAY",
|
|
15
16
|
503: "SERVICE_UNAVAILABLE",
|
|
@@ -21,24 +22,23 @@ export const STATUS_CODE = (status) => {
|
|
|
21
22
|
return label;
|
|
22
23
|
return status >= 400 && status < 500 ? STATUS_CODES[400] : STATUS_CODES[500];
|
|
23
24
|
};
|
|
25
|
+
// FUTURE: always return a wrapped GatewayError?
|
|
24
26
|
export function getErrorMeta(error) {
|
|
25
27
|
const message = error instanceof Error ? error.message : String(error);
|
|
26
|
-
let code;
|
|
27
28
|
let status;
|
|
28
|
-
let
|
|
29
|
+
let code;
|
|
29
30
|
if (error instanceof GatewayError) {
|
|
30
|
-
({
|
|
31
|
+
({ status, code } = error);
|
|
31
32
|
}
|
|
32
33
|
else {
|
|
33
34
|
const normalized = normalizeAiSdkError(error);
|
|
34
35
|
if (normalized) {
|
|
35
|
-
({
|
|
36
|
+
({ status, code } = normalized);
|
|
36
37
|
}
|
|
37
38
|
else {
|
|
38
39
|
status = 500;
|
|
39
40
|
code = STATUS_CODE(status);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
-
return { code, status, param, type, message };
|
|
43
|
+
return { status, code, message };
|
|
44
44
|
}
|
package/dist/gateway.js
CHANGED
|
@@ -22,7 +22,7 @@ export function gateway(config) {
|
|
|
22
22
|
if (basePath && pathname.startsWith(basePath)) {
|
|
23
23
|
pathname = pathname.slice(basePath.length);
|
|
24
24
|
}
|
|
25
|
-
logger.
|
|
25
|
+
logger.info(`[gateway] ${req.method} ${pathname}`);
|
|
26
26
|
for (const [route, endpoint] of routeEntries) {
|
|
27
27
|
if (pathname === route || pathname.startsWith(route + "/")) {
|
|
28
28
|
return endpoint.handler(req, state);
|
package/dist/lifecycle.js
CHANGED
|
@@ -1,28 +1,81 @@
|
|
|
1
1
|
import { parseConfig } from "./config";
|
|
2
|
+
import { GatewayError } from "./errors/gateway";
|
|
2
3
|
import { toOpenAIErrorResponse } from "./errors/openai";
|
|
3
4
|
import { logger } from "./logger";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { getBaggageAttributes } from "./telemetry/baggage";
|
|
6
|
+
import { initFetch } from "./telemetry/fetch";
|
|
7
|
+
import { getRequestAttributes, getResponseAttributes } from "./telemetry/http";
|
|
8
|
+
import { recordV8jsMemory } from "./telemetry/memory";
|
|
9
|
+
import { addSpanEvent, setSpanEventsEnabled, setSpanTracer, startSpan } from "./telemetry/span";
|
|
10
|
+
import { wrapStream } from "./telemetry/stream";
|
|
6
11
|
import { resolveRequestId } from "./utils/headers";
|
|
7
12
|
import { maybeApplyRequestPatch, prepareRequestHeaders } from "./utils/request";
|
|
8
13
|
import { prepareResponseInit, toResponse } from "./utils/response";
|
|
9
14
|
export const winterCgHandler = (run, config) => {
|
|
10
15
|
const parsedConfig = parseConfig(config);
|
|
11
|
-
|
|
16
|
+
if (parsedConfig.telemetry?.enabled) {
|
|
17
|
+
setSpanTracer(parsedConfig.telemetry?.tracer);
|
|
18
|
+
setSpanEventsEnabled(parsedConfig.telemetry?.signals?.hebo);
|
|
19
|
+
initFetch(parsedConfig.telemetry?.signals?.hebo);
|
|
20
|
+
}
|
|
21
|
+
return async (request, state) => {
|
|
22
|
+
const ctx = {
|
|
23
|
+
request,
|
|
24
|
+
state: state ?? {},
|
|
25
|
+
providers: parsedConfig.providers,
|
|
26
|
+
models: parsedConfig.models,
|
|
27
|
+
};
|
|
28
|
+
const headers = prepareRequestHeaders(ctx.request);
|
|
29
|
+
if (headers)
|
|
30
|
+
ctx.request = new Request(ctx.request, { headers });
|
|
31
|
+
const span = startSpan(ctx.request.url);
|
|
32
|
+
span.setAttributes(getBaggageAttributes(ctx.request));
|
|
33
|
+
if (!span.isExisting) {
|
|
34
|
+
span.setAttributes(getRequestAttributes(ctx.request, parsedConfig.telemetry?.signals?.http));
|
|
35
|
+
}
|
|
36
|
+
const finalize = (status, reason) => {
|
|
37
|
+
if (ctx.operation) {
|
|
38
|
+
span.updateName(`${ctx.operation}${ctx.modelId ? ` ${ctx.modelId}` : ""}`);
|
|
39
|
+
}
|
|
40
|
+
if (!span.isExisting) {
|
|
41
|
+
// FUTURE add http.server.request.duration
|
|
42
|
+
span.setAttributes(getResponseAttributes(ctx.response, parsedConfig.telemetry?.signals?.http));
|
|
43
|
+
}
|
|
44
|
+
let realStatus = status;
|
|
45
|
+
if (ctx.request.signal.aborted)
|
|
46
|
+
realStatus = 499;
|
|
47
|
+
else if (status === 200 && ctx.response?.status)
|
|
48
|
+
realStatus = ctx.response.status;
|
|
49
|
+
if (realStatus !== 200) {
|
|
50
|
+
(realStatus >= 500 ? logger.error : logger.warn)({
|
|
51
|
+
requestId: resolveRequestId(ctx.request),
|
|
52
|
+
err: reason ?? ctx.request.signal.reason,
|
|
53
|
+
});
|
|
54
|
+
if (realStatus >= 500)
|
|
55
|
+
span.recordError(reason);
|
|
56
|
+
}
|
|
57
|
+
span.setAttributes({ "http.response.status_code_effective": realStatus });
|
|
58
|
+
recordV8jsMemory(parsedConfig.telemetry?.signals?.hebo);
|
|
59
|
+
span.finish();
|
|
60
|
+
};
|
|
12
61
|
try {
|
|
13
62
|
if (parsedConfig.hooks?.onRequest) {
|
|
14
63
|
const onRequest = await parsedConfig.hooks.onRequest(ctx);
|
|
15
64
|
addSpanEvent("hebo.hooks.on_request.completed");
|
|
16
|
-
if (onRequest) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
65
|
+
if (onRequest instanceof Response) {
|
|
66
|
+
ctx.response = onRequest;
|
|
67
|
+
}
|
|
68
|
+
else if (onRequest) {
|
|
21
69
|
ctx.request = maybeApplyRequestPatch(ctx.request, onRequest);
|
|
22
70
|
}
|
|
23
71
|
}
|
|
24
|
-
|
|
25
|
-
|
|
72
|
+
if (!ctx.response) {
|
|
73
|
+
ctx.result = (await span.runWithContext(() => run(ctx)));
|
|
74
|
+
if (ctx.result instanceof ReadableStream) {
|
|
75
|
+
ctx.result = wrapStream(ctx.result, { onDone: finalize });
|
|
76
|
+
}
|
|
77
|
+
ctx.response = toResponse(ctx.result, prepareResponseInit(ctx.request));
|
|
78
|
+
}
|
|
26
79
|
if (parsedConfig.hooks?.onResponse) {
|
|
27
80
|
const onResponse = await parsedConfig.hooks.onResponse(ctx);
|
|
28
81
|
addSpanEvent("hebo.hooks.on_response.completed");
|
|
@@ -30,28 +83,17 @@ export const winterCgHandler = (run, config) => {
|
|
|
30
83
|
ctx.response = onResponse;
|
|
31
84
|
}
|
|
32
85
|
}
|
|
86
|
+
// FUTURE: this can leak if onResponse removed wrapper from response.body
|
|
87
|
+
if (!(ctx.result instanceof ReadableStream)) {
|
|
88
|
+
finalize(ctx.response.status);
|
|
89
|
+
}
|
|
33
90
|
}
|
|
34
91
|
catch (error) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
ctx.response = toOpenAIErrorResponse(error, prepareResponseInit(ctx.request));
|
|
92
|
+
ctx.response = toOpenAIErrorResponse(ctx.request.signal.aborted
|
|
93
|
+
? new GatewayError(error ?? ctx.request.signal.reason, 499)
|
|
94
|
+
: error, prepareResponseInit(ctx.request));
|
|
95
|
+
finalize(ctx.response.status, error);
|
|
41
96
|
}
|
|
42
|
-
};
|
|
43
|
-
const handler = parsedConfig.telemetry?.enabled ? withOtel(core, parsedConfig) : core;
|
|
44
|
-
return async (request, state) => {
|
|
45
|
-
const ctx = {
|
|
46
|
-
request,
|
|
47
|
-
state: state ?? {},
|
|
48
|
-
providers: parsedConfig.providers,
|
|
49
|
-
models: parsedConfig.models,
|
|
50
|
-
};
|
|
51
|
-
const headers = prepareRequestHeaders(ctx.request);
|
|
52
|
-
if (headers)
|
|
53
|
-
ctx.request = new Request(ctx.request, { headers });
|
|
54
|
-
await handler(ctx);
|
|
55
97
|
return ctx.response ?? new Response("Internal Server Error", { status: 500 });
|
|
56
98
|
};
|
|
57
99
|
};
|
|
@@ -4,7 +4,7 @@ export declare const novaMicro: <const O extends {
|
|
|
4
4
|
knowledge?: string | undefined;
|
|
5
5
|
modalities?: {
|
|
6
6
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
7
|
-
output?: readonly ("text" | "
|
|
7
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
8
8
|
} | undefined;
|
|
9
9
|
context?: number | undefined;
|
|
10
10
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -82,7 +82,7 @@ export declare const novaLite: <const O extends {
|
|
|
82
82
|
knowledge?: string | undefined;
|
|
83
83
|
modalities?: {
|
|
84
84
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
85
|
-
output?: readonly ("text" | "
|
|
85
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
86
86
|
} | undefined;
|
|
87
87
|
context?: number | undefined;
|
|
88
88
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -160,7 +160,7 @@ export declare const novaPro: <const O extends {
|
|
|
160
160
|
knowledge?: string | undefined;
|
|
161
161
|
modalities?: {
|
|
162
162
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
163
|
-
output?: readonly ("text" | "
|
|
163
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
164
164
|
} | undefined;
|
|
165
165
|
context?: number | undefined;
|
|
166
166
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -238,7 +238,7 @@ export declare const novaPremier: <const O extends {
|
|
|
238
238
|
knowledge?: string | undefined;
|
|
239
239
|
modalities?: {
|
|
240
240
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
241
|
-
output?: readonly ("text" | "
|
|
241
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
242
242
|
} | undefined;
|
|
243
243
|
context?: number | undefined;
|
|
244
244
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -316,7 +316,7 @@ export declare const nova2Lite: <const O extends {
|
|
|
316
316
|
knowledge?: string | undefined;
|
|
317
317
|
modalities?: {
|
|
318
318
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
319
|
-
output?: readonly ("text" | "
|
|
319
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
320
320
|
} | undefined;
|
|
321
321
|
context?: number | undefined;
|
|
322
322
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -394,7 +394,7 @@ export declare const nova2MultimodalEmbeddings: <const O extends {
|
|
|
394
394
|
knowledge?: string | undefined;
|
|
395
395
|
modalities?: {
|
|
396
396
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
397
|
-
output?: readonly ("text" | "
|
|
397
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
398
398
|
} | undefined;
|
|
399
399
|
context?: number | undefined;
|
|
400
400
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -460,7 +460,7 @@ export declare const nova2MultimodalEmbeddings: <const O extends {
|
|
|
460
460
|
context: number;
|
|
461
461
|
modalities: {
|
|
462
462
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
463
|
-
output: readonly ["
|
|
463
|
+
output: readonly ["embedding"];
|
|
464
464
|
};
|
|
465
465
|
providers: readonly ["bedrock"];
|
|
466
466
|
} & O>;
|
|
@@ -471,7 +471,7 @@ export declare const nova: {
|
|
|
471
471
|
knowledge?: string | undefined;
|
|
472
472
|
modalities?: {
|
|
473
473
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
474
|
-
output?: readonly ("text" | "
|
|
474
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
475
475
|
} | undefined;
|
|
476
476
|
context?: number | undefined;
|
|
477
477
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -548,7 +548,7 @@ export declare const nova: {
|
|
|
548
548
|
knowledge?: string | undefined;
|
|
549
549
|
modalities?: {
|
|
550
550
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
551
|
-
output?: readonly ("text" | "
|
|
551
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
552
552
|
} | undefined;
|
|
553
553
|
context?: number | undefined;
|
|
554
554
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -625,7 +625,7 @@ export declare const nova: {
|
|
|
625
625
|
knowledge?: string | undefined;
|
|
626
626
|
modalities?: {
|
|
627
627
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
628
|
-
output?: readonly ("text" | "
|
|
628
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
629
629
|
} | undefined;
|
|
630
630
|
context?: number | undefined;
|
|
631
631
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -702,7 +702,7 @@ export declare const nova: {
|
|
|
702
702
|
knowledge?: string | undefined;
|
|
703
703
|
modalities?: {
|
|
704
704
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
705
|
-
output?: readonly ("text" | "
|
|
705
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
706
706
|
} | undefined;
|
|
707
707
|
context?: number | undefined;
|
|
708
708
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -779,7 +779,7 @@ export declare const nova: {
|
|
|
779
779
|
knowledge?: string | undefined;
|
|
780
780
|
modalities?: {
|
|
781
781
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
782
|
-
output?: readonly ("text" | "
|
|
782
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
783
783
|
} | undefined;
|
|
784
784
|
context?: number | undefined;
|
|
785
785
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -856,7 +856,7 @@ export declare const nova: {
|
|
|
856
856
|
knowledge?: string | undefined;
|
|
857
857
|
modalities?: {
|
|
858
858
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
859
|
-
output?: readonly ("text" | "
|
|
859
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
860
860
|
} | undefined;
|
|
861
861
|
context?: number | undefined;
|
|
862
862
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -922,7 +922,7 @@ export declare const nova: {
|
|
|
922
922
|
context: number;
|
|
923
923
|
modalities: {
|
|
924
924
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
925
|
-
output: readonly ["
|
|
925
|
+
output: readonly ["embedding"];
|
|
926
926
|
};
|
|
927
927
|
providers: readonly ["bedrock"];
|
|
928
928
|
} & O>];
|
|
@@ -932,7 +932,7 @@ export declare const nova: {
|
|
|
932
932
|
knowledge?: string | undefined;
|
|
933
933
|
modalities?: {
|
|
934
934
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
935
|
-
output?: readonly ("text" | "
|
|
935
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
936
936
|
} | undefined;
|
|
937
937
|
context?: number | undefined;
|
|
938
938
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -998,7 +998,7 @@ export declare const nova: {
|
|
|
998
998
|
context: number;
|
|
999
999
|
modalities: {
|
|
1000
1000
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
1001
|
-
output: readonly ["
|
|
1001
|
+
output: readonly ["embedding"];
|
|
1002
1002
|
};
|
|
1003
1003
|
providers: readonly ["bedrock"];
|
|
1004
1004
|
} & O>];
|
|
@@ -1008,7 +1008,7 @@ export declare const nova: {
|
|
|
1008
1008
|
knowledge?: string | undefined;
|
|
1009
1009
|
modalities?: {
|
|
1010
1010
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1011
|
-
output?: readonly ("text" | "
|
|
1011
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1012
1012
|
} | undefined;
|
|
1013
1013
|
context?: number | undefined;
|
|
1014
1014
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1085,7 +1085,7 @@ export declare const nova: {
|
|
|
1085
1085
|
knowledge?: string | undefined;
|
|
1086
1086
|
modalities?: {
|
|
1087
1087
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1088
|
-
output?: readonly ("text" | "
|
|
1088
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1089
1089
|
} | undefined;
|
|
1090
1090
|
context?: number | undefined;
|
|
1091
1091
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1162,7 +1162,7 @@ export declare const nova: {
|
|
|
1162
1162
|
knowledge?: string | undefined;
|
|
1163
1163
|
modalities?: {
|
|
1164
1164
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1165
|
-
output?: readonly ("text" | "
|
|
1165
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1166
1166
|
} | undefined;
|
|
1167
1167
|
context?: number | undefined;
|
|
1168
1168
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1239,7 +1239,7 @@ export declare const nova: {
|
|
|
1239
1239
|
knowledge?: string | undefined;
|
|
1240
1240
|
modalities?: {
|
|
1241
1241
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1242
|
-
output?: readonly ("text" | "
|
|
1242
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1243
1243
|
} | undefined;
|
|
1244
1244
|
context?: number | undefined;
|
|
1245
1245
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1316,7 +1316,7 @@ export declare const nova: {
|
|
|
1316
1316
|
knowledge?: string | undefined;
|
|
1317
1317
|
modalities?: {
|
|
1318
1318
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1319
|
-
output?: readonly ("text" | "
|
|
1319
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1320
1320
|
} | undefined;
|
|
1321
1321
|
context?: number | undefined;
|
|
1322
1322
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1393,7 +1393,7 @@ export declare const nova: {
|
|
|
1393
1393
|
knowledge?: string | undefined;
|
|
1394
1394
|
modalities?: {
|
|
1395
1395
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1396
|
-
output?: readonly ("text" | "
|
|
1396
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1397
1397
|
} | undefined;
|
|
1398
1398
|
context?: number | undefined;
|
|
1399
1399
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1459,7 +1459,7 @@ export declare const nova: {
|
|
|
1459
1459
|
context: number;
|
|
1460
1460
|
modalities: {
|
|
1461
1461
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
1462
|
-
output: readonly ["
|
|
1462
|
+
output: readonly ["embedding"];
|
|
1463
1463
|
};
|
|
1464
1464
|
providers: readonly ["bedrock"];
|
|
1465
1465
|
} & O>))[];
|
|
@@ -1469,7 +1469,7 @@ export declare const nova: {
|
|
|
1469
1469
|
knowledge?: string | undefined;
|
|
1470
1470
|
modalities?: {
|
|
1471
1471
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1472
|
-
output?: readonly ("text" | "
|
|
1472
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1473
1473
|
} | undefined;
|
|
1474
1474
|
context?: number | undefined;
|
|
1475
1475
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1546,7 +1546,7 @@ export declare const nova: {
|
|
|
1546
1546
|
knowledge?: string | undefined;
|
|
1547
1547
|
modalities?: {
|
|
1548
1548
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1549
|
-
output?: readonly ("text" | "
|
|
1549
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1550
1550
|
} | undefined;
|
|
1551
1551
|
context?: number | undefined;
|
|
1552
1552
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1623,7 +1623,7 @@ export declare const nova: {
|
|
|
1623
1623
|
knowledge?: string | undefined;
|
|
1624
1624
|
modalities?: {
|
|
1625
1625
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1626
|
-
output?: readonly ("text" | "
|
|
1626
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1627
1627
|
} | undefined;
|
|
1628
1628
|
context?: number | undefined;
|
|
1629
1629
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1700,7 +1700,7 @@ export declare const nova: {
|
|
|
1700
1700
|
knowledge?: string | undefined;
|
|
1701
1701
|
modalities?: {
|
|
1702
1702
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1703
|
-
output?: readonly ("text" | "
|
|
1703
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1704
1704
|
} | undefined;
|
|
1705
1705
|
context?: number | undefined;
|
|
1706
1706
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1778,7 +1778,7 @@ export declare const nova: {
|
|
|
1778
1778
|
knowledge?: string | undefined;
|
|
1779
1779
|
modalities?: {
|
|
1780
1780
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1781
|
-
output?: readonly ("text" | "
|
|
1781
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1782
1782
|
} | undefined;
|
|
1783
1783
|
context?: number | undefined;
|
|
1784
1784
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1855,7 +1855,7 @@ export declare const nova: {
|
|
|
1855
1855
|
knowledge?: string | undefined;
|
|
1856
1856
|
modalities?: {
|
|
1857
1857
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1858
|
-
output?: readonly ("text" | "
|
|
1858
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1859
1859
|
} | undefined;
|
|
1860
1860
|
context?: number | undefined;
|
|
1861
1861
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -1921,7 +1921,7 @@ export declare const nova: {
|
|
|
1921
1921
|
context: number;
|
|
1922
1922
|
modalities: {
|
|
1923
1923
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
1924
|
-
output: readonly ["
|
|
1924
|
+
output: readonly ["embedding"];
|
|
1925
1925
|
};
|
|
1926
1926
|
providers: readonly ["bedrock"];
|
|
1927
1927
|
} & O>];
|
|
@@ -1931,7 +1931,7 @@ export declare const nova: {
|
|
|
1931
1931
|
knowledge?: string | undefined;
|
|
1932
1932
|
modalities?: {
|
|
1933
1933
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
1934
|
-
output?: readonly ("text" | "
|
|
1934
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
1935
1935
|
} | undefined;
|
|
1936
1936
|
context?: number | undefined;
|
|
1937
1937
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2008,7 +2008,7 @@ export declare const nova: {
|
|
|
2008
2008
|
knowledge?: string | undefined;
|
|
2009
2009
|
modalities?: {
|
|
2010
2010
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
2011
|
-
output?: readonly ("text" | "
|
|
2011
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
2012
2012
|
} | undefined;
|
|
2013
2013
|
context?: number | undefined;
|
|
2014
2014
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2085,7 +2085,7 @@ export declare const nova: {
|
|
|
2085
2085
|
knowledge?: string | undefined;
|
|
2086
2086
|
modalities?: {
|
|
2087
2087
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
2088
|
-
output?: readonly ("text" | "
|
|
2088
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
2089
2089
|
} | undefined;
|
|
2090
2090
|
context?: number | undefined;
|
|
2091
2091
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2162,7 +2162,7 @@ export declare const nova: {
|
|
|
2162
2162
|
knowledge?: string | undefined;
|
|
2163
2163
|
modalities?: {
|
|
2164
2164
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
2165
|
-
output?: readonly ("text" | "
|
|
2165
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
2166
2166
|
} | undefined;
|
|
2167
2167
|
context?: number | undefined;
|
|
2168
2168
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2240,7 +2240,7 @@ export declare const nova: {
|
|
|
2240
2240
|
knowledge?: string | undefined;
|
|
2241
2241
|
modalities?: {
|
|
2242
2242
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
2243
|
-
output?: readonly ("text" | "
|
|
2243
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
2244
2244
|
} | undefined;
|
|
2245
2245
|
context?: number | undefined;
|
|
2246
2246
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2317,7 +2317,7 @@ export declare const nova: {
|
|
|
2317
2317
|
knowledge?: string | undefined;
|
|
2318
2318
|
modalities?: {
|
|
2319
2319
|
input?: readonly ("text" | "file" | "image" | "audio" | "video" | "pdf")[] | undefined;
|
|
2320
|
-
output?: readonly ("text" | "
|
|
2320
|
+
output?: readonly ("text" | "embedding" | "image" | "audio" | "video")[] | undefined;
|
|
2321
2321
|
} | undefined;
|
|
2322
2322
|
context?: number | undefined;
|
|
2323
2323
|
capabilities?: readonly ("temperature" | "reasoning" | "attachments" | "tool_call" | "structured_output")[] | undefined;
|
|
@@ -2383,7 +2383,7 @@ export declare const nova: {
|
|
|
2383
2383
|
context: number;
|
|
2384
2384
|
modalities: {
|
|
2385
2385
|
input: readonly ["text", "image", "audio", "video", "pdf"];
|
|
2386
|
-
output: readonly ["
|
|
2386
|
+
output: readonly ["embedding"];
|
|
2387
2387
|
};
|
|
2388
2388
|
providers: readonly ["bedrock"];
|
|
2389
2389
|
} & O>];
|