Spaces:
Running
Running
Heaven K Claude Opus 4.6 commited on
Commit Β·
2f22b9e
1
Parent(s): ce1662b
fix: use Mistral free-tier models only (mistral-small-latest, nemo, 7b, 8x7b)
Browse filesSwitched from paid models (large-2411) to free-tier models.
Chat assistant also uses mistral-small-latest.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
packages/server/src/providers/mistral.ts
CHANGED
|
@@ -56,17 +56,16 @@ export class MistralProvider implements AIProvider {
|
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
| 59 |
-
/**
|
| 60 |
export const MISTRAL_FREE_MODELS = [
|
| 61 |
-
'mistral-
|
| 62 |
-
'mistral-
|
| 63 |
-
'mistral-
|
| 64 |
-
'open-
|
| 65 |
] as const;
|
| 66 |
|
| 67 |
-
/**
|
| 68 |
export const MISTRAL_PAID_MODELS = [
|
| 69 |
-
'mistral-
|
| 70 |
-
'
|
| 71 |
-
'pixtral-large-2411', // Pixtral Large β multimodal capable β
|
| 72 |
] as const;
|
|
|
|
| 56 |
}
|
| 57 |
}
|
| 58 |
|
| 59 |
+
/** Free-tier Mistral models β used first */
|
| 60 |
export const MISTRAL_FREE_MODELS = [
|
| 61 |
+
'mistral-small-latest', // Mistral Small β free tier, fast β
|
| 62 |
+
'open-mistral-nemo', // Nemo 12B β free tier, lightweight β
|
| 63 |
+
'open-mistral-7b', // Mistral 7B β free tier β
|
| 64 |
+
'open-mixtral-8x7b', // Mixtral 8x7B MOE β free tier β
|
| 65 |
] as const;
|
| 66 |
|
| 67 |
+
/** Paid-tier Mistral models β fallback when free exhausted */
|
| 68 |
export const MISTRAL_PAID_MODELS = [
|
| 69 |
+
'mistral-small-2503', // Mistral Small latest β
|
| 70 |
+
'mistral-saba-2502', // Mistral Saba β reasoning β
|
|
|
|
| 71 |
] as const;
|
packages/server/src/services/chatService.ts
CHANGED
|
@@ -70,7 +70,7 @@ async function parseIntent(userMessage: string): Promise<ParsedIntent> {
|
|
| 70 |
const url = useMistral
|
| 71 |
? 'https://api.mistral.ai/v1/chat/completions'
|
| 72 |
: 'https://api.groq.com/openai/v1/chat/completions';
|
| 73 |
-
const model = useMistral ? 'mistral-
|
| 74 |
|
| 75 |
try {
|
| 76 |
const response = await fetch(url, {
|
|
|
|
| 70 |
const url = useMistral
|
| 71 |
? 'https://api.mistral.ai/v1/chat/completions'
|
| 72 |
: 'https://api.groq.com/openai/v1/chat/completions';
|
| 73 |
+
const model = useMistral ? 'mistral-small-latest' : 'llama-3.3-70b-versatile';
|
| 74 |
|
| 75 |
try {
|
| 76 |
const response = await fetch(url, {
|