feat(provider): add free providers and enhance error handling

This commit is contained in:
decolua
2026-02-07 11:17:06 +07:00
parent 53a5f43993
commit bdbe8162e7
16 changed files with 285 additions and 120 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import { HTTP_STATUS } from "../config/constants.js";
/**
* BaseExecutor - Base class for provider executors
*/
@@ -55,7 +57,7 @@ export class BaseExecutor {
}
shouldRetry(status, urlIndex) {
return status === 429 && urlIndex + 1 < this.getFallbackCount();
return status === HTTP_STATUS.RATE_LIMITED && urlIndex + 1 < this.getFallbackCount();
}
// Override in subclass for provider-specific refresh