Use Claude Code with ANY AI Model GPT, Gemini, DeepSeek
Автор: AyyazTech
Загружено: 2025-12-21
Просмотров: 69
Описание:
Use Claude Code with ANY AI model — GPT, Gemini, DeepSeek, or local models via Ollama. Switch models mid-session with one command. Automatic routing uses cheap models for background tasks. No Anthropic subscription required.
---
Timestamps
0:00 - Hook: Claude Code is locked... or is it?
0:21 - What we're building today
0:40 - What we're enabling (the benefits)
0:57 - Introducing Claude Code Router
1:00 - Installing Claude Code & Claude Code Router
1:54 - Getting OpenRouter API key
2:55 - Creating the config directory & file
3:34 - Config file explained (transformers, router settings)
4:35 - Launching CCR code
5:04 - Testing the connection
6:47 - Demo: Switching models mid-session
7:12 - Using GPT-4o instead of Claude
8:32 - The Gemini gotcha (OpenRouter fails)
9:12 - Why Gemini doesn't work via OpenRouter
9:41 - Getting FREE Gemini API key from AI Studio
10:44 - Adding Gemini as a second provider
11:27 - Restarting CCR with new config
11:42 - Testing Gemini (it works!)
12:52 - The lesson: Some models need direct API
13:08 - Automatic routing for cost savings
13:33 - Quick tips overview
13:38 - Tip 1: CCR UI (web interface)
15:36 - Tip 2: CCR model (interactive selector)
16:01 - Tip 3: CCR restart
16:09 - Tip 4: Monitor costs on OpenRouter
16:17 - Outro & final thoughts
---
Installation
Install Claude Code (native - no Node.js required)
curl -fsSL https://claude.ai/install.sh | bash
Install Claude Code Router
npm install -g @musistudio/claude-code-router
Config File (~/.claude-code-router/config.json)
{
"LOG": true,
"LOG_LEVEL": "info",
"Providers": [
{
"name": "openrouter",
"api_base_url": "https://openrouter.ai/api/v1/chat/com...",
"api_key": "YOUR_OPENROUTER_API_KEY",
"transformer": {
"use": ["openrouter", "tooluse"]
},
"models": ["anthropic/claude-sonnet-4", "openai/gpt-4o", "deepseek/deepseek-chat"]
},
{
"name": "gemini",
"api_base_url": "https://generativelanguage.googleapis...",
"api_key": "YOUR_GEMINI_API_KEY",
"transformer": {
"use": ["gemini"]
},
"models": ["gemini-2.5-flash", "gemini-2.5-pro"]
}
],
"Router": {
"default": "openrouter,anthropic/claude-sonnet-4",
"background": "openrouter,deepseek/deepseek-chat",
"think": "openrouter,anthropic/claude-sonnet-4"
}
}
Get FREE Gemini API key: https://aistudio.google.com → Get API Key
Commands
ccr code # Launch Claude Code through router
ccr ui # Web-based config editor
ccr model # Interactive model selector
ccr restart # Reload config
/model provider,model # Switch models mid-session (e.g., /model gemini,gemini-2.5-flash)
---
Resources
Claude Code Router: https://github.com/musistudio/claude-...
OpenRouter: https://openrouter.ai
OpenRouter Models: https://openrouter.ai/models
Google AI Studio (FREE Gemini API): https://aistudio.google.com
Gemini via OpenRouter Issue: https://github.com/musistudio/claude-...
Blog Article: https://ayyaztech.com/blog/use-claude...
---
Related Videos
Ollama: Run AI Models Locally for FREE: • Run AI Locally for Free | Ollama Tutorial ...
Whisper AI: Free Offline Transcription: • Whisper AI Tutorial | Free Offline Transcr...
n8n: Free Self-Hosted Automation: • Deploy n8n to Production | Run Automations...
---
Drop a comment with your model setup! Which models are you using?
#ClaudeCode #OpenRouter #AI #CodingWithAI #GPT #Gemini #DeepSeek #Ollama #Tutorial #AIDevelopment #CodingTutorial #FreeAI
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: