@@ -15,7 +15,7 @@ import {
|
15 | 15 | import { isAnthropicBillingError, isApiKeyRateLimitError } from "./live-auth-keys.js"; |
16 | 16 | import { isModelNotFoundErrorMessage } from "./live-model-errors.js"; |
17 | 17 | |
18 | | -export type LiveProviderDriftReason = |
| 18 | +type LiveProviderDriftReason = |
19 | 19 | | "auth" |
20 | 20 | | "billing" |
21 | 21 | | "model-not-found" |
@@ -24,13 +24,13 @@ export type LiveProviderDriftReason =
|
24 | 24 | | "timeout"; |
25 | 25 | |
26 | 26 | /** A normalized reason for skipping or soft-failing live provider drift. */ |
27 | | -export type LiveProviderDriftDecision = { |
| 27 | +type LiveProviderDriftDecision = { |
28 | 28 | label: string; |
29 | 29 | reason: LiveProviderDriftReason; |
30 | 30 | }; |
31 | 31 | |
32 | 32 | /** Classifier options that control which live-provider drift reasons are allowed. */ |
33 | | -export type LiveProviderDriftOptions = { |
| 33 | +type LiveProviderDriftOptions = { |
34 | 34 | allowAuth?: boolean; |
35 | 35 | allowBilling?: boolean; |
36 | 36 | allowModelNotFound?: boolean; |
@@ -41,7 +41,7 @@ export type LiveProviderDriftOptions = {
|
41 | 41 | }; |
42 | 42 | |
43 | 43 | /** Converts arbitrary thrown values into text for provider drift matchers. */ |
44 | | -export function liveProviderErrorText(error: unknown): string { |
| 44 | +function liveProviderErrorText(error: unknown): string { |
45 | 45 | return error instanceof Error ? `${error.name}: ${error.message}` : String(error); |
46 | 46 | } |
47 | 47 | |
@@ -69,12 +69,12 @@ export function isLiveRateLimitDrift(error: unknown): boolean {
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** Returns whether an error is expected live timeout drift. */ |
72 | | -export function isLiveTimeoutDrift(error: unknown): boolean { |
| 72 | +function isLiveTimeoutDrift(error: unknown): boolean { |
73 | 73 | return isTimeoutErrorMessage(liveProviderErrorText(error)); |
74 | 74 | } |
75 | 75 | |
76 | 76 | /** Returns whether an error is expected live missing-model drift. */ |
77 | | -export function isLiveModelNotFoundDrift(error: unknown): boolean { |
| 77 | +function isLiveModelNotFoundDrift(error: unknown): boolean { |
78 | 78 | return isModelNotFoundErrorMessage(liveProviderErrorText(error)); |
79 | 79 | } |
80 | 80 | |
|