File size: 1,707 Bytes
4998bdc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/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
|