@ai-sdk/huggingface 2.0.92 → 2.0.93
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ai-sdk/huggingface
|
|
2
2
|
|
|
3
|
+
## 2.0.93
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f5fc6ba: Derive known model ID suggestions from each provider's model catalog declarations so catalog updates automatically update autocomplete, while preserving existing suggestions, endpoint-specific model lists, and support for custom model IDs.
|
|
8
|
+
|
|
3
9
|
## 2.0.92
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import { LanguageModelV4, ProviderV4 } from "@ai-sdk/provider";
|
|
2
2
|
import { FetchFunction, Resolvable } from "@ai-sdk/provider-utils";
|
|
3
3
|
import { OpenAICompatibleErrorData as HuggingFaceErrorData } from "@ai-sdk/openai-compatible";
|
|
4
|
+
//#region src/huggingface-model-catalog.d.ts
|
|
5
|
+
declare const languageModelIds: readonly ["meta-llama/Llama-3.1-8B-Instruct", "meta-llama/Llama-3.1-70B-Instruct", "meta-llama/Llama-3.1-405B-Instruct", "meta-llama/Llama-3.3-70B-Instruct", "meta-llama/Meta-Llama-3-8B-Instruct", "meta-llama/Meta-Llama-3-70B-Instruct", "meta-llama/Llama-3.2-3B-Instruct", "meta-llama/Llama-4-Maverick-17B-128E-Instruct", "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8", "meta-llama/Llama-Guard-4-12B", "deepseek-ai/DeepSeek-V3.1", "deepseek-ai/DeepSeek-V3-0324", "deepseek-ai/DeepSeek-R1", "deepseek-ai/DeepSeek-R1-0528", "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B", "deepseek-ai/DeepSeek-R1-Distill-Qwen-7B", "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B", "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B", "deepseek-ai/DeepSeek-R1-Distill-Llama-8B", "deepseek-ai/DeepSeek-R1-Distill-Llama-70B", "deepseek-ai/DeepSeek-Prover-V2-671B", "Qwen/Qwen3-32B", "Qwen/Qwen3-14B", "Qwen/Qwen3-8B", "Qwen/Qwen3-4B", "Qwen/Qwen3-Coder-480B-A35B-Instruct", "Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8", "Qwen/Qwen3-30B-A3B", "Qwen/Qwen2.5-VL-7B-Instruct", "Qwen/Qwen2.5-7B-Instruct", "Qwen/Qwen2.5-Coder-7B-Instruct", "Qwen/Qwen2.5-Coder-32B-Instruct", "google/gemma-2-9b-it", "google/gemma-3-27b-it", "moonshotai/Kimi-K2-Instruct"];
|
|
6
|
+
/** Known model IDs, derived from the declarations used to build the catalog. */
|
|
7
|
+
type HuggingFaceModelIds = {
|
|
8
|
+
language: (typeof languageModelIds)[number];
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
4
11
|
//#region src/responses/huggingface-responses-settings.d.ts
|
|
5
|
-
type HuggingFaceResponsesModelId = '
|
|
12
|
+
type HuggingFaceResponsesModelId = HuggingFaceModelIds['language'] | (string & {});
|
|
6
13
|
interface HuggingFaceResponsesSettings {
|
|
7
14
|
metadata?: Record<string, string>;
|
|
8
15
|
instructions?: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/responses/huggingface-responses-settings.ts","../src/huggingface-provider.ts","../src/version.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/huggingface-model-catalog.ts","../src/responses/huggingface-responses-settings.ts","../src/huggingface-provider.ts","../src/version.ts"],"mappings":";;;;cAoBM;;KAkKM;EACV,kBAAkB;;;;KCrLR,8BACR;UAGa;EACf,WAAW;EACX;EACA;;;;UCOe;;;;EAIf,SAAS;;;;EAIT;;;;EAIA,UAAU;;;;;EAKV,QAAQ;EAER;;UAGe,4BAA4B;;;;GAI1C,SAAS,8BAA8B;;;;EAKxC,cAAc,SAAS,8BAA8B;;;;EAKrD,UAAU,SAAS,8BAA8B;;;;EAKjD,mBAAmB;;;;;wBAML,kBACd,UAAS,8BACR;;;;qBAwDU,aAAW;;;qBCvHX"}
|
package/dist/index.js
CHANGED
|
@@ -831,7 +831,7 @@ function createHuggingFace(options = {}) {
|
|
|
831
831
|
const huggingFace = createHuggingFace();
|
|
832
832
|
//#endregion
|
|
833
833
|
//#region src/version.ts
|
|
834
|
-
const VERSION = "2.0.
|
|
834
|
+
const VERSION = "2.0.93";
|
|
835
835
|
//#endregion
|
|
836
836
|
export { VERSION, createHuggingFace, huggingFace, huggingFace as huggingface };
|
|
837
837
|
|
package/package.json
CHANGED
|
@@ -178,3 +178,8 @@ export function getHuggingFaceLanguageModelEntry(modelId: string) {
|
|
|
178
178
|
export const huggingFaceModelCatalog = Object.fromEntries(
|
|
179
179
|
languageModelIds.map(id => [id, getHuggingFaceLanguageModelEntry(id)]),
|
|
180
180
|
);
|
|
181
|
+
|
|
182
|
+
/** Known model IDs, derived from the declarations used to build the catalog. */
|
|
183
|
+
export type HuggingFaceModelIds = {
|
|
184
|
+
language: (typeof languageModelIds)[number];
|
|
185
|
+
};
|
|
@@ -1,40 +1,7 @@
|
|
|
1
|
+
import type { HuggingFaceModelIds } from '../huggingface-model-catalog';
|
|
2
|
+
|
|
1
3
|
export type HuggingFaceResponsesModelId =
|
|
2
|
-
|
|
3
|
-
| 'meta-llama/Llama-3.1-8B-Instruct'
|
|
4
|
-
| 'meta-llama/Llama-3.1-70B-Instruct'
|
|
5
|
-
| 'meta-llama/Llama-3.1-405B-Instruct'
|
|
6
|
-
| 'meta-llama/Llama-3.3-70B-Instruct'
|
|
7
|
-
| 'meta-llama/Meta-Llama-3-8B-Instruct'
|
|
8
|
-
| 'meta-llama/Meta-Llama-3-70B-Instruct'
|
|
9
|
-
| 'meta-llama/Llama-3.2-3B-Instruct'
|
|
10
|
-
| 'meta-llama/Llama-4-Maverick-17B-128E-Instruct'
|
|
11
|
-
| 'meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8'
|
|
12
|
-
| 'meta-llama/Llama-Guard-4-12B'
|
|
13
|
-
| 'deepseek-ai/DeepSeek-V3.1'
|
|
14
|
-
| 'deepseek-ai/DeepSeek-V3-0324'
|
|
15
|
-
| 'deepseek-ai/DeepSeek-R1'
|
|
16
|
-
| 'deepseek-ai/DeepSeek-R1-0528'
|
|
17
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B'
|
|
18
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Qwen-7B'
|
|
19
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Qwen-14B'
|
|
20
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Qwen-32B'
|
|
21
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Llama-8B'
|
|
22
|
-
| 'deepseek-ai/DeepSeek-R1-Distill-Llama-70B'
|
|
23
|
-
| 'deepseek-ai/DeepSeek-Prover-V2-671B'
|
|
24
|
-
| 'Qwen/Qwen3-32B'
|
|
25
|
-
| 'Qwen/Qwen3-14B'
|
|
26
|
-
| 'Qwen/Qwen3-8B'
|
|
27
|
-
| 'Qwen/Qwen3-4B'
|
|
28
|
-
| 'Qwen/Qwen3-Coder-480B-A35B-Instruct'
|
|
29
|
-
| 'Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8'
|
|
30
|
-
| 'Qwen/Qwen3-30B-A3B'
|
|
31
|
-
| 'Qwen/Qwen2.5-VL-7B-Instruct'
|
|
32
|
-
| 'Qwen/Qwen2.5-7B-Instruct'
|
|
33
|
-
| 'Qwen/Qwen2.5-Coder-7B-Instruct'
|
|
34
|
-
| 'Qwen/Qwen2.5-Coder-32B-Instruct'
|
|
35
|
-
| 'google/gemma-2-9b-it'
|
|
36
|
-
| 'google/gemma-3-27b-it'
|
|
37
|
-
| 'moonshotai/Kimi-K2-Instruct'
|
|
4
|
+
| HuggingFaceModelIds['language']
|
|
38
5
|
| (string & {});
|
|
39
6
|
|
|
40
7
|
export interface HuggingFaceResponsesSettings {
|