MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / DefaultRetryConfigPtr

Function DefaultRetryConfigPtr

api/retry.go:24–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22 BackoffFactor float64
23 Jitter bool
24 RetryableStatuses map[int]struct{}
25 ConditionalRetryStatuses map[int]struct{}
26 NonRetryableKeywords map[string]struct{}
27}
28
29func 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 },

Callers 6

autoCompactMethod · 0.92
summarizeMethod · 0.92
BuildClientMethod · 0.92
ExecuteOneRequestMethod · 0.92
finalizeTimedOutRunMethod · 0.92
recallClientFactoryMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected