Spaces:
Running
Running
File size: 1,926 Bytes
14b666f |
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 |
"""
Test script to verify the updated Anthropic models work correctly.
This will help identify which models are actually available in your API.
"""
import sys
import os
# Add the current directory to Python path
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from fitness_agent import FitnessAgent
def test_model_availability():
"""Test which models are actually available"""
print("π§ͺ Testing Updated Anthropic Models")
print("=" * 60)
# Get all supported models
models = FitnessAgent.list_supported_models()
print("π Currently Configured Models:")
for name, full_id in models.items():
info = FitnessAgent.get_model_info(name)
print(f" β’ {name}: {full_id}")
print(f" {info}")
print()
print("π― Recommended Models (most likely to work):")
recommended = FitnessAgent.get_recommended_models()
for model in recommended:
print(f" β’ {model}: {models.get(model, 'Not found')}")
print("\n" + "=" * 60)
print("π‘ Notes:")
print(" β’ Claude-4 models may require special API access")
print(" β’ Claude-3.5-haiku is the new default (faster than claude-3-haiku)")
print(" β’ Deprecated models (claude-3-opus, claude-3-sonnet, claude-2.x) have been removed")
print(" β’ Always check Anthropic's documentation for the latest available models")
# Test creating an agent with the new default
print(f"\nπ Testing agent creation with new default (claude-3.5-haiku)...")
try:
agent = FitnessAgent()
print(f"β
Successfully created agent with model: {agent.model_name}")
print(f" Full model path: {agent.litellm_model}")
except Exception as e:
print(f"β Error creating agent: {str(e)}")
print(" Try using a different model or check your API key")
if __name__ == "__main__":
test_model_availability()
|