mistral-common-errors

Featured

Diagnose and fix Mistral AI common errors and exceptions. Use when encountering Mistral errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "mistral error", "fix mistral", "mistral not working", "debug mistral".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Mistral AI Common Errors ## Overview Quick reference for diagnosing and fixing Mistral AI API errors. Covers HTTP status codes, SDK-specific issues, streaming failures, and tool calling problems with real solutions. ## Prerequisites - Mistral AI SDK installed - `MISTRAL_API_KEY` configured - Access to application logs ## Instructions ### Step 1: Quick Diagnostic ```bash set -euo pipefail # Test API connectivity and auth curl -s -w "\nHTTP Status: %{http_code}\n" \ -H "Authorization: Bearer ${MISTRAL_API_KEY}" \ https://api.mistral.ai/v1/models | jq '.data[].id' 2>/dev/null || echo "FAILED" # Check env echo "Key set: ${MISTRAL_API_KEY:+yes}" echo "Key length: ${#MISTRAL_API_KEY}" ``` ### Step 2: Error Reference --- #### 401 Unauthorized ``` Error: Authentication failed. Invalid API key. ``` **Causes:** Key missing, expired, revoked, or wrong workspace. **Fix:** ```typescript const apiKey = process.env.MISTRAL_API_KEY; if (!apiKey) throw new Error('MISTRAL_API_KEY is not set'); // Test the key const client = new Mistral({ apiKey }); try { await client.models.list(); } catch (e: any) { if (e.status === 401) { console.error('API key invalid — regenerate at console.mistral.ai'); } } ``` **Verify manually:** ```bash set -euo pipefail curl -H "Authorization: Bearer ${MISTRAL_API_KEY}" https://api.mistral.ai/v1/models ``` --- #### 429 Too Many Requests ``` Error: Rate limit exceeded. Retry-After: 60 ``` **Causes:** Exceeded RPM (requests/min) or TPM (t...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category