Merge pull request #1859 from xKevIsDev/groq-fix

fix: update Groq maxTokenAllowed calculation to enforce upper limit
This commit is contained in:
KevIsDev
2025-07-17 23:29:11 +01:00
committed by GitHub

View File

@@ -60,7 +60,7 @@ export default class GroqProvider extends BaseProvider {
name: m.id,
label: `${m.id} - context ${m.context_window ? Math.floor(m.context_window / 1000) + 'k' : 'N/A'} [ by ${m.owned_by}]`,
provider: this.name,
maxTokenAllowed: m.context_window || 8000,
maxTokenAllowed: Math.min(m.context_window || 8192, 16384),
}));
}