feat(generation): enforce prompt budget with whole article eviction (#47)

This commit is contained in:
2026-11-25 11:47:23 +01:00
parent 3983e49ff8
commit c5b8d0d4da
31 changed files with 882 additions and 296 deletions

View File

@ -56,7 +56,7 @@ func generationErrorCode(raw []byte) string {
}
for _, value := range values {
switch code := strings.ToLower(value); code {
case "invalid_api_key", "authentication_error", "permission_denied", "unauthenticated", "api_key_invalid", "api_key_expired", "model_not_found", "not_found_error", "not_found", "rate_limit_error", "rate_limit_exceeded", "resource_exhausted", "deadline_exceeded", "timeout_error":
case "context_length_exceeded", "max_tokens_exceeded", "input_too_long", "request_too_large", "invalid_api_key", "authentication_error", "permission_denied", "unauthenticated", "api_key_invalid", "api_key_expired", "model_not_found", "not_found_error", "not_found", "rate_limit_error", "rate_limit_exceeded", "resource_exhausted", "deadline_exceeded", "timeout_error":
return code
}
}