English | 简体中文
AI API Proxy Switch Skill is a Hermes Agent skill that allows users to dynamically switch between various advanced AI models provided by AI API Proxy, without modifying Hermes Agent's core configuration files.
- Dynamic Model Switching: Switch between different AI models without modifying configuration files
- Multi-Provider Support: Support for major AI providers like OpenAI, Anthropic, Google
- Unified Interface: Consistent calling interface for different models
- Cost Monitoring: Real-time token consumption monitoring via Clawsocket dashboard
- Easy Configuration: Simple setup through environment variables
# Clone repository
git clone https://github.com/G-Joker-G/ai-api-proxy-switch.git
# Copy to skills directory
cp -r ai-api-proxy-switch ~/.hermes/skills/software-development/- Register at api.clawsocket.com and get your API Key
- Set environment variables:
# Temporary setup
export OPENROUTER_API_KEY='your_cla..._key'
export OPENROUTER_BASE_URL='https://api.clawsocket.com/v1'
# Or permanent setup (add to ~/.bashrc or ~/.zshrc)
echo 'export OPENROUTER_API_KEY="your_cla..._key"' >> ~/.bashrc
echo 'export OPENROUTER_BASE_URL="https://api.clawsocket.com/v1"' >> ~/.bashrc
source ~/.bashrc# Use GPT-5.2 for complex reasoning
hermes chat --skills ai-api-proxy-switch --model gpt-5.2 --query "Your question"
# Use Claude-Sonnet for creative writing
hermes chat --skills ai-api-proxy-switch --model claude-sonnet-4-6 --query "Write a poem"
# Test connection
hermes chat --skills ai-api-proxy-switch --query "/test-connection"gpt-5.2- Latest GPT-5 model, strongest reasoning capabilitygpt-5-mini- Lightweight GPT-5 model, fast responsegpt-5.3-codex- Code-optimized model
claude-opus-4-6- Latest Claude Opus versionclaude-sonnet-4-6- Latest Claude Sonnet versionclaude-haiku-4-6- Latest Claude Haiku version
gemini-3.1-pro-preview-thinking- Gemini deep thinking modegemini-3.1-pro-preview- Gemini standard version
-
Error: Provider resolver returned an empty API key
- Solution: Ensure
OPENROUTER_API_KEYenvironment variable is set
- Solution: Ensure
-
Error: Model not available
- Solution: Check model name, run
/list-modelsto see available models
- Solution: Check model name, run
-
API call failed
- Solution: Check if API Key is valid, network connection is working
# Check environment variables
echo $OPENROUTER_API_KEY
# Test API connection
curl -X GET "https://api.clawsocket.com/v1/models" \
-H "Authorization: Bearer $OPENROUTER_API_KEY"| Task Type | Recommended Model | Description |
|---|---|---|
| Complex Reasoning | gpt-5.2 |
Strongest reasoning and analysis |
| Creative Writing | claude-sonnet-4-6 |
Excellent creative expression |
| Code Generation | gpt-5.3-codex |
Code-optimized |
| Fast Response | gpt-5-mini |
Fast response, low cost |
| Deep Analysis | gemini-3.1-pro-preview-thinking |
Deep thinking mode |
- Use lightweight models for simple tasks
- Regularly monitor token consumption
- Batch process related tasks
/list-models- View available model list/test-connection- Test API connection/show-config- Show current configuration
for model in "gpt-5.2" "claude-sonnet-4-6"; do
echo "=== Using $model ==="
hermes chat --skills ai-api-proxy-switch --model $model --query "Question"
doneIssues and Pull Requests are welcome!
MIT License