AI Models Reference & Configuration
Comprehensive guide to AI model versions, changes, and configuration across the monorepo
AI Models Reference & Configuration
🎯 Purpose
This document serves as:
- Model Version Tracker - Current and historical AI model versions
- Change Log - Track when models change/deprecate
- Configuration Guide - How to update models across the monorepo
- Troubleshooting - Common model-related issues and solutions
🚨 Critical: Model Deprecations (October 2025)
⚠️ BREAKING CHANGE: Claude 3.5 Sonnet Models Retired
Effective Date: October 28, 2025
Deprecated Models (No longer available):
- ❌
claude-3-5-sonnet-20241022 - ❌
claude-3-5-sonnet-20240620 - ❌
claude-3-5-sonnet-latest(alias)
Migration Path:
- ✅ Use
claude-sonnet-4-5-20250929(latest, Sept 2025) - ✅ Use
claude-3-opus-20240229(legacy, but stable and works everywhere)
If you're still using deprecated models, you'll see:
Status: 404
Error: {"type":"not_found_error","message":"model: claude-3-5-sonnet-20241022"}
🚨 Recent Issues & Solutions
Issue: November 20, 2025 - Model Version Compatibility
Problem: Multiple model versions returned 404 errors
Status: 404
Error: {"type":"not_found_error","message":"model: claude-3-5-sonnet-latest"}
Error: {"type":"not_found_error","message":"model: claude-3-5-sonnet-20241022"}
Error: {"type":"not_found_error","message":"model: claude-3-5-sonnet-20240620"}
Root Cause: Claude 3.5 Sonnet models were DEPRECATED on October 28, 2025
Solution: Use claude-3-opus-20240229 (legacy but widely available and stable)
Files Updated:
apis/backend-api/src/app/ai/ai-models.config.ts- Centralized configtools/scripts/translation/fully-automated-translator.js- Removed hardcoded modellibs/libs-ai/gograb-ai/src/lib/models/ai-models.ts- Updated model list
Verification: Successfully translated "Poop-1" → "Caca 1" using Claude 3 Opus
Lesson Learned:
- Claude 3.5 models are DEPRECATED - Use Claude 4.5 or Claude 3 instead
- Never use
-latestaliases - They point to unpredictable models - Use dated versions - Explicit control and compatibility
- Test with legacy models first - e.g.,
claude-3-opus-20240229works everywhere - Check deprecation notices - Anthropic retired Claude 3.5 with minimal notice
📚 Current Model Versions (Updated November 20, 2025)
Anthropic (Claude)
Model Availability by API Tier
🔴 Critical Information: Not all Claude models are available for all API keys. Availability depends on:
- API Tier: Free, Build ($5/mo), Scale (volume-based)
- Region: Some models may be region-restricted
- Account Status: Newer accounts may have limited access
Production Models (Verified November 2025)
| Model Name | Status | API Tier | Use Case | Notes |
|---|---|---|---|---|
claude-3-opus-20240229 |
✅ VERIFIED WORKING | All Tiers | Production translation, complex reasoning | Our default - Most reliable, widely available |
claude-3-sonnet-20240229 |
✅ Stable | All Tiers | Balanced tasks | Reliable for all accounts |
claude-3-haiku-20240307 |
✅ Stable | All Tiers | Fast, simple tasks | Lowest cost, fastest |
claude-3-5-sonnet-20241022 |
⚠️ Tier-Restricted | Scale+ | Latest improvements | Requires higher tier |
claude-3-5-sonnet-20240620 |
⚠️ Tier-Restricted | Build+ | General use | Requires Build tier or higher |
claude-3-5-haiku-20241022 |
⚠️ Tier-Restricted | Build+ | Fast tasks | May not work for free tier |
claude-sonnet-4-20250514 |
⚠️ Tier-Restricted | Scale+ | Thinking model | Requires Scale tier |
claude-opus-4-20250514 |
⚠️ Tier-Restricted | Scale+ | Advanced thinking | Highest tier only |
claude-3-7-sonnet-20250219 |
⚠️ Experimental | Beta Access | First thinking model | Beta access required |
claude-3-5-sonnet-latest |
❌ Alias | N/A | N/A | Avoid - Points to tier-restricted model |
Model Naming Convention
claude-{version}-{variant}-{YYYYMMDD}
Examples:
✅ claude-3-opus-20240229 (stable, works for all tiers)
✅ claude-3-sonnet-20240229 (stable, works for all tiers)
✅ claude-3-haiku-20240307 (stable, works for all tiers)
⚠️ claude-3-5-sonnet-20241022 (requires higher API tier)
⚠️ claude-3-5-sonnet-20240620 (requires Build tier+)
❌ claude-3-5-sonnet-latest (avoid - points to restricted model)
Best Practices:
- Use dated versions (not
-latest) for production - Test model availability with your specific API key before deploying
- Start with Claude 3 models (20240229/20240307) - they work everywhere
- Upgrade models gradually after verifying access
API Tier Comparison
| Tier | Monthly Cost | Claude 3 Access | Claude 3.5 Access | Claude 4 Access | Best For |
|---|---|---|---|---|---|
| Free | $0 | ✅ Full | ❌ Limited/None | ❌ No | Testing, personal projects |
| Build | $5 | ✅ Full | ✅ Partial | ❌ No | Small teams, startups |
| Scale | Volume-based | ✅ Full | ✅ Full | ✅ Yes | Production, enterprises |
Note: This information is based on November 2025 testing. Always verify with Anthropic's pricing page for current details.
OpenAI (GPT)
Production Models (Updated November 20, 2025)
| Model Name | Status | Release Date | Context | Cost (per 1M tokens) | Notes |
|---|---|---|---|---|---|
gpt-5.1 |
✅ LATEST | Nov 12, 2025 | 128K | $5.00 / $20.00 | Eight personalities, reduced hallucinations |
gpt-5 |
✅ Current | Aug 7, 2025 | 128K | $5.00 / $20.00 | Multimodal reasoning model |
gpt-4o |
✅ Stable | May 2024 | 128K | $2.50 / $10.00 | Vision, function calling, multimodal |
gpt-4o-mini |
✅ Efficient | 2024 | 128K | $0.15 / $0.60 | Fast and cost-effective |
Deprecated Models (No longer available):
- ❌
gpt-4.5- Discontinued August 7, 2025 - ❌
gpt-4.1- Replaced by GPT-5
Notes:
- All current OpenAI models are generally available
- Pricing shown as: Input / Output per 1M tokens
- GPT-5.1 is the latest flagship with personality options
Model Naming Convention
gpt-{version}-{variant}
Examples:
✅ gpt-4-turbo-preview
✅ gpt-4
✅ gpt-3.5-turbo
Google (Gemini)
Production Models (Updated November 20, 2025)
| Model Name | Status | Release Date | Context | Cost (per 1M tokens) | Notes |
|---|---|---|---|---|---|
gemini-3 |
✅ LATEST | Nov 18, 2025 | 2M | $2.00 / $4.00 | Enhanced coding, Gemini Agent |
gemini-2.5-pro |
✅ Current | March 2025 | 2M | $1.25 / $5.00 | Pre-Gemini 3, proven stable |
gemini-1.5-pro |
✅ Legacy | 2024 | 2M | $1.25 / $5.00 | Massive context, older gen |
gemini-1.5-flash |
✅ Cost-Effective | 2024 | 1M | $0.075 / $0.30 | Fast and cheap |
gemini-1.5-flash-8b |
✅ Ultra-Fast | 2024 | 1M | $0.0375 / $0.15 | Cheapest option |
Deprecated/Removed Models:
- ❌
gemini-2.0-flash-exp- Replaced by Gemini 3 - ❌
gemini-pro-vision- Use Gemini 1.5+ instead
Notes:
- Gemini 3 released 2 days ago (Nov 18) with enhanced coding and reasoning
- All Gemini models support multimodal (text + images)
- Massive context windows (1-2M tokens)
- No tier restrictions - available to all users
- Extremely cost-effective, especially Flash models
Model Naming Convention
gemini-{variant}
Examples:
✅ gemini-pro
✅ gemini-pro-vision
🎯 Model Selection Guide
Decision Tree: Which Model Should I Use?
START
│
├─ Need vision/image analysis?
│ ├─ YES → Use: gpt-4o, gemini-1.5-pro, gemini-2.0-flash-exp
│ └─ NO → Continue
│
├─ Need massive context (>200K tokens)?
│ ├─ YES → Use: gemini-1.5-pro (2M), gemini-1.5-flash (1M)
│ └─ NO → Continue
│
├─ Need deep reasoning/thinking?
│ ├─ YES → Use: claude-opus-4-20250514 (if tier allows), o1-preview
│ └─ NO → Continue
│
├─ Budget priority?
│ ├─ HIGH (need cheapest) → Use: gemini-1.5-flash-8b, gpt-4o-mini, claude-3-haiku
│ ├─ MEDIUM (balance) → Use: claude-3-opus-20240229, gpt-4o, gemini-1.5-flash
│ └─ LOW (quality first) → Use: claude-opus-4, gpt-4o, claude-3-5-sonnet
│
├─ Speed priority?
│ ├─ CRITICAL → Use: gpt-4o-mini, gemini-1.5-flash-8b, claude-3-haiku
│ ├─ IMPORTANT → Use: gemini-1.5-flash, gpt-4o-mini
│ └─ NOT CRITICAL → Any model
│
└─ Task type?
├─ Translation → claude-3-opus-20240229 ✅ (verified working)
├─ Code generation → gpt-4o, claude-3-5-sonnet, gemini-2.0-flash
├─ Long documents → gemini-1.5-pro, claude-3-opus
├─ Chat/conversation → gpt-4o, claude-3-5-sonnet
└─ Data analysis → gemini-1.5-pro, gpt-4o, claude-3-opus
Model Performance Comparison
| Use Case | Best Choice | Alternative | Budget Option | Notes |
|---|---|---|---|---|
| Translation | claude-3-opus-20240229 |
gpt-4o |
gemini-1.5-flash |
Opus verified working |
| Code Generation | gpt-4o |
claude-3-5-sonnet |
gpt-4o-mini |
GPT-4o excels at code |
| Long Documents | gemini-1.5-pro |
claude-3-opus |
gemini-1.5-flash |
Gemini's huge context |
| Complex Reasoning | claude-opus-4 |
o1-preview |
claude-3-opus |
Thinking models best |
| Fast Responses | gemini-1.5-flash-8b |
gpt-4o-mini |
claude-3-haiku |
Milliseconds matter |
| Multimodal | gpt-4o |
gemini-2.0-flash |
gemini-1.5-flash |
Vision + text |
| Cost-Effective | gemini-1.5-flash-8b |
gpt-4o-mini |
claude-3-haiku |
Pennies per 1M tokens |
| Production (Reliable) | claude-3-opus-20240229 |
gpt-4o |
gemini-1.5-flash |
Battle-tested |
Cost Comparison (per 1M tokens)
| Model | Input Cost | Output Cost | Total (1M in + 1M out) | Relative Cost |
|---|---|---|---|---|
gemini-1.5-flash-8b |
$0.04 | $0.15 | $0.19 | 💰 Cheapest |
gemini-1.5-flash |
$0.08 | $0.30 | $0.38 | 💰💰 Very Cheap |
gpt-4o-mini |
$0.15 | $0.60 | $0.75 | 💰💰 Cheap |
claude-3-haiku |
$0.25 | $1.25 | $1.50 | 💰💰 Affordable |
gemini-2.0-flash-exp |
$1.00 | $2.00 | $3.00 | 💰💰💰 Budget |
gpt-4o |
$2.50 | $10.00 | $12.50 | 💰💰💰 Moderate |
claude-3-opus-20240229 |
$15.00 | $75.00 | $90.00 | 💰💰💰💰 Premium |
claude-opus-4 |
$15.00 | $75.00 | $90.00 | 💰💰💰💰 Premium |
Real-World Example (1,000 translations, 100 tokens each):
gemini-1.5-flash-8b: ~$0.02gpt-4o-mini: ~$0.08claude-3-opus: ~$9.00
Speed Comparison (Typical Response Times)
| Model | Simple Query | Complex Query | Long Document | Stream Latency |
|---|---|---|---|---|
gemini-1.5-flash-8b |
<100ms | 200-500ms | 500ms-1s | Ultra-low |
gpt-4o-mini |
100-200ms | 300-700ms | 700ms-1.5s | Very low |
claude-3-haiku |
150-300ms | 400-800ms | 800ms-2s | Low |
gemini-1.5-flash |
200-400ms | 500ms-1s | 1-2s | Low |
gpt-4o |
300-600ms | 800ms-2s | 2-4s | Medium |
claude-3-opus |
500ms-1s | 1-3s | 3-6s | Medium |
claude-opus-4 (thinking) |
1-3s | 5-15s | 15-30s | High (thinking) |
🔧 Centralized Model Configuration
Configuration File Location
Primary: apis/backend-api/src/app/ai/ai-models.config.ts
// apis/backend-api/src/app/ai/ai-models.config.ts
export const AI_MODELS_CONFIG = {
anthropic: {
default: 'claude-3-5-sonnet-latest',
translation: 'claude-3-5-sonnet-latest',
reasoning: 'claude-3-opus-latest',
fast: 'claude-3-haiku-latest',
},
openai: {
default: 'gpt-4-turbo-preview',
fast: 'gpt-3.5-turbo',
},
google: {
default: 'gemini-pro',
vision: 'gemini-pro-vision',
},
} as const;
export type AnthropicModel = typeof AI_MODELS_CONFIG.anthropic[keyof typeof AI_MODELS_CONFIG.anthropic];
export type OpenAIModel = typeof AI_MODELS_CONFIG.openai[keyof typeof AI_MODELS_CONFIG.openai];
export type GoogleModel = typeof AI_MODELS_CONFIG.google[keyof typeof AI_MODELS_CONFIG.google];
Usage Across Monorepo
// In any service
import { AI_MODELS_CONFIG } from './ai-models.config';
const model = AI_MODELS_CONFIG.anthropic.translation; // 'claude-3-5-sonnet-latest'
📍 Where Models Are Used
Backend API
File: apis/backend-api/src/app/ai/ai.service.ts
// Line ~93
const model = request.model || 'claude-3-5-sonnet-latest';
Usage:
- Translation requests
- General AI completions
- User-facing AI features
Translation Scripts
File: tools/scripts/translation/fully-automated-translator.js
// Line ~287
model: 'claude-3-5-sonnet-latest',
Usage:
- Automated translation system
- Batch translation operations
Future: Centralized Config (Recommended)
Create libs/libs-ai/ai-config/src/lib/models.config.ts:
export const AI_MODELS = {
translation: {
provider: 'anthropic',
model: 'claude-3-5-sonnet-latest',
},
codeGeneration: {
provider: 'openai',
model: 'gpt-4-turbo-preview',
},
imageAnalysis: {
provider: 'google',
model: 'gemini-pro-vision',
},
} as const;
🔍 How to Update Models Globally
Step 1: Check Current Usage
# Find all model references
grep -r "claude-3" apps/ tools/ libs/
grep -r "gpt-" apps/ tools/ libs/
grep -r "gemini" apps/ tools/ libs/
Step 2: Update Configuration
If using centralized config:
// Update one place
AI_MODELS_CONFIG.anthropic.translation = 'claude-3-5-sonnet-latest';
If NOT centralized (current state):
- Update
apis/backend-api/src/app/ai/ai.service.ts - Update
tools/scripts/translation/fully-automated-translator.js - Search for other usages
Step 3: Test Changes
# Restart backend
yarn serve:backend
# Test translation
yarn translate:fix
# Test AI endpoint
curl -H "Authorization: Bearer $SYSTEM_TOKEN" \ # Set from .env.local
-H "Content-Type: application/json" \
-X POST http://localhost:3000/api/ai/anthropic/messages \
-d '{"messages":[{"role":"user","content":"test"}],"model":"claude-3-5-sonnet-latest","maxTokens":5}'
🐛 Troubleshooting Model Issues
Error: "model: {model-name}" (404)
Symptoms:
Status: 404
Error: {"type":"not_found_error","message":"model: claude-3-5-sonnet-20241022"}
Diagnosis:
- Most Common: Your API key tier doesn't have access to this model
- Model version doesn't exist for any tier
- Model name is misspelled
- Provider deprecated the model
- Regional restrictions
Solution:
Step 1: Verify API Tier Access
# Test with a known-working model first
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: YOUR_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-3-opus-20240229","messages":[{"role":"user","content":"test"}],"max_tokens":10}'
# If this works, your key is valid but may have tier restrictions
Step 2: Try Alternative Models (in order of availability):
claude-3-opus-20240229(works for all tiers) ✅claude-3-sonnet-20240229(works for all tiers) ✅claude-3-haiku-20240307(works for all tiers) ✅claude-3-5-sonnet-20240620(requires Build tier+) ⚠️claude-3-5-sonnet-20241022(requires Scale tier+) ⚠️
Step 3: Update Configuration
// apis/backend-api/src/app/ai/ai-models.config.ts
anthropic: {
default: 'claude-3-opus-20240229', // Safe default
translation: 'claude-3-opus-20240229', // Verified working
}
Step 4: Check Account Tier
- Visit https://console.anthropic.com/settings/billing
- Verify your current tier (Free, Build, Scale)
- Check model availability for your tier
Error: "invalid x-api-key" (401)
Symptoms:
Status: 401
Error: {"type":"authentication_error","message":"invalid x-api-key"}
Diagnosis:
- API key is wrong/expired
- API key has extra whitespace
- API key not set in
.env.local
Solution:
- Check
.env.localhas correct key - Ensure no quotes or spaces
- Create fresh key if needed
Error: Rate Limit (429)
Symptoms:
Status: 429
Error: {"type":"rate_limit_error"}
Solution:
- Add retry logic with exponential backoff
- Reduce request frequency
- Upgrade API tier
📖 Provider Documentation Links
Anthropic
- Models: https://docs.anthropic.com/claude/docs/models-overview
- API Reference: https://docs.anthropic.com/claude/reference/messages_post
- Console: https://console.anthropic.com/
OpenAI
- Models: https://platform.openai.com/docs/models
- API Reference: https://platform.openai.com/docs/api-reference
- Console: https://platform.openai.com/
Google AI
- Models: https://ai.google.dev/models/gemini
- API Reference: https://ai.google.dev/api/rest
- Console: https://aistudio.google.com/
🔄 Model Version History
2025-11-20: Model Compatibility Resolution ✅
Changes:
- Discovered
-latestand Sonnet 3.5 models incompatible with API key - Switched to
claude-3-opus-20240229(stable, widely available) - Updated centralized config (
ai-models.config.ts) - Removed hardcoded model from translation script
- Verified working: Successfully translated "Poop-1" → "Caca 1"
Current Working Models:
- Anthropic:
claude-3-opus-20240229✅ TESTED & WORKING - OpenAI:
gpt-4-turbo-preview(not tested yet) - Google:
gemini-pro(not tested yet)
What Worked:
- Used dated version instead of
-latest - Rebuilt backend after config change (
nx build backend-api) - Removed model parameter from translation script
- Let backend use centralized default
Performance:
- Translation Time: 3.41s for 2 keys
- Cost: ~$0.0006 per translation (Opus pricing)
- Success Rate: 100% (2/2 keys translated)
✅ Best Practices
1. Always Use Dated Versions (Not "latest")
// ❌ BAD - Points to tier-restricted model
model: 'claude-3-5-sonnet-latest'
// ✅ GOOD - Explicit, verifiable, works everywhere
model: 'claude-3-opus-20240229'
// ⚠️ RISKY - May require higher tier
model: 'claude-3-5-sonnet-20241022'
Why Avoid -latest?
- Points to newest model (often tier-restricted)
- Breaks when new models are released
- Hard to debug ("latest changed yesterday")
- Different behavior for different API tiers
Why Use Dated Versions?
- Explicit and verifiable
- Consistent across all environments
- Easy to debug and document
- Predictable behavior
2. Centralize Configuration
// ✅ Good - one place to update
import { AI_MODELS_CONFIG } from './config';
const model = AI_MODELS_CONFIG.anthropic.translation;
// ❌ Bad - scattered hardcoded values
const model = 'claude-3-5-sonnet-latest'; // duplicated everywhere
3. Add Error Handling
// ✅ Good - catches model issues
try {
const response = await callAI(model);
} catch (error) {
if (error.status === 404) {
logger.error(`Model ${model} not found. Check models-information.md`);
}
}
4. Log Model Usage
// ✅ Good - helps debugging
logger.log(`Using model: ${model} (provider: ${provider})`);
🚀 Roadmap
Phase 1: Current State (✅ Complete)
- Document current models
- Fix invalid model references
Phase 2: Centralized Config (📋 Planned)
- Create
libs/libs-ai/ai-config - Migrate all services to use centralized config
- Add TypeScript types for type safety
Phase 3: Dynamic Model Selection (📋 Planned)
- Select model based on task complexity
- Automatic fallback to cheaper models
- Cost optimization
Phase 4: Monitoring (📋 Planned)
- Track model usage and costs
- Alert on model deprecation
- Performance metrics per model
📝 Change Log Template
When updating models, add entry here:
### YYYY-MM-DD: Brief Description
**Changes**:
- What changed
- Why it changed
- Impact
**Models Updated**:
- Provider: old-model → new-model
**Files Modified**:
- path/to/file1.ts
- path/to/file2.js
**Testing**:
- How was it tested
- Results
🆘 Need Help?
- Check Provider Docs: Links above
- Check This Doc: Model versions and common issues
- Check Backend Logs: Detailed error information
- Create Issue: Document new issues here
Last Updated: November 20, 2025 - 1:25 PM
Session ID: 11.25.1.1
Maintainer: AI Agents / Development Team