| # Test script to verify Claude Code proxy configuration | |
| echo "Testing CLIProxyAPI connection..." | |
| echo "" | |
| # Test 1: Check if server is accessible | |
| echo "1. Testing server endpoint..." | |
| curl -s http://localhost:7860/v1/models \ | |
| -H "Authorization: Bearer sk-admin-power-1" \ | |
| | head -20 | |
| echo "" | |
| echo "" | |
| echo "2. Testing with environment variables..." | |
| export ANTHROPIC_BASE_URL="http://localhost:7860" | |
| export ANTHROPIC_API_KEY="sk-admin-power-1" | |
| echo "Environment variables set:" | |
| echo " ANTHROPIC_BASE_URL=$ANTHROPIC_BASE_URL" | |
| echo " ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY" | |
| echo "" | |
| echo "β Configuration complete!" | |
| echo "" | |
| echo "To use Claude Code with the proxy:" | |
| echo " 1. The settings are already configured in ~/.claude/settings.json" | |
| echo " 2. Start a new Claude Code session: claude" | |
| echo " 3. Your requests will route through the proxy with model mappings:" | |
| echo " - Sonnet β kiro-claude-sonnet-4-5-agentic" | |
| echo " - Haiku β gemini-2.5-flash" | |
| echo " - Opus β gemini-claude-opus-4-5-thinking" | |