API rate limit 10→30 pyyntöä/min: pipeline tarvitsee ~12 vaihetta

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-07 07:35:26 +03:00
parent e0c8c3586b
commit 0bd5faa684

View File

@@ -1015,7 +1015,7 @@ async fn api_chat_completions(
*entry = (now, 1); // Uusi ikkuna *entry = (now, 1); // Uusi ikkuna
} else { } else {
entry.1 += 1; entry.1 += 1;
if entry.1 > 10 { if entry.1 > 30 {
return (axum::http::StatusCode::TOO_MANY_REQUESTS, "Liian monta pyyntöä — yritä minuutin kuluttua").into_response(); return (axum::http::StatusCode::TOO_MANY_REQUESTS, "Liian monta pyyntöä — yritä minuutin kuluttua").into_response();
} }
} }