Vertical.ai / backend /scripts /test_openrouter.py
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Vertical.ai
1f7ead8 verified
Raw
History Blame Contribute Delete
750 Bytes
import os
import sys
# Add the parent directory to sys.path to ensure we can import 'app'
# Assuming this script is run from backend/scripts/ or backend/
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from app.config import config
from app.reasoning import reasoning_engine
def test_openrouter():
print(f"Testing OpenRouter with model: {config.LLM_MODEL}")
print(f"API Key present: {bool(config.OPENROUTER_API_KEY)}")
try:
response = reasoning_engine._chat([
{"role": "user", "content": "Hello, are you working?"}
])
print(f"Response: {response}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_openrouter()