mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: classify provider_disabled 503 as non-retryable (#25800)
Builds on top of https://github.com/coder/coder/pull/25794 Adds a new `provider_disabled` error classification in `chatd` with the corresponding plumbing to classify it as non-retryable. Also adds a story for how this particular error kind is displayed in the UI.
This commit is contained in:
+11
-9
@@ -1525,15 +1525,16 @@ type ChatStreamStatus struct {
|
||||
type ChatErrorKind string
|
||||
|
||||
const (
|
||||
ChatErrorKindGeneric ChatErrorKind = "generic"
|
||||
ChatErrorKindOverloaded ChatErrorKind = "overloaded"
|
||||
ChatErrorKindRateLimit ChatErrorKind = "rate_limit"
|
||||
ChatErrorKindTimeout ChatErrorKind = "timeout"
|
||||
ChatErrorKindStartupTimeout ChatErrorKind = "startup_timeout"
|
||||
ChatErrorKindAuth ChatErrorKind = "auth"
|
||||
ChatErrorKindConfig ChatErrorKind = "config"
|
||||
ChatErrorKindUsageLimit ChatErrorKind = "usage_limit"
|
||||
ChatErrorKindMissingKey ChatErrorKind = "missing_key"
|
||||
ChatErrorKindGeneric ChatErrorKind = "generic"
|
||||
ChatErrorKindOverloaded ChatErrorKind = "overloaded"
|
||||
ChatErrorKindRateLimit ChatErrorKind = "rate_limit"
|
||||
ChatErrorKindTimeout ChatErrorKind = "timeout"
|
||||
ChatErrorKindStartupTimeout ChatErrorKind = "startup_timeout"
|
||||
ChatErrorKindAuth ChatErrorKind = "auth"
|
||||
ChatErrorKindConfig ChatErrorKind = "config"
|
||||
ChatErrorKindUsageLimit ChatErrorKind = "usage_limit"
|
||||
ChatErrorKindMissingKey ChatErrorKind = "missing_key"
|
||||
ChatErrorKindProviderDisabled ChatErrorKind = "provider_disabled"
|
||||
)
|
||||
|
||||
// AllChatErrorKinds contains every ChatErrorKind value.
|
||||
@@ -1548,6 +1549,7 @@ var AllChatErrorKinds = []ChatErrorKind{
|
||||
ChatErrorKindConfig,
|
||||
ChatErrorKindUsageLimit,
|
||||
ChatErrorKindMissingKey,
|
||||
ChatErrorKindProviderDisabled,
|
||||
}
|
||||
|
||||
// ChatError represents a terminal chat error in persisted chat state or the
|
||||
|
||||
Reference in New Issue
Block a user