fix: update maxTokenAllowed calculation to enforce upper limit

- Changed the maxTokenAllowed property to use Math.min for limiting the value to a maximum of 16384 tokens, ensuring better control over context window size.
This commit is contained in:
xKevIsDev
2025-07-17 23:26:19 +01:00
parent 8be9e6f622
commit e9e117c62f

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),
}));
}