()
| 22 | BackoffFactor float64 |
| 23 | Jitter bool |
| 24 | RetryableStatuses map[int]struct{} |
| 25 | ConditionalRetryStatuses map[int]struct{} |
| 26 | NonRetryableKeywords map[string]struct{} |
| 27 | } |
| 28 | |
| 29 | func DefaultRetryConfigPtr() *RetryConfig { |
| 30 | return &RetryConfig{ |
| 31 | MaxRetries: 3, |
| 32 | BaseDelay: time.Second, |
| 33 | MaxDelay: 60 * time.Second, |
| 34 | BackoffFactor: 2.0, |
| 35 | Jitter: true, |
| 36 | RetryableStatuses: map[int]struct{}{ |
| 37 | 429: {}, |
| 38 | }, |
| 39 | ConditionalRetryStatuses: map[int]struct{}{ |
| 40 | 503: {}, |
| 41 | 529: {}, |
| 42 | }, |
| 43 | NonRetryableKeywords: map[string]struct{}{ |
| 44 | "model_not_found": {}, |
| 45 | "invalid_request_error": {}, |
| 46 | "invalid_api_key": {}, |
| 47 | "authentication": {}, |
| 48 | "authorization": {}, |
| 49 | "not_found": {}, |
| 50 | "permission": {}, |
| 51 | }, |
no outgoing calls
no test coverage detected