likhonsheikh commited on
Commit
40952e6
·
verified ·
1 Parent(s): 9775f7e

Upload components/providers.tsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/providers.tsx +6 -109
components/providers.tsx CHANGED
@@ -1,121 +1,18 @@
1
  'use client';
2
 
3
- import { createOpenAI } from '@ai-sdk/openai';
4
- import { createHuggingFace, huggingface } from '@ai-sdk/huggingface';
5
- import { createAnthropic } from '@ai-sdk/anthropic';
6
- import { createGoogleGenerativeAI } from '@ai-sdk/google';
7
- import { createGroq } from '@ai-sdk/groq';
8
- import { createCohere } from '@ai-sdk/cohere';
9
- import { createXai } from '@ai-sdk/xai';
10
- import { createPerplexity } from '@ai-sdk/perplexity';
11
- import { createTogether } from '@ai-sdk/together';
12
- import { createVertexAI } from '@ai-sdk/vertexai';
13
- import { createMistral } from '@ai-sdk/mistral';
14
- import { createFireworks } from '@ai-sdk/fireworks';
15
- import { AIProvider } from 'ai/elements';
16
  import { ReactNode } from 'react';
17
 
18
  interface ProvidersProps {
19
  children: ReactNode;
20
  }
21
 
22
- // Create provider instances
23
- const openai = createOpenAI({
24
- apiKey: process.env.OPENAI_API_KEY,
25
- });
26
-
27
- const huggingface = createHuggingFace({
28
- apiKey: process.env.HUGGINGFACE_API_KEY,
29
- });
30
-
31
- const anthropic = createAnthropic({
32
- apiKey: process.env.ANTHROPIC_API_KEY,
33
- });
34
-
35
- const google = createGoogleGenerativeAI({
36
- apiKey: process.env.GOOGLE_API_KEY,
37
- });
38
-
39
- const groq = createGroq({
40
- apiKey: process.env.GROQ_API_KEY,
41
- });
42
-
43
- const cohere = createCohere({
44
- apiKey: process.env.COHERE_API_KEY,
45
- });
46
-
47
- const xai = createXai({
48
- apiKey: process.env.XAI_API_KEY,
49
- });
50
-
51
- const perplexity = createPerplexity({
52
- apiKey: process.env.PERPLEXITY_API_KEY,
53
- });
54
-
55
- const together = createTogether({
56
- apiKey: process.env.TOGETHER_API_KEY,
57
- });
58
-
59
- const vertexai = createVertexAI({
60
- apiKey: process.env.VERTEX_AI_API_KEY,
61
- project: process.env.GOOGLE_CLOUD_PROJECT,
62
- });
63
-
64
- const mistral = createMistral({
65
- apiKey: process.env.MISTRAL_API_KEY,
66
- });
67
-
68
- const fireworks = createFireworks({
69
- apiKey: process.env.FIREWORKS_API_KEY,
70
- });
71
-
72
- // Model configurations for the supported AI models
73
- export const supportedModels = {
74
- // DeepSeek Models
75
- 'deepseek-ai/DeepSeek-V3-0324': { provider: huggingface, type: 'language' },
76
- 'deepseek-ai/DeepSeek-R1-0528': { provider: huggingface, type: 'language' },
77
- 'deepseek-ai/DeepSeek-V3.1': { provider: huggingface, type: 'language' },
78
- 'deepseek-ai/DeepSeek-V3.1-Terminus': { provider: huggingface, type: 'language' },
79
- 'deepseek-ai/DeepSeek-V3.2-Exp': { provider: huggingface, type: 'language' },
80
-
81
- // Qwen Models
82
- 'Qwen/Qwen3-Coder-480B-A35B-Instruct': { provider: huggingface, type: 'language' },
83
- 'Qwen/Qwen2.5-VL-7B-Instruct': { provider: huggingface, type: 'language' },
84
-
85
- // Kimi Models
86
- 'moonshotai/Kimi-K2-Instruct': { provider: huggingface, type: 'language' },
87
- 'moonshotai/Kimi-K2-Instruct-0905': { provider: huggingface, type: 'language' },
88
- 'moonshotai/Kimi-K2-Thinking': { provider: huggingface, type: 'language' },
89
-
90
- // Other Models
91
- 'zai-org/GLM-4.6': { provider: huggingface, type: 'language' },
92
- 'MiniMaxAI/MiniMax-M2': { provider: huggingface, type: 'language' },
93
-
94
- // Popular Open Source Models
95
- 'meta-llama/Llama-3.1-8B-Instruct': { provider: huggingface, type: 'language' },
96
- 'meta-llama/Llama-3.1-70B-Instruct': { provider: huggingface, type: 'language' },
97
- 'meta-llama/Llama-3.3-70B-Instruct': { provider: huggingface, type: 'language' },
98
- 'meta-llama/Llama-4-Scout-17B-16E-Instruct': { provider: huggingface, type: 'language' },
99
- 'google/gemma-3-27b-it': { provider: huggingface, type: 'language' },
100
- } as const;
101
-
102
  export function Providers({ children }: ProvidersProps) {
103
  return (
104
- <AIProvider providers={{
105
- openai,
106
- huggingface,
107
- anthropic,
108
- google,
109
- groq,
110
- cohere,
111
- xai,
112
- perplexity,
113
- together,
114
- vertexai,
115
- mistral,
116
- fireworks,
117
- }}>
118
  {children}
119
- </AIProvider>
120
  );
121
- }
 
 
 
 
1
  'use client';
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  import { ReactNode } from 'react';
4
 
5
  interface ProvidersProps {
6
  children: ReactNode;
7
  }
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  export function Providers({ children }: ProvidersProps) {
10
  return (
11
+ <div>
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  {children}
13
+ </div>
14
  );
15
+ }
16
+
17
+ // Temporary simple provider until we fix AI SDK dependencies
18
+ export const supportedModels = {};