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 files

Switched 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
- /** Primary Mistral models β€” best quality first (Pro plan) */
60
  export const MISTRAL_FREE_MODELS = [
61
- 'mistral-large-2411', // Mistral Large β€” 123B, best quality βœ…
62
- 'mistral-small-2503', // Mistral Small latest β€” fast & accurate βœ…
63
- 'mistral-saba-2502', // Mistral Saba β€” strong reasoning βœ…
64
- 'open-mistral-nemo', // Nemo 12B β€” lightweight fallback βœ…
65
  ] as const;
66
 
67
- /** Additional Mistral models β€” used after primary are exhausted */
68
  export const MISTRAL_PAID_MODELS = [
69
- 'mistral-large-2407', // Mistral Large v2 β€” solid backup βœ…
70
- 'open-mixtral-8x22b', // Mixtral 8x22B β€” large MOE model βœ…
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-large-2411' : 'llama-3.3-70b-versatile';
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, {