@juspay/neurolink 12.23.3 → 12.24.1
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 +2 -3
- package/dist/browser/neurolink.min.js +367 -367
- package/dist/constants/enums.d.ts +61 -69
- package/dist/constants/enums.js +63 -96
- package/dist/factories/providerDescriptors.d.ts +1 -1
- package/dist/factories/providerDescriptors.js +50 -83
- package/dist/factories/providerRegistry.js +9 -16
- package/dist/models/manifestRegistry.js +11 -2
- package/dist/providers/catalog/deepseek.json +84 -0
- package/dist/providers/catalog/huggingface.json +405 -0
- package/dist/providers/catalog/index.generated.d.ts +1 -1
- package/dist/providers/catalog/index.generated.js +6 -0
- package/dist/providers/catalog/loader.js +20 -5
- package/dist/providers/catalog/mistral.json +8 -3
- package/dist/providers/catalog/provider-catalog.schema.json +31 -1
- package/dist/providers/catalog/schema.d.ts +8 -1
- package/dist/providers/catalog/schema.js +9 -1
- package/dist/providers/configuredOpenAICompat.d.ts +14 -5
- package/dist/providers/configuredOpenAICompat.js +19 -4
- package/dist/providers/embeddingResponseParsing.d.ts +1 -0
- package/dist/providers/embeddingResponseParsing.js +47 -0
- package/dist/providers/ideogram.js +7 -1
- package/dist/providers/jina.js +6 -15
- package/dist/providers/llamaCpp.js +4 -15
- package/dist/providers/lmStudio.js +4 -15
- package/dist/providers/localRuntimeOpenAICompat.d.ts +16 -0
- package/dist/providers/localRuntimeOpenAICompat.js +26 -0
- package/dist/providers/ollama/client.js +3 -9
- package/dist/providers/openaiChatCompletionsBase.d.ts +3 -3
- package/dist/providers/openaiChatCompletionsBase.js +3 -3
- package/dist/providers/openaiCompatCatalog.d.ts +16 -12
- package/dist/providers/openaiCompatCatalog.js +16 -12
- package/dist/providers/voyage.js +5 -18
- package/dist/types/providerCatalog.d.ts +46 -1
- package/dist/types/providerCatalog.generated.d.ts +2 -2
- package/dist/types/providers.d.ts +12 -8
- package/dist/utils/modelChoices.d.ts +2 -2
- package/dist/utils/modelChoices.js +10 -38
- package/dist/utils/sizeGuard.d.ts +8 -5
- package/dist/utils/sizeGuard.js +32 -9
- package/docs-site/static/search-index.json +11044 -1
- package/package.json +1 -1
- package/dist/providers/deepseek.d.ts +0 -47
- package/dist/providers/deepseek.js +0 -120
- package/dist/providers/huggingFace/client.d.ts +0 -54
- package/dist/providers/huggingFace/client.js +0 -120
- package/dist/providers/huggingFace/index.d.ts +0 -1
- package/dist/providers/huggingFace/index.js +0 -1
|
@@ -10,11 +10,9 @@ export declare enum AIProviderName {
|
|
|
10
10
|
ANTHROPIC = "anthropic",
|
|
11
11
|
AZURE = "azure",
|
|
12
12
|
GOOGLE_AI = "google-ai",
|
|
13
|
-
HUGGINGFACE = "huggingface",
|
|
14
13
|
OLLAMA = "ollama",
|
|
15
14
|
LITELLM = "litellm",
|
|
16
15
|
SAGEMAKER = "sagemaker",
|
|
17
|
-
DEEPSEEK = "deepseek",
|
|
18
16
|
NVIDIA_NIM = "nvidia-nim",
|
|
19
17
|
LM_STUDIO = "lm-studio",
|
|
20
18
|
LLAMACPP = "llamacpp",
|
|
@@ -22,10 +20,12 @@ export declare enum AIProviderName {
|
|
|
22
20
|
BASETEN = "baseten",
|
|
23
21
|
CEREBRAS = "cerebras",
|
|
24
22
|
CLOUDFLARE = "cloudflare",
|
|
23
|
+
DEEPSEEK = "deepseek",
|
|
25
24
|
FIREWORKS = "fireworks",
|
|
26
25
|
FRIENDLI = "friendli",
|
|
27
26
|
GMICLOUD = "gmicloud",
|
|
28
27
|
GROQ = "groq",
|
|
28
|
+
HUGGINGFACE = "huggingface",
|
|
29
29
|
INCEPTION_LABS = "inception-labs",
|
|
30
30
|
IO_INTELLIGENCE = "io-intelligence",
|
|
31
31
|
MANCER = "mancer",
|
|
@@ -502,63 +502,6 @@ export declare enum LiteLLMModels {
|
|
|
502
502
|
PERPLEXITY_SONAR_PRO = "perplexity/sonar-pro",
|
|
503
503
|
PERPLEXITY_SONAR_REASONING_PRO = "perplexity/sonar-reasoning-pro"
|
|
504
504
|
}
|
|
505
|
-
/**
|
|
506
|
-
* Supported Models for Hugging Face Inference API
|
|
507
|
-
*/
|
|
508
|
-
export declare enum HuggingFaceModels {
|
|
509
|
-
LLAMA_3_3_70B_INSTRUCT = "meta-llama/Llama-3.3-70B-Instruct",
|
|
510
|
-
LLAMA_3_2_1B = "meta-llama/Llama-3.2-1B",
|
|
511
|
-
LLAMA_3_2_3B_INSTRUCT = "meta-llama/Llama-3.2-3B-Instruct",
|
|
512
|
-
LLAMA_3_1_8B = "meta-llama/Llama-3.1-8B",
|
|
513
|
-
LLAMA_3_1_70B_INSTRUCT = "meta-llama/Llama-3.1-70B-Instruct",
|
|
514
|
-
LLAMA_3_1_405B_INSTRUCT = "meta-llama/Llama-3.1-405B-Instruct",
|
|
515
|
-
LLAMA_3_8B_INSTRUCT = "meta-llama/Meta-Llama-3-8B-Instruct",
|
|
516
|
-
LLAMA_3_70B_INSTRUCT = "meta-llama/Meta-Llama-3-70B-Instruct",
|
|
517
|
-
MISTRAL_LARGE_3_675B = "mistralai/Mistral-Large-3-675B-Instruct-2512",
|
|
518
|
-
MISTRAL_SMALL_3_1_24B = "mistralai/Mistral-Small-3.1-24B-Instruct-2503",
|
|
519
|
-
MISTRAL_SMALL_24B = "mistralai/Mistral-Small-24B-Instruct-2501",
|
|
520
|
-
MISTRAL_7B_INSTRUCT = "mistralai/Mistral-7B-Instruct-v0.2",
|
|
521
|
-
MIXTRAL_8X7B_INSTRUCT = "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
|
522
|
-
DEVSTRAL_2 = "mistralai/Devstral-2",
|
|
523
|
-
QWEN_2_5_7B = "Qwen/Qwen2.5-7B",
|
|
524
|
-
QWEN_2_5_32B = "Qwen/Qwen2.5-32B",
|
|
525
|
-
QWEN_2_5_72B_INSTRUCT = "Qwen/Qwen2.5-72B-Instruct",
|
|
526
|
-
QWEN_2_5_CODER_7B = "Qwen/Qwen2.5-Coder-7B",
|
|
527
|
-
QWEN_2_5_CODER_32B_INSTRUCT = "Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
528
|
-
QWQ_32B = "Qwen/QwQ-32B",
|
|
529
|
-
QWEN_2_5_VL_32B = "Qwen/Qwen2.5-VL-32B-Instruct",
|
|
530
|
-
DEEPSEEK_R1 = "deepseek-ai/DeepSeek-R1",
|
|
531
|
-
DEEPSEEK_V3 = "deepseek-ai/DeepSeek-V3",
|
|
532
|
-
DEEPSEEK_V3_1 = "deepseek-ai/DeepSeek-V3.1",
|
|
533
|
-
DEEPSEEK_V3_2_EXP = "deepseek-ai/DeepSeek-V3.2-Exp",
|
|
534
|
-
PHI_4 = "microsoft/phi-4",
|
|
535
|
-
PHI_4_REASONING = "microsoft/Phi-4-reasoning",
|
|
536
|
-
PHI_4_MINI_INSTRUCT = "microsoft/Phi-4-mini-instruct",
|
|
537
|
-
PHI_4_MINI_REASONING = "microsoft/Phi-4-mini-reasoning",
|
|
538
|
-
PHI_3_MINI_128K_INSTRUCT = "microsoft/Phi-3-mini-128k-instruct",
|
|
539
|
-
PHI_3_VISION_128K_INSTRUCT = "microsoft/Phi-3-vision-128k-instruct",
|
|
540
|
-
GEMMA_3_270M = "google/gemma-3-270m",
|
|
541
|
-
GEMMA_3_1B_IT = "google/gemma-3-1b-it",
|
|
542
|
-
GEMMA_3_4B_IT = "google/gemma-3-4b-it",
|
|
543
|
-
GEMMA_3_12B_IT = "google/gemma-3-12b-it",
|
|
544
|
-
GEMMA_3_27B_IT = "google/gemma-3-27b-it",
|
|
545
|
-
GEMMA_2_9B = "google/gemma-2-9b",
|
|
546
|
-
GEMMA_2_27B = "google/gemma-2-27b",
|
|
547
|
-
GEMMA_2B = "google/gemma-2b",
|
|
548
|
-
GEMMA_7B = "google/gemma-7b",
|
|
549
|
-
FALCON_40B_INSTRUCT = "tiiuae/falcon-40b-instruct",
|
|
550
|
-
FALCON_180B_CHAT = "tiiuae/falcon-180B-chat",
|
|
551
|
-
STARCODER2_15B = "bigcode/starcoder2-15b",
|
|
552
|
-
CODELLAMA_34B_INSTRUCT = "codellama/CodeLlama-34b-Instruct-hf",
|
|
553
|
-
BLOOM_7B1 = "bigscience/bloom-7b1",
|
|
554
|
-
BLOOM_1B3 = "bigscience/bloom-1b3",
|
|
555
|
-
GLM_5 = "zai-org/GLM-5",
|
|
556
|
-
QWEN_3_5_397B_A17B = "Qwen/Qwen3.5-397B-A17B",
|
|
557
|
-
NEMOTRON_3_NANO_30B = "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16",
|
|
558
|
-
SMOLLM3_3B = "HuggingFaceTB/SmolLM3-3B",
|
|
559
|
-
FALCON_3_7B_INSTRUCT = "tiiuae/Falcon3-7B-Instruct",
|
|
560
|
-
FALCON_3_10B_INSTRUCT = "tiiuae/Falcon3-10B-Instruct"
|
|
561
|
-
}
|
|
562
505
|
/**
|
|
563
506
|
* Supported Models for AWS SageMaker JumpStart
|
|
564
507
|
* https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-latest.html
|
|
@@ -632,16 +575,6 @@ export declare enum AnthropicBetaFeature {
|
|
|
632
575
|
INTERLEAVED_THINKING = "interleaved-thinking-2025-05-14",
|
|
633
576
|
FINE_GRAINED_STREAMING = "fine-grained-tool-streaming-2025-05-14"
|
|
634
577
|
}
|
|
635
|
-
/**
|
|
636
|
-
* Supported Models for DeepSeek
|
|
637
|
-
* Docs: https://api-docs.deepseek.com/quick_start/pricing
|
|
638
|
-
*/
|
|
639
|
-
export declare enum DeepSeekModels {
|
|
640
|
-
/** General-purpose chat (DeepSeek-V3) */
|
|
641
|
-
DEEPSEEK_CHAT = "deepseek-chat",
|
|
642
|
-
/** Reasoning model (DeepSeek-R1) — exposes reasoning_content */
|
|
643
|
-
DEEPSEEK_REASONER = "deepseek-reasoner"
|
|
644
|
-
}
|
|
645
578
|
/**
|
|
646
579
|
* Selected NVIDIA NIM Models
|
|
647
580
|
* Full catalog: https://build.nvidia.com/models
|
|
@@ -861,6 +794,10 @@ export declare enum CloudflareModels {
|
|
|
861
794
|
QWEN_1P5_14B_CHAT_AWQ = "@cf/qwen/qwen1.5-14b-chat-awq",
|
|
862
795
|
GEMMA_2B_IT_LORA = "@cf/google/gemma-2b-it-lora"
|
|
863
796
|
}
|
|
797
|
+
export declare enum DeepSeekModels {
|
|
798
|
+
DEEPSEEK_CHAT = "deepseek-chat",
|
|
799
|
+
DEEPSEEK_REASONER = "deepseek-reasoner"
|
|
800
|
+
}
|
|
864
801
|
export declare enum FireworksModels {
|
|
865
802
|
KIMI_K2P6 = "accounts/fireworks/models/kimi-k2p6",
|
|
866
803
|
GPT_OSS_120B = "accounts/fireworks/models/gpt-oss-120b",
|
|
@@ -905,6 +842,61 @@ export declare enum GroqModels {
|
|
|
905
842
|
LLAMA_3_2_90B_VISION_PREVIEW = "llama-3.2-90b-vision-preview",
|
|
906
843
|
LLAMA_3_2_11B_VISION_PREVIEW = "llama-3.2-11b-vision-preview"
|
|
907
844
|
}
|
|
845
|
+
export declare enum HuggingFaceModels {
|
|
846
|
+
LLAMA_3_3_70B_INSTRUCT = "meta-llama/Llama-3.3-70B-Instruct",
|
|
847
|
+
LLAMA_3_2_1B = "meta-llama/Llama-3.2-1B",
|
|
848
|
+
LLAMA_3_2_3B_INSTRUCT = "meta-llama/Llama-3.2-3B-Instruct",
|
|
849
|
+
LLAMA_3_1_8B = "meta-llama/Llama-3.1-8B",
|
|
850
|
+
LLAMA_3_1_8B_INSTRUCT = "meta-llama/Llama-3.1-8B-Instruct",
|
|
851
|
+
LLAMA_3_1_70B_INSTRUCT = "meta-llama/Llama-3.1-70B-Instruct",
|
|
852
|
+
LLAMA_3_1_405B_INSTRUCT = "meta-llama/Llama-3.1-405B-Instruct",
|
|
853
|
+
LLAMA_3_8B_INSTRUCT = "meta-llama/Meta-Llama-3-8B-Instruct",
|
|
854
|
+
LLAMA_3_70B_INSTRUCT = "meta-llama/Meta-Llama-3-70B-Instruct",
|
|
855
|
+
MISTRAL_LARGE_3_675B = "mistralai/Mistral-Large-3-675B-Instruct-2512",
|
|
856
|
+
MISTRAL_SMALL_3_1_24B = "mistralai/Mistral-Small-3.1-24B-Instruct-2503",
|
|
857
|
+
MISTRAL_SMALL_24B = "mistralai/Mistral-Small-24B-Instruct-2501",
|
|
858
|
+
MISTRAL_7B_INSTRUCT = "mistralai/Mistral-7B-Instruct-v0.2",
|
|
859
|
+
MIXTRAL_8X7B_INSTRUCT = "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
|
860
|
+
DEVSTRAL_2 = "mistralai/Devstral-2",
|
|
861
|
+
QWEN_2_5_7B = "Qwen/Qwen2.5-7B",
|
|
862
|
+
QWEN_2_5_32B = "Qwen/Qwen2.5-32B",
|
|
863
|
+
QWEN_2_5_72B_INSTRUCT = "Qwen/Qwen2.5-72B-Instruct",
|
|
864
|
+
QWEN_2_5_CODER_7B = "Qwen/Qwen2.5-Coder-7B",
|
|
865
|
+
QWEN_2_5_CODER_32B_INSTRUCT = "Qwen/Qwen2.5-Coder-32B-Instruct",
|
|
866
|
+
QWQ_32B = "Qwen/QwQ-32B",
|
|
867
|
+
QWEN_2_5_VL_32B = "Qwen/Qwen2.5-VL-32B-Instruct",
|
|
868
|
+
DEEPSEEK_R1 = "deepseek-ai/DeepSeek-R1",
|
|
869
|
+
DEEPSEEK_V3 = "deepseek-ai/DeepSeek-V3",
|
|
870
|
+
DEEPSEEK_V3_1 = "deepseek-ai/DeepSeek-V3.1",
|
|
871
|
+
DEEPSEEK_V3_2_EXP = "deepseek-ai/DeepSeek-V3.2-Exp",
|
|
872
|
+
PHI_4 = "microsoft/phi-4",
|
|
873
|
+
PHI_4_REASONING = "microsoft/Phi-4-reasoning",
|
|
874
|
+
PHI_4_MINI_INSTRUCT = "microsoft/Phi-4-mini-instruct",
|
|
875
|
+
PHI_4_MINI_REASONING = "microsoft/Phi-4-mini-reasoning",
|
|
876
|
+
PHI_3_MINI_128K_INSTRUCT = "microsoft/Phi-3-mini-128k-instruct",
|
|
877
|
+
PHI_3_VISION_128K_INSTRUCT = "microsoft/Phi-3-vision-128k-instruct",
|
|
878
|
+
GEMMA_3_270M = "google/gemma-3-270m",
|
|
879
|
+
GEMMA_3_1B_IT = "google/gemma-3-1b-it",
|
|
880
|
+
GEMMA_3_4B_IT = "google/gemma-3-4b-it",
|
|
881
|
+
GEMMA_3_12B_IT = "google/gemma-3-12b-it",
|
|
882
|
+
GEMMA_3_27B_IT = "google/gemma-3-27b-it",
|
|
883
|
+
GEMMA_2_9B = "google/gemma-2-9b",
|
|
884
|
+
GEMMA_2_27B = "google/gemma-2-27b",
|
|
885
|
+
GEMMA_2B = "google/gemma-2b",
|
|
886
|
+
GEMMA_7B = "google/gemma-7b",
|
|
887
|
+
FALCON_40B_INSTRUCT = "tiiuae/falcon-40b-instruct",
|
|
888
|
+
FALCON_180B_CHAT = "tiiuae/falcon-180B-chat",
|
|
889
|
+
STARCODER2_15B = "bigcode/starcoder2-15b",
|
|
890
|
+
CODELLAMA_34B_INSTRUCT = "codellama/CodeLlama-34b-Instruct-hf",
|
|
891
|
+
BLOOM_7B1 = "bigscience/bloom-7b1",
|
|
892
|
+
BLOOM_1B3 = "bigscience/bloom-1b3",
|
|
893
|
+
GLM_5 = "zai-org/GLM-5",
|
|
894
|
+
QWEN_3_5_397B_A17B = "Qwen/Qwen3.5-397B-A17B",
|
|
895
|
+
NEMOTRON_3_NANO_30B = "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16",
|
|
896
|
+
SMOLLM3_3B = "HuggingFaceTB/SmolLM3-3B",
|
|
897
|
+
FALCON_3_7B_INSTRUCT = "tiiuae/Falcon3-7B-Instruct",
|
|
898
|
+
FALCON_3_10B_INSTRUCT = "tiiuae/Falcon3-10B-Instruct"
|
|
899
|
+
}
|
|
908
900
|
export declare enum InceptionLabsModels {
|
|
909
901
|
MERCURY_2 = "mercury-2"
|
|
910
902
|
}
|
package/dist/constants/enums.js
CHANGED
|
@@ -14,11 +14,9 @@ export var AIProviderName;
|
|
|
14
14
|
AIProviderName["ANTHROPIC"] = "anthropic";
|
|
15
15
|
AIProviderName["AZURE"] = "azure";
|
|
16
16
|
AIProviderName["GOOGLE_AI"] = "google-ai";
|
|
17
|
-
AIProviderName["HUGGINGFACE"] = "huggingface";
|
|
18
17
|
AIProviderName["OLLAMA"] = "ollama";
|
|
19
18
|
AIProviderName["LITELLM"] = "litellm";
|
|
20
19
|
AIProviderName["SAGEMAKER"] = "sagemaker";
|
|
21
|
-
AIProviderName["DEEPSEEK"] = "deepseek";
|
|
22
20
|
AIProviderName["NVIDIA_NIM"] = "nvidia-nim";
|
|
23
21
|
AIProviderName["LM_STUDIO"] = "lm-studio";
|
|
24
22
|
AIProviderName["LLAMACPP"] = "llamacpp";
|
|
@@ -27,10 +25,12 @@ export var AIProviderName;
|
|
|
27
25
|
AIProviderName["BASETEN"] = "baseten";
|
|
28
26
|
AIProviderName["CEREBRAS"] = "cerebras";
|
|
29
27
|
AIProviderName["CLOUDFLARE"] = "cloudflare";
|
|
28
|
+
AIProviderName["DEEPSEEK"] = "deepseek";
|
|
30
29
|
AIProviderName["FIREWORKS"] = "fireworks";
|
|
31
30
|
AIProviderName["FRIENDLI"] = "friendli";
|
|
32
31
|
AIProviderName["GMICLOUD"] = "gmicloud";
|
|
33
32
|
AIProviderName["GROQ"] = "groq";
|
|
33
|
+
AIProviderName["HUGGINGFACE"] = "huggingface";
|
|
34
34
|
AIProviderName["INCEPTION_LABS"] = "inception-labs";
|
|
35
35
|
AIProviderName["IO_INTELLIGENCE"] = "io-intelligence";
|
|
36
36
|
AIProviderName["MANCER"] = "mancer";
|
|
@@ -677,89 +677,6 @@ export var LiteLLMModels;
|
|
|
677
677
|
LiteLLMModels["PERPLEXITY_SONAR_PRO"] = "perplexity/sonar-pro";
|
|
678
678
|
LiteLLMModels["PERPLEXITY_SONAR_REASONING_PRO"] = "perplexity/sonar-reasoning-pro";
|
|
679
679
|
})(LiteLLMModels || (LiteLLMModels = {}));
|
|
680
|
-
/**
|
|
681
|
-
* Supported Models for Hugging Face Inference API
|
|
682
|
-
*/
|
|
683
|
-
export var HuggingFaceModels;
|
|
684
|
-
(function (HuggingFaceModels) {
|
|
685
|
-
// Meta Llama 3.3
|
|
686
|
-
HuggingFaceModels["LLAMA_3_3_70B_INSTRUCT"] = "meta-llama/Llama-3.3-70B-Instruct";
|
|
687
|
-
// Meta Llama 3.2
|
|
688
|
-
HuggingFaceModels["LLAMA_3_2_1B"] = "meta-llama/Llama-3.2-1B";
|
|
689
|
-
HuggingFaceModels["LLAMA_3_2_3B_INSTRUCT"] = "meta-llama/Llama-3.2-3B-Instruct";
|
|
690
|
-
// Meta Llama 3.1
|
|
691
|
-
HuggingFaceModels["LLAMA_3_1_8B"] = "meta-llama/Llama-3.1-8B";
|
|
692
|
-
HuggingFaceModels["LLAMA_3_1_70B_INSTRUCT"] = "meta-llama/Llama-3.1-70B-Instruct";
|
|
693
|
-
HuggingFaceModels["LLAMA_3_1_405B_INSTRUCT"] = "meta-llama/Llama-3.1-405B-Instruct";
|
|
694
|
-
// Meta Llama 3.0
|
|
695
|
-
HuggingFaceModels["LLAMA_3_8B_INSTRUCT"] = "meta-llama/Meta-Llama-3-8B-Instruct";
|
|
696
|
-
HuggingFaceModels["LLAMA_3_70B_INSTRUCT"] = "meta-llama/Meta-Llama-3-70B-Instruct";
|
|
697
|
-
// Mistral Large
|
|
698
|
-
HuggingFaceModels["MISTRAL_LARGE_3_675B"] = "mistralai/Mistral-Large-3-675B-Instruct-2512";
|
|
699
|
-
// Mistral Small
|
|
700
|
-
HuggingFaceModels["MISTRAL_SMALL_3_1_24B"] = "mistralai/Mistral-Small-3.1-24B-Instruct-2503";
|
|
701
|
-
HuggingFaceModels["MISTRAL_SMALL_24B"] = "mistralai/Mistral-Small-24B-Instruct-2501";
|
|
702
|
-
// Mistral
|
|
703
|
-
HuggingFaceModels["MISTRAL_7B_INSTRUCT"] = "mistralai/Mistral-7B-Instruct-v0.2";
|
|
704
|
-
HuggingFaceModels["MIXTRAL_8X7B_INSTRUCT"] = "mistralai/Mixtral-8x7B-Instruct-v0.1";
|
|
705
|
-
// Mistral Devstral
|
|
706
|
-
HuggingFaceModels["DEVSTRAL_2"] = "mistralai/Devstral-2";
|
|
707
|
-
// Qwen 2.5
|
|
708
|
-
HuggingFaceModels["QWEN_2_5_7B"] = "Qwen/Qwen2.5-7B";
|
|
709
|
-
HuggingFaceModels["QWEN_2_5_32B"] = "Qwen/Qwen2.5-32B";
|
|
710
|
-
HuggingFaceModels["QWEN_2_5_72B_INSTRUCT"] = "Qwen/Qwen2.5-72B-Instruct";
|
|
711
|
-
// Qwen 2.5 Coder
|
|
712
|
-
HuggingFaceModels["QWEN_2_5_CODER_7B"] = "Qwen/Qwen2.5-Coder-7B";
|
|
713
|
-
HuggingFaceModels["QWEN_2_5_CODER_32B_INSTRUCT"] = "Qwen/Qwen2.5-Coder-32B-Instruct";
|
|
714
|
-
// Qwen QwQ
|
|
715
|
-
HuggingFaceModels["QWQ_32B"] = "Qwen/QwQ-32B";
|
|
716
|
-
// Qwen 2.5 VL (Multimodal)
|
|
717
|
-
HuggingFaceModels["QWEN_2_5_VL_32B"] = "Qwen/Qwen2.5-VL-32B-Instruct";
|
|
718
|
-
// DeepSeek
|
|
719
|
-
HuggingFaceModels["DEEPSEEK_R1"] = "deepseek-ai/DeepSeek-R1";
|
|
720
|
-
HuggingFaceModels["DEEPSEEK_V3"] = "deepseek-ai/DeepSeek-V3";
|
|
721
|
-
HuggingFaceModels["DEEPSEEK_V3_1"] = "deepseek-ai/DeepSeek-V3.1";
|
|
722
|
-
HuggingFaceModels["DEEPSEEK_V3_2_EXP"] = "deepseek-ai/DeepSeek-V3.2-Exp";
|
|
723
|
-
// Microsoft Phi
|
|
724
|
-
HuggingFaceModels["PHI_4"] = "microsoft/phi-4";
|
|
725
|
-
HuggingFaceModels["PHI_4_REASONING"] = "microsoft/Phi-4-reasoning";
|
|
726
|
-
HuggingFaceModels["PHI_4_MINI_INSTRUCT"] = "microsoft/Phi-4-mini-instruct";
|
|
727
|
-
HuggingFaceModels["PHI_4_MINI_REASONING"] = "microsoft/Phi-4-mini-reasoning";
|
|
728
|
-
HuggingFaceModels["PHI_3_MINI_128K_INSTRUCT"] = "microsoft/Phi-3-mini-128k-instruct";
|
|
729
|
-
HuggingFaceModels["PHI_3_VISION_128K_INSTRUCT"] = "microsoft/Phi-3-vision-128k-instruct";
|
|
730
|
-
// Google Gemma 3
|
|
731
|
-
HuggingFaceModels["GEMMA_3_270M"] = "google/gemma-3-270m";
|
|
732
|
-
HuggingFaceModels["GEMMA_3_1B_IT"] = "google/gemma-3-1b-it";
|
|
733
|
-
HuggingFaceModels["GEMMA_3_4B_IT"] = "google/gemma-3-4b-it";
|
|
734
|
-
HuggingFaceModels["GEMMA_3_12B_IT"] = "google/gemma-3-12b-it";
|
|
735
|
-
HuggingFaceModels["GEMMA_3_27B_IT"] = "google/gemma-3-27b-it";
|
|
736
|
-
// Google Gemma 2
|
|
737
|
-
HuggingFaceModels["GEMMA_2_9B"] = "google/gemma-2-9b";
|
|
738
|
-
HuggingFaceModels["GEMMA_2_27B"] = "google/gemma-2-27b";
|
|
739
|
-
// Google Gemma 1
|
|
740
|
-
HuggingFaceModels["GEMMA_2B"] = "google/gemma-2b";
|
|
741
|
-
HuggingFaceModels["GEMMA_7B"] = "google/gemma-7b";
|
|
742
|
-
// Falcon
|
|
743
|
-
HuggingFaceModels["FALCON_40B_INSTRUCT"] = "tiiuae/falcon-40b-instruct";
|
|
744
|
-
HuggingFaceModels["FALCON_180B_CHAT"] = "tiiuae/falcon-180B-chat";
|
|
745
|
-
// Code Models
|
|
746
|
-
HuggingFaceModels["STARCODER2_15B"] = "bigcode/starcoder2-15b";
|
|
747
|
-
HuggingFaceModels["CODELLAMA_34B_INSTRUCT"] = "codellama/CodeLlama-34b-Instruct-hf";
|
|
748
|
-
// BLOOM
|
|
749
|
-
HuggingFaceModels["BLOOM_7B1"] = "bigscience/bloom-7b1";
|
|
750
|
-
HuggingFaceModels["BLOOM_1B3"] = "bigscience/bloom-1b3";
|
|
751
|
-
// Z.AI GLM-5 (February 2026)
|
|
752
|
-
HuggingFaceModels["GLM_5"] = "zai-org/GLM-5";
|
|
753
|
-
// Qwen 3.5 Multimodal (February 2026)
|
|
754
|
-
HuggingFaceModels["QWEN_3_5_397B_A17B"] = "Qwen/Qwen3.5-397B-A17B";
|
|
755
|
-
// NVIDIA Nemotron 3 Nano
|
|
756
|
-
HuggingFaceModels["NEMOTRON_3_NANO_30B"] = "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16";
|
|
757
|
-
// HuggingFace SmolLM3
|
|
758
|
-
HuggingFaceModels["SMOLLM3_3B"] = "HuggingFaceTB/SmolLM3-3B";
|
|
759
|
-
// Falcon 3 Series
|
|
760
|
-
HuggingFaceModels["FALCON_3_7B_INSTRUCT"] = "tiiuae/Falcon3-7B-Instruct";
|
|
761
|
-
HuggingFaceModels["FALCON_3_10B_INSTRUCT"] = "tiiuae/Falcon3-10B-Instruct";
|
|
762
|
-
})(HuggingFaceModels || (HuggingFaceModels = {}));
|
|
763
680
|
/**
|
|
764
681
|
* Supported Models for AWS SageMaker JumpStart
|
|
765
682
|
* https://docs.aws.amazon.com/sagemaker/latest/dg/jumpstart-foundation-models-latest.html
|
|
@@ -858,17 +775,6 @@ export var AnthropicBetaFeature;
|
|
|
858
775
|
AnthropicBetaFeature["INTERLEAVED_THINKING"] = "interleaved-thinking-2025-05-14";
|
|
859
776
|
AnthropicBetaFeature["FINE_GRAINED_STREAMING"] = "fine-grained-tool-streaming-2025-05-14";
|
|
860
777
|
})(AnthropicBetaFeature || (AnthropicBetaFeature = {}));
|
|
861
|
-
/**
|
|
862
|
-
* Supported Models for DeepSeek
|
|
863
|
-
* Docs: https://api-docs.deepseek.com/quick_start/pricing
|
|
864
|
-
*/
|
|
865
|
-
export var DeepSeekModels;
|
|
866
|
-
(function (DeepSeekModels) {
|
|
867
|
-
/** General-purpose chat (DeepSeek-V3) */
|
|
868
|
-
DeepSeekModels["DEEPSEEK_CHAT"] = "deepseek-chat";
|
|
869
|
-
/** Reasoning model (DeepSeek-R1) — exposes reasoning_content */
|
|
870
|
-
DeepSeekModels["DEEPSEEK_REASONER"] = "deepseek-reasoner";
|
|
871
|
-
})(DeepSeekModels || (DeepSeekModels = {}));
|
|
872
778
|
/**
|
|
873
779
|
* Selected NVIDIA NIM Models
|
|
874
780
|
* Full catalog: https://build.nvidia.com/models
|
|
@@ -1119,6 +1025,11 @@ export var CloudflareModels;
|
|
|
1119
1025
|
CloudflareModels["QWEN_1P5_14B_CHAT_AWQ"] = "@cf/qwen/qwen1.5-14b-chat-awq";
|
|
1120
1026
|
CloudflareModels["GEMMA_2B_IT_LORA"] = "@cf/google/gemma-2b-it-lora";
|
|
1121
1027
|
})(CloudflareModels || (CloudflareModels = {}));
|
|
1028
|
+
export var DeepSeekModels;
|
|
1029
|
+
(function (DeepSeekModels) {
|
|
1030
|
+
DeepSeekModels["DEEPSEEK_CHAT"] = "deepseek-chat";
|
|
1031
|
+
DeepSeekModels["DEEPSEEK_REASONER"] = "deepseek-reasoner";
|
|
1032
|
+
})(DeepSeekModels || (DeepSeekModels = {}));
|
|
1122
1033
|
export var FireworksModels;
|
|
1123
1034
|
(function (FireworksModels) {
|
|
1124
1035
|
FireworksModels["KIMI_K2P6"] = "accounts/fireworks/models/kimi-k2p6";
|
|
@@ -1167,6 +1078,62 @@ export var GroqModels;
|
|
|
1167
1078
|
GroqModels["LLAMA_3_2_90B_VISION_PREVIEW"] = "llama-3.2-90b-vision-preview";
|
|
1168
1079
|
GroqModels["LLAMA_3_2_11B_VISION_PREVIEW"] = "llama-3.2-11b-vision-preview";
|
|
1169
1080
|
})(GroqModels || (GroqModels = {}));
|
|
1081
|
+
export var HuggingFaceModels;
|
|
1082
|
+
(function (HuggingFaceModels) {
|
|
1083
|
+
HuggingFaceModels["LLAMA_3_3_70B_INSTRUCT"] = "meta-llama/Llama-3.3-70B-Instruct";
|
|
1084
|
+
HuggingFaceModels["LLAMA_3_2_1B"] = "meta-llama/Llama-3.2-1B";
|
|
1085
|
+
HuggingFaceModels["LLAMA_3_2_3B_INSTRUCT"] = "meta-llama/Llama-3.2-3B-Instruct";
|
|
1086
|
+
HuggingFaceModels["LLAMA_3_1_8B"] = "meta-llama/Llama-3.1-8B";
|
|
1087
|
+
HuggingFaceModels["LLAMA_3_1_8B_INSTRUCT"] = "meta-llama/Llama-3.1-8B-Instruct";
|
|
1088
|
+
HuggingFaceModels["LLAMA_3_1_70B_INSTRUCT"] = "meta-llama/Llama-3.1-70B-Instruct";
|
|
1089
|
+
HuggingFaceModels["LLAMA_3_1_405B_INSTRUCT"] = "meta-llama/Llama-3.1-405B-Instruct";
|
|
1090
|
+
HuggingFaceModels["LLAMA_3_8B_INSTRUCT"] = "meta-llama/Meta-Llama-3-8B-Instruct";
|
|
1091
|
+
HuggingFaceModels["LLAMA_3_70B_INSTRUCT"] = "meta-llama/Meta-Llama-3-70B-Instruct";
|
|
1092
|
+
HuggingFaceModels["MISTRAL_LARGE_3_675B"] = "mistralai/Mistral-Large-3-675B-Instruct-2512";
|
|
1093
|
+
HuggingFaceModels["MISTRAL_SMALL_3_1_24B"] = "mistralai/Mistral-Small-3.1-24B-Instruct-2503";
|
|
1094
|
+
HuggingFaceModels["MISTRAL_SMALL_24B"] = "mistralai/Mistral-Small-24B-Instruct-2501";
|
|
1095
|
+
HuggingFaceModels["MISTRAL_7B_INSTRUCT"] = "mistralai/Mistral-7B-Instruct-v0.2";
|
|
1096
|
+
HuggingFaceModels["MIXTRAL_8X7B_INSTRUCT"] = "mistralai/Mixtral-8x7B-Instruct-v0.1";
|
|
1097
|
+
HuggingFaceModels["DEVSTRAL_2"] = "mistralai/Devstral-2";
|
|
1098
|
+
HuggingFaceModels["QWEN_2_5_7B"] = "Qwen/Qwen2.5-7B";
|
|
1099
|
+
HuggingFaceModels["QWEN_2_5_32B"] = "Qwen/Qwen2.5-32B";
|
|
1100
|
+
HuggingFaceModels["QWEN_2_5_72B_INSTRUCT"] = "Qwen/Qwen2.5-72B-Instruct";
|
|
1101
|
+
HuggingFaceModels["QWEN_2_5_CODER_7B"] = "Qwen/Qwen2.5-Coder-7B";
|
|
1102
|
+
HuggingFaceModels["QWEN_2_5_CODER_32B_INSTRUCT"] = "Qwen/Qwen2.5-Coder-32B-Instruct";
|
|
1103
|
+
HuggingFaceModels["QWQ_32B"] = "Qwen/QwQ-32B";
|
|
1104
|
+
HuggingFaceModels["QWEN_2_5_VL_32B"] = "Qwen/Qwen2.5-VL-32B-Instruct";
|
|
1105
|
+
HuggingFaceModels["DEEPSEEK_R1"] = "deepseek-ai/DeepSeek-R1";
|
|
1106
|
+
HuggingFaceModels["DEEPSEEK_V3"] = "deepseek-ai/DeepSeek-V3";
|
|
1107
|
+
HuggingFaceModels["DEEPSEEK_V3_1"] = "deepseek-ai/DeepSeek-V3.1";
|
|
1108
|
+
HuggingFaceModels["DEEPSEEK_V3_2_EXP"] = "deepseek-ai/DeepSeek-V3.2-Exp";
|
|
1109
|
+
HuggingFaceModels["PHI_4"] = "microsoft/phi-4";
|
|
1110
|
+
HuggingFaceModels["PHI_4_REASONING"] = "microsoft/Phi-4-reasoning";
|
|
1111
|
+
HuggingFaceModels["PHI_4_MINI_INSTRUCT"] = "microsoft/Phi-4-mini-instruct";
|
|
1112
|
+
HuggingFaceModels["PHI_4_MINI_REASONING"] = "microsoft/Phi-4-mini-reasoning";
|
|
1113
|
+
HuggingFaceModels["PHI_3_MINI_128K_INSTRUCT"] = "microsoft/Phi-3-mini-128k-instruct";
|
|
1114
|
+
HuggingFaceModels["PHI_3_VISION_128K_INSTRUCT"] = "microsoft/Phi-3-vision-128k-instruct";
|
|
1115
|
+
HuggingFaceModels["GEMMA_3_270M"] = "google/gemma-3-270m";
|
|
1116
|
+
HuggingFaceModels["GEMMA_3_1B_IT"] = "google/gemma-3-1b-it";
|
|
1117
|
+
HuggingFaceModels["GEMMA_3_4B_IT"] = "google/gemma-3-4b-it";
|
|
1118
|
+
HuggingFaceModels["GEMMA_3_12B_IT"] = "google/gemma-3-12b-it";
|
|
1119
|
+
HuggingFaceModels["GEMMA_3_27B_IT"] = "google/gemma-3-27b-it";
|
|
1120
|
+
HuggingFaceModels["GEMMA_2_9B"] = "google/gemma-2-9b";
|
|
1121
|
+
HuggingFaceModels["GEMMA_2_27B"] = "google/gemma-2-27b";
|
|
1122
|
+
HuggingFaceModels["GEMMA_2B"] = "google/gemma-2b";
|
|
1123
|
+
HuggingFaceModels["GEMMA_7B"] = "google/gemma-7b";
|
|
1124
|
+
HuggingFaceModels["FALCON_40B_INSTRUCT"] = "tiiuae/falcon-40b-instruct";
|
|
1125
|
+
HuggingFaceModels["FALCON_180B_CHAT"] = "tiiuae/falcon-180B-chat";
|
|
1126
|
+
HuggingFaceModels["STARCODER2_15B"] = "bigcode/starcoder2-15b";
|
|
1127
|
+
HuggingFaceModels["CODELLAMA_34B_INSTRUCT"] = "codellama/CodeLlama-34b-Instruct-hf";
|
|
1128
|
+
HuggingFaceModels["BLOOM_7B1"] = "bigscience/bloom-7b1";
|
|
1129
|
+
HuggingFaceModels["BLOOM_1B3"] = "bigscience/bloom-1b3";
|
|
1130
|
+
HuggingFaceModels["GLM_5"] = "zai-org/GLM-5";
|
|
1131
|
+
HuggingFaceModels["QWEN_3_5_397B_A17B"] = "Qwen/Qwen3.5-397B-A17B";
|
|
1132
|
+
HuggingFaceModels["NEMOTRON_3_NANO_30B"] = "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-BF16";
|
|
1133
|
+
HuggingFaceModels["SMOLLM3_3B"] = "HuggingFaceTB/SmolLM3-3B";
|
|
1134
|
+
HuggingFaceModels["FALCON_3_7B_INSTRUCT"] = "tiiuae/Falcon3-7B-Instruct";
|
|
1135
|
+
HuggingFaceModels["FALCON_3_10B_INSTRUCT"] = "tiiuae/Falcon3-10B-Instruct";
|
|
1136
|
+
})(HuggingFaceModels || (HuggingFaceModels = {}));
|
|
1170
1137
|
export var InceptionLabsModels;
|
|
1171
1138
|
(function (InceptionLabsModels) {
|
|
1172
1139
|
InceptionLabsModels["MERCURY_2"] = "mercury-2";
|
|
@@ -3,7 +3,7 @@ import type { ProviderDescriptor } from "../types/index.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* Single source of truth for provider identity, credentials, defaults, and
|
|
5
5
|
* runtime behavior classification — the hand-maintained providers plus the
|
|
6
|
-
*
|
|
6
|
+
* JSON-catalog providers derived above.
|
|
7
7
|
*/
|
|
8
8
|
export declare const PROVIDER_DESCRIPTORS: readonly ProviderDescriptor[];
|
|
9
9
|
/** O(1) canonical-name → descriptor lookup. */
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { AIProviderName } from "../constants/enums.js";
|
|
2
|
-
import { GoogleAIModels, OpenAIModels, AnthropicModels, VertexModels,
|
|
2
|
+
import { GoogleAIModels, OpenAIModels, AnthropicModels, VertexModels, OllamaModels, LiteLLMModels, NvidiaNimModels, OpenRouterModels, CohereModels, VoyageModels, TypeSafeModels, JinaModels, StabilityModels, IdeogramModels, RecraftModels, ReplicateModels, } from "../constants/enums.js";
|
|
3
3
|
import { API_KEY_FORMATS } from "../utils/providerConfig.js";
|
|
4
4
|
import { getCatalogJsonEntries, catalogCredentialsKey, catalogEnvVar, } from "../providers/catalog/loader.js";
|
|
5
5
|
import { DEFAULT_INFERENCE_KINDS } from "../types/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* Hand-maintained provider identity, credentials, defaults, and runtime
|
|
8
|
-
* behavior classification for every provider EXCEPT the
|
|
9
|
-
* providers derived by buildCatalogDescriptors() below (see
|
|
10
|
-
*
|
|
11
|
-
* provider, stays here too). Pure data — no provider-class imports, no dynamic
|
|
8
|
+
* behavior classification for every provider EXCEPT the JSON-catalog
|
|
9
|
+
* providers derived by buildCatalogDescriptors() below (see that
|
|
10
|
+
* function's own doc). Pure data — no provider-class imports, no dynamic
|
|
12
11
|
* import(), no side effects beyond building the two derived lookup maps
|
|
13
12
|
* below. Order follows the AIProviderName enum declaration order
|
|
14
13
|
* (enums.ts:8-40) so this file stays easy to diff against it.
|
|
@@ -193,30 +192,8 @@ const HAND_DESCRIPTORS = [
|
|
|
193
192
|
autoSelectPriority: 4,
|
|
194
193
|
apiKeyFormatPattern: API_KEY_FORMATS["google-ai"],
|
|
195
194
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
aliases: ["hf"],
|
|
199
|
-
credentialsKey: "huggingFace",
|
|
200
|
-
envVars: {
|
|
201
|
-
// Only HF_TOKEN is an actual accepted fallback — confirmed against
|
|
202
|
-
// createHuggingFaceConfig() in providerConfig.ts, which is the only
|
|
203
|
-
// place the huggingFace/client.ts provider resolves its key from.
|
|
204
|
-
// The plan snippet additionally listed HUGGINGFACE_API_TOKEN and
|
|
205
|
-
// HF_API_TOKEN, but neither is read anywhere in the codebase; removed.
|
|
206
|
-
apiKey: "HUGGINGFACE_API_KEY",
|
|
207
|
-
fallbacks: ["HF_TOKEN"],
|
|
208
|
-
baseURL: "HUGGINGFACE_BASE_URL",
|
|
209
|
-
model: "HUGGINGFACE_MODEL",
|
|
210
|
-
},
|
|
211
|
-
defaultModel: HuggingFaceModels.QWEN_2_5_72B_INSTRUCT,
|
|
212
|
-
toolSupport: "model-dependent",
|
|
213
|
-
localRuntime: false,
|
|
214
|
-
healthCheck: "env-only",
|
|
215
|
-
setupUrl: "https://huggingface.co/settings/tokens",
|
|
216
|
-
timeouts: { generateMs: 120_000, streamMs: 120_000 },
|
|
217
|
-
autoSelectPriority: 10,
|
|
218
|
-
apiKeyFormatPattern: API_KEY_FORMATS.huggingface,
|
|
219
|
-
},
|
|
195
|
+
// HuggingFace migrated to the JSON catalog (catalog/huggingface.json) —
|
|
196
|
+
// its descriptor is now derived by buildCatalogDescriptors() below.
|
|
220
197
|
{
|
|
221
198
|
name: AIProviderName.OLLAMA,
|
|
222
199
|
defaultHealthSweepPriority: 8,
|
|
@@ -237,20 +214,10 @@ const HAND_DESCRIPTORS = [
|
|
|
237
214
|
timeouts: { generateMs: 300_000, streamMs: 120_000 },
|
|
238
215
|
autoSelectPriority: 2,
|
|
239
216
|
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
envVars: { apiKey: "MISTRAL_API_KEY", baseURL: "MISTRAL_BASE_URL" },
|
|
245
|
-
defaultModel: MistralModels.MISTRAL_LARGE_LATEST,
|
|
246
|
-
toolSupport: "native",
|
|
247
|
-
localRuntime: false,
|
|
248
|
-
healthCheck: "env-only",
|
|
249
|
-
setupUrl: "https://console.mistral.ai/api-keys",
|
|
250
|
-
timeouts: { generateMs: 45_000, streamMs: 120_000 },
|
|
251
|
-
autoSelectPriority: 9,
|
|
252
|
-
apiKeyFormatPattern: API_KEY_FORMATS.mistral,
|
|
253
|
-
},
|
|
217
|
+
// Mistral migrated to the JSON catalog (catalog/mistral.json, which now
|
|
218
|
+
// carries timeouts/autoSelectPriority/apiKeyFormat/setup.url matching
|
|
219
|
+
// this removed block exactly) — its descriptor is derived by
|
|
220
|
+
// buildCatalogDescriptors() below like deepseek's.
|
|
254
221
|
{
|
|
255
222
|
name: AIProviderName.LITELLM,
|
|
256
223
|
defaultHealthSweepPriority: 7,
|
|
@@ -298,21 +265,11 @@ const HAND_DESCRIPTORS = [
|
|
|
298
265
|
setupUrl: "https://console.aws.amazon.com/iam/",
|
|
299
266
|
apiKeyFormatPattern: API_KEY_FORMATS.aws,
|
|
300
267
|
},
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
apiKey: "DEEPSEEK_API_KEY",
|
|
307
|
-
baseURL: "DEEPSEEK_BASE_URL",
|
|
308
|
-
model: "DEEPSEEK_MODEL",
|
|
309
|
-
},
|
|
310
|
-
defaultModel: DeepSeekModels.DEEPSEEK_CHAT,
|
|
311
|
-
toolSupport: "native",
|
|
312
|
-
localRuntime: false,
|
|
313
|
-
healthCheck: "env-only",
|
|
314
|
-
setupUrl: "https://platform.deepseek.com/api_keys",
|
|
315
|
-
},
|
|
268
|
+
// DeepSeek migrated to the JSON catalog (catalog/deepseek.json) — its
|
|
269
|
+
// descriptor is now derived by buildCatalogDescriptors() below, with no
|
|
270
|
+
// exclusion needed (unlike mistral): every field it derives matches this
|
|
271
|
+
// block byte-for-byte (credentialsKey, envVars, defaultModel, toolSupport,
|
|
272
|
+
// setupUrl), so removing the hand entry changes nothing observable.
|
|
316
273
|
{
|
|
317
274
|
name: AIProviderName.NVIDIA_NIM,
|
|
318
275
|
aliases: ["nvidia", "nim"],
|
|
@@ -496,21 +453,20 @@ const HAND_DESCRIPTORS = [
|
|
|
496
453
|
},
|
|
497
454
|
];
|
|
498
455
|
/**
|
|
499
|
-
* Builds ProviderDescriptor
|
|
500
|
-
*
|
|
501
|
-
*
|
|
502
|
-
* together-ai, upstage, xai. Every field is derived from the catalog JSON
|
|
503
|
-
* (src/lib/providers/catalog/<id>.json), never hand-typed.
|
|
456
|
+
* Builds a ProviderDescriptor for every JSON-catalog provider. Every field
|
|
457
|
+
* is derived from the catalog JSON (src/lib/providers/catalog/<id>.json),
|
|
458
|
+
* never hand-typed.
|
|
504
459
|
*
|
|
505
|
-
*
|
|
506
|
-
*
|
|
507
|
-
*
|
|
508
|
-
*
|
|
509
|
-
*
|
|
510
|
-
*
|
|
511
|
-
*
|
|
512
|
-
*
|
|
513
|
-
*
|
|
460
|
+
* defaultModel prefers models.registryDefaultModel over models.default —
|
|
461
|
+
* only mistral sets registryDefaultModel today (its long-shipped descriptor's
|
|
462
|
+
* defaultModel was MISTRAL_LARGE_LATEST, while models.default is the smaller
|
|
463
|
+
* mistral-small-2506 the OpenAI-compat runtime path actually defaults to via
|
|
464
|
+
* MISTRAL_MODEL); every other provider's registryDefaultModel is absent, so
|
|
465
|
+
* `?? entry.models.default` is a no-op for them.
|
|
466
|
+
*
|
|
467
|
+
* timeouts and autoSelectPriority are included only when the JSON sets
|
|
468
|
+
* them — today only mistral does, preserving its pre-migration hand-typed
|
|
469
|
+
* values.
|
|
514
470
|
*/
|
|
515
471
|
function buildCatalogDescriptor(entry) {
|
|
516
472
|
// Cloudflare is the only catalog provider whose wire config is a
|
|
@@ -519,9 +475,13 @@ function buildCatalogDescriptor(entry) {
|
|
|
519
475
|
// computedBaseURL.envVar formula exactly. Duplicated intentionally, the
|
|
520
476
|
// same way loader.ts itself duplicates toCamelCase from
|
|
521
477
|
// tools/codegen-catalog.ts (src/ must not import from tools/).
|
|
478
|
+
const fallbacks = entry.wire.apiKeyFallbackEnvVars?.length
|
|
479
|
+
? { fallbacks: [...entry.wire.apiKeyFallbackEnvVars] }
|
|
480
|
+
: {};
|
|
522
481
|
const envVars = entry.wire.baseURLTemplate
|
|
523
482
|
? {
|
|
524
483
|
apiKey: catalogEnvVar(entry, "apiKey"),
|
|
484
|
+
...fallbacks,
|
|
525
485
|
extraRequired: [
|
|
526
486
|
`${entry.id.toUpperCase().replace(/-/g, "_")}_${(entry.wire.extraCredentials?.[0] ?? "accountId")
|
|
527
487
|
.replace(/([A-Z])/g, "_$1")
|
|
@@ -531,6 +491,7 @@ function buildCatalogDescriptor(entry) {
|
|
|
531
491
|
}
|
|
532
492
|
: {
|
|
533
493
|
apiKey: catalogEnvVar(entry, "apiKey"),
|
|
494
|
+
...fallbacks,
|
|
534
495
|
baseURL: catalogEnvVar(entry, "baseURL"),
|
|
535
496
|
model: catalogEnvVar(entry, "model"),
|
|
536
497
|
};
|
|
@@ -539,31 +500,37 @@ function buildCatalogDescriptor(entry) {
|
|
|
539
500
|
aliases: entry.aliases,
|
|
540
501
|
credentialsKey: catalogCredentialsKey(entry),
|
|
541
502
|
envVars,
|
|
542
|
-
defaultModel: entry.models.default,
|
|
543
|
-
//
|
|
544
|
-
// ships tools: false, so this ternary's false branch is live, not
|
|
545
|
-
// hypothetical. "none" (not an invented literal — it's the union's own
|
|
503
|
+
defaultModel: entry.models.registryDefaultModel ?? entry.models.default,
|
|
504
|
+
// "none" (not an invented literal — it's the union's own
|
|
546
505
|
// no-tool-support member, the same one
|
|
547
|
-
// REPLICATE/VOYAGE/JINA/STABILITY/IDEOGRAM/RECRAFT use above) is
|
|
548
|
-
//
|
|
549
|
-
|
|
506
|
+
// REPLICATE/VOYAGE/JINA/STABILITY/IDEOGRAM/RECRAFT use above) is
|
|
507
|
+
// mancer's branch; "model-dependent" is huggingface's (matches
|
|
508
|
+
// ProviderDescriptor.toolSupport's own union member, same value
|
|
509
|
+
// Ollama's hand descriptor already uses).
|
|
510
|
+
toolSupport: entry.capabilities.tools === "model-dependent"
|
|
511
|
+
? "model-dependent"
|
|
512
|
+
: entry.capabilities.tools
|
|
513
|
+
? "native"
|
|
514
|
+
: "none",
|
|
550
515
|
localRuntime: false,
|
|
551
516
|
healthCheck: "env-only",
|
|
552
517
|
setupUrl: entry.setup.url,
|
|
553
518
|
...(entry.setup.apiKeyFormat
|
|
554
519
|
? { apiKeyFormatPattern: new RegExp(entry.setup.apiKeyFormat) }
|
|
555
520
|
: {}),
|
|
521
|
+
...(entry.timeouts ? { timeouts: entry.timeouts } : {}),
|
|
522
|
+
...(entry.autoSelectPriority !== undefined
|
|
523
|
+
? { autoSelectPriority: entry.autoSelectPriority }
|
|
524
|
+
: {}),
|
|
556
525
|
};
|
|
557
526
|
}
|
|
558
527
|
function buildCatalogDescriptors() {
|
|
559
|
-
return getCatalogJsonEntries()
|
|
560
|
-
.filter((entry) => entry.id !== "mistral")
|
|
561
|
-
.map(buildCatalogDescriptor);
|
|
528
|
+
return getCatalogJsonEntries().map(buildCatalogDescriptor);
|
|
562
529
|
}
|
|
563
530
|
/**
|
|
564
531
|
* Single source of truth for provider identity, credentials, defaults, and
|
|
565
532
|
* runtime behavior classification — the hand-maintained providers plus the
|
|
566
|
-
*
|
|
533
|
+
* JSON-catalog providers derived above.
|
|
567
534
|
*/
|
|
568
535
|
export const PROVIDER_DESCRIPTORS = [
|
|
569
536
|
...HAND_DESCRIPTORS,
|