| 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()) | |