#!/bin/bash # Configuration CONFIG_FILE="/home/kek/CLIProxyAPIPlus/config.yaml" # Providers KIRO_MODEL="kiro-claude-sonnet-4-5-agentic" ANTIGRAVITY_MODEL="gemini-claude-sonnet-4-5-thinking" GEMINI_MODEL="gemini-2.5-pro" # Helper function to update config update_config() { local TARGET_MODEL="$1" local PROVIDER_NAME="$2" echo "Switching Claude Sonnet to $PROVIDER_NAME..." # Use sed to replace the 'to:' line for Sonnet mappings # We match the lines specifically to avoid breaking other mappings # 1. Update claude-3-5-sonnet-20241022 sed -i "s|to: \"kiro-claude-sonnet-4-5-agentic\"|to: \"$TARGET_MODEL\"|g" "$CONFIG_FILE" sed -i "s|to: \"gemini-claude-sonnet-4-5-thinking\"|to: \"$TARGET_MODEL\"|g" "$CONFIG_FILE" sed -i "s|to: \"gemini-2.5-pro\"|to: \"$TARGET_MODEL\"|g" "$CONFIG_FILE" echo "✅ Switched to $PROVIDER_NAME!" echo "You can now use proxy-claude immediately." } # Main logic case "$1" in kiro) update_config "$KIRO_MODEL" "Kiro (Power Key)" ;; antigravity) update_config "$ANTIGRAVITY_MODEL" "Antigravity (8 Keys)" ;; gemini) update_config "$GEMINI_MODEL" "Gemini Pro (5+ Keys)" ;; *) echo "Usage: ./switch-provider.sh [kiro|antigravity|gemini]" echo "" echo "Current Status:" grep -A 1 "claude-3-5-sonnet-20241022" "$CONFIG_FILE" | grep "to:" echo "" echo "Examples:" echo " ./switch-provider.sh kiro -> Switch to Kiro" echo " ./switch-provider.sh antigravity -> Switch to Antigravity" echo " ./switch-provider.sh gemini -> Switch to Gemini Pro" exit 1 ;; esac