chore: remove any type
This commit is contained in:
parent
1bfb72edf3
commit
fa5bea1241
1 changed files with 4 additions and 1 deletions
|
|
@ -80,7 +80,10 @@ function isConnectionError(errorMessage: string): boolean {
|
|||
/**
|
||||
* Checks if the error indicates a context length issue (non-retryable)
|
||||
*/
|
||||
export function isContextLengthError(error: any): boolean {
|
||||
export function isContextLengthError(error: unknown): boolean {
|
||||
if (!(error instanceof Error)) {
|
||||
return false;
|
||||
}
|
||||
const errorMessage = error.message?.toLowerCase() || "";
|
||||
|
||||
if (errorMessage.includes("invalid_request_error")) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue