burtenshaw's picture
burtenshaw HF Staff
Upload folder using huggingface_hub
ab1b163
raw
history blame contribute delete
707 Bytes
import asyncio
import os
from backend.openrouter import query_model
from backend.config import COUNCIL_MODELS
async def test_models():
print("Testing OpenRouter connection...")
print(f"API Key present: {'Yes' if os.getenv('OPENROUTER_API_KEY') else 'No'}")
messages = [{"role": "user", "content": "Say hello!"}]
for model in COUNCIL_MODELS:
print(f"\nTesting model: {model}")
response = await query_model(model, messages, timeout=30.0)
if response:
print("βœ… Success!")
print(f"Response: {response.get('content')[:50]}...")
else:
print("❌ Failed")
if __name__ == "__main__":
asyncio.run(test_models())