📄 Source: find_models.php
<?php
$apiKey = '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';
$url = 'https://openrouter.ai/api/v1/chat/completions';
// Try these current model names
$modelsToTest = [
'google/gemini-2.0-flash-001',
'google/gemini-2.0-flash-lite-001',
'google/gemini-1.5-flash',
'google/gemini-1.5-pro',
'mistralai/mistral-7b-instruct-v0.3',
'mistralai/mistral-small-24b-instruct-2501',
'meta-llama/llama-3.2-3b-instruct',
'meta-llama/llama-3.1-8b-instruct',
'deepseek/deepseek-chat',
'microsoft/phi-3.5-mini-128k-instruct'
];
foreach ($modelsToTest as $model) {
$data = [
'model' => $model,
'messages' => [['role' => 'user', 'content' => 'Say OK']],
'max_tokens' => 10
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer ' . $apiKey
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode == 200) {
echo "✅ $model - WORKING\n";
} else {
echo "❌ $model - HTTP $httpCode\n";
}
}
?>
← Back