Scripts for querying and testing OpenRouter models to check compatability with cyber-autoagent.
pip install requests
export OPENROUTER_API_KEY="sk-or-v1-..."List available OpenRouter models with parameter counts and context lengths.
# List free models (default)
python list_models.py
# List all models
python list_models.py --all
# Print only model IDs
python list_models.py --ids-only
# Save model IDs to file
python list_models.py --out models.txtQuery HuggingFace for model size and active parameters (useful for MoE models).
# Query models from models.txt
python hf_model_info.py
# Query models from custom file
python hf_model_info.py custom_models.txt
# Output as CSV
python hf_model_info.py --csvTest models for streaming + tool calling compatibility. A model passes if it meets all these criteria:
Streaming:
- Returns valid SSE response
- Stream ends with
[DONE]marker
Tool Calling:
- Emits
delta.tool_callswithfunction.name - Emits
function.arguments(possibly chunked) that reassembles into valid JSON finish_reasonornative_finish_reasonequals"tool_calls"
# Test models from file
python openrouter_tool_essentials_test.py --models-file models.txt
# Test specific models
python openrouter_tool_essentials_test.py --models "meta-llama/llama-3.3-70b-instruct:free"
# With retries and verbose output
python openrouter_tool_essentials_test.py --models-file models.txt --retries 2 -vOutputs JSON report to openrouter_tool_test_report.json.