(error: unknown)
| 46 | export type GlobalCacheStrategy = 'tool_based' | 'system_prompt' | 'none' |
| 47 | |
| 48 | function getErrorMessage(error: unknown): string { |
| 49 | if (error instanceof APIError) { |
| 50 | const body = error.error as { error?: { message?: string } } | undefined |
| 51 | if (body?.error?.message) return body.error.message |
| 52 | } |
| 53 | return error instanceof Error ? error.message : String(error) |
| 54 | } |
| 55 | |
| 56 | type KnownGateway = |
| 57 | | 'litellm' |
no outgoing calls
no test coverage detected