(ms: number)
| 83 | } |
| 84 | |
| 85 | function timeoutController(ms: number) { |
| 86 | const ctl = new AbortController() |
| 87 | const id = setTimeout(() => ctl.abort(new ProviderError.HeaderTimeoutError(ms)), ms) |
| 88 | return { |
| 89 | signal: ctl.signal, |
| 90 | clear: () => clearTimeout(id), |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | function googleVertexAnthropicBaseURL(project: string | undefined, location: string | undefined) { |
| 95 | if (!project) return |