tasq/node_modules/agentic-flow/scripts/validate-providers.sh

51 lines
1.9 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Comprehensive provider validation script
set -e
echo "🧪 Agentic Flow - Provider Validation Suite"
echo "==========================================="
echo ""
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Test 1: Anthropic Provider
if [ -n "$ANTHROPIC_API_KEY" ]; then
echo -e "${BLUE}1⃣ Testing Anthropic Provider...${NC}"
npx agentic-flow@latest --agent coder --task "Write hello world" --provider anthropic 2>&1 | grep -q "Completed" && \
echo -e "${GREEN}✅ Anthropic provider works${NC}" || \
echo "❌ Anthropic provider failed"
else
echo "⏭️ Skipping Anthropic (no API key)"
fi
echo ""
# Test 2: OpenRouter Provider - Meta Llama
if [ -n "$OPENROUTER_API_KEY" ]; then
echo -e "${BLUE}2⃣ Testing OpenRouter - Meta Llama 3.1...${NC}"
npx agentic-flow@latest --agent coder --task "Write hello world" --model "meta-llama/llama-3.1-8b-instruct" 2>&1 | grep -q "Completed" && \
echo -e "${GREEN}✅ OpenRouter (Meta Llama) works${NC}" || \
echo "❌ OpenRouter (Meta Llama) failed"
echo ""
echo -e "${BLUE}3⃣ Testing OpenRouter - DeepSeek...${NC}"
npx agentic-flow@latest --agent coder --task "Write hello world" --model "deepseek/deepseek-chat" 2>&1 | grep -q "Completed" && \
echo -e "${GREEN}✅ OpenRouter (DeepSeek) works${NC}" || \
echo "❌ OpenRouter (DeepSeek) failed"
echo ""
echo -e "${BLUE}4⃣ Testing OpenRouter - Gemini Free...${NC}"
npx agentic-flow@latest --agent coder --task "Write hello world" --model "google/gemini-2.0-flash-exp:free" 2>&1 | grep -q "Completed" && \
echo -e "${GREEN}✅ OpenRouter (Gemini) works${NC}" || \
echo "❌ OpenRouter (Gemini) failed"
else
echo "⏭️ Skipping OpenRouter tests (no API key)"
fi
echo ""
echo -e "${GREEN}✅ Provider validation complete!${NC}"