mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: surface model content-filter refusals as a blocked chat error (#27118)
Blocked turns from a provider's content filter (Anthropic's `refusal` stop reason with empty content) previously ended silently on the "Thinking" spinner. They now end as a terminal `content_filter` error that renders as a "Response blocked" message with the provider's category and explanation. <img width="888" height="335" alt="image" src="https://github.com/user-attachments/assets/cef85a59-4091-4e62-9d45-1eb06748db48" /> Closes CODAGT-611 Follow-ups will involve implementing fallbacks, but this alone is pretty important
This commit is contained in:
Generated
+4
-2
@@ -17122,7 +17122,8 @@ const docTemplate = `{
|
||||
"config",
|
||||
"usage_limit",
|
||||
"missing_key",
|
||||
"provider_disabled"
|
||||
"provider_disabled",
|
||||
"content_filter"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatErrorKindGeneric",
|
||||
@@ -17134,7 +17135,8 @@ const docTemplate = `{
|
||||
"ChatErrorKindConfig",
|
||||
"ChatErrorKindUsageLimit",
|
||||
"ChatErrorKindMissingKey",
|
||||
"ChatErrorKindProviderDisabled"
|
||||
"ChatErrorKindProviderDisabled",
|
||||
"ChatErrorKindContentFilter"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatFileMetadata": {
|
||||
|
||||
Generated
+4
-2
@@ -15396,7 +15396,8 @@
|
||||
"config",
|
||||
"usage_limit",
|
||||
"missing_key",
|
||||
"provider_disabled"
|
||||
"provider_disabled",
|
||||
"content_filter"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ChatErrorKindGeneric",
|
||||
@@ -15408,7 +15409,8 @@
|
||||
"ChatErrorKindConfig",
|
||||
"ChatErrorKindUsageLimit",
|
||||
"ChatErrorKindMissingKey",
|
||||
"ChatErrorKindProviderDisabled"
|
||||
"ChatErrorKindProviderDisabled",
|
||||
"ChatErrorKindContentFilter"
|
||||
]
|
||||
},
|
||||
"codersdk.ChatFileMetadata": {
|
||||
|
||||
Reference in New Issue
Block a user