Groq: Pull models list from endpoint

This commit is contained in:
Cohee
2025-07-09 20:25:20 +03:00
parent 5be2323e23
commit 86bac00a81
3 changed files with 47 additions and 30 deletions
@@ -1192,6 +1192,10 @@ router.post('/status', async function (request, statusResponse) {
apiUrl = 'https://text.pollinations.ai';
apiKey = 'NONE';
headers = {};
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.GROQ) {
apiUrl = API_GROQ;
apiKey = readSecret(request.user.directories, SECRET_KEYS.GROQ);
headers = {};
} else if (request.body.chat_completion_source === CHAT_COMPLETION_SOURCES.MAKERSUITE) {
apiKey = request.body.reverse_proxy ? request.body.proxy_password : readSecret(request.user.directories, SECRET_KEYS.MAKERSUITE);
apiUrl = trimTrailingSlash(request.body.reverse_proxy || API_MAKERSUITE);