@revojs/ai 0.2.40 → 0.2.42
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/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -289,7 +289,7 @@ export interface LanguageModelCallOptions<TModel extends string = string> {
|
|
|
289
289
|
includeRawChunks?: boolean;
|
|
290
290
|
abortSignal?: AbortSignal;
|
|
291
291
|
headers?: Record<string, string | undefined>;
|
|
292
|
-
reasoning?:
|
|
292
|
+
reasoning?: LanguageModelReasoningEffort;
|
|
293
293
|
providerOptions?: Record<string, JSONObject>;
|
|
294
294
|
}
|
|
295
295
|
export interface LanguageModelGenerateResult {
|
|
@@ -667,6 +667,7 @@ export type LanguageModelFilePart = Omit<LanguageModelFile, "providerMetadata" |
|
|
|
667
667
|
providerOptions?: Record<string, JSONObject>;
|
|
668
668
|
};
|
|
669
669
|
export type Protocol<TOptions, TResult> = (options: TOptions) => PromiseLike<TResult>;
|
|
670
|
+
export type LanguageModelReasoningEffort = "provider-default" | "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
670
671
|
export type Modality = "text" | "audio" | "image" | "video" | "pdf";
|
|
671
672
|
export type Status = "alpha" | "beta" | "deprecated";
|
|
672
673
|
export type ModelsDevCatalog = Record<string, ModelsDevProvider>;
|
|
@@ -678,6 +679,7 @@ export interface Description {
|
|
|
678
679
|
status?: Status;
|
|
679
680
|
toolCall: boolean;
|
|
680
681
|
reasoning: boolean;
|
|
682
|
+
variants: Array<LanguageModelReasoningEffort>;
|
|
681
683
|
attachment: boolean;
|
|
682
684
|
input: Array<Modality>;
|
|
683
685
|
output: Array<Modality>;
|
package/dist/index.js
CHANGED
|
@@ -596,6 +596,9 @@ async function useModelsDev(id, resolve) {
|
|
|
596
596
|
if ((model.type ?? "chat") !== "chat" || !(model.modalities?.output ?? ["text"]).includes("text")) continue;
|
|
597
597
|
const protocols = resolve(model, provider);
|
|
598
598
|
if (protocols === void 0) continue;
|
|
599
|
+
const variants = new Array();
|
|
600
|
+
const protocol = modelsDevProtocol(model, provider);
|
|
601
|
+
if (model.reasoning === true && (protocol === "chat-completions" || protocol === "responses")) variants.push("low", "medium", "high");
|
|
599
602
|
const description = {
|
|
600
603
|
id: model.id,
|
|
601
604
|
name: model.name,
|
|
@@ -603,6 +606,7 @@ async function useModelsDev(id, resolve) {
|
|
|
603
606
|
status: model.status,
|
|
604
607
|
toolCall: model.tool_call === true,
|
|
605
608
|
reasoning: model.reasoning === true,
|
|
609
|
+
variants,
|
|
606
610
|
attachment: model.attachment === true,
|
|
607
611
|
input: model.modalities?.input ?? ["text"],
|
|
608
612
|
output: model.modalities?.output ?? ["text"],
|