fix(opencode): surface content-filter finish reason as visible error (#31745)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
a1dee8b273
commit
e2527db3c7
6 changed files with 110 additions and 0 deletions
|
|
@ -52,6 +52,9 @@ export const ContextOverflowError = NamedError.create("ContextOverflowError", {
|
|||
message: Schema.String,
|
||||
responseBody: Schema.optional(Schema.String),
|
||||
})
|
||||
export const ContentFilterError = NamedError.create("ContentFilterError", {
|
||||
message: Schema.String,
|
||||
})
|
||||
|
||||
export class OutputFormatText extends Schema.Class<OutputFormatText>("OutputFormatText")({
|
||||
type: Schema.Literal("text"),
|
||||
|
|
@ -388,6 +391,7 @@ const AssistantErrorSchema = Schema.Union([
|
|||
AbortedError.EffectSchema,
|
||||
StructuredOutputError.EffectSchema,
|
||||
ContextOverflowError.EffectSchema,
|
||||
ContentFilterError.EffectSchema,
|
||||
APIError.EffectSchema,
|
||||
]).annotate({ discriminator: "name" })
|
||||
type AssistantError = Schema.Schema.Type<typeof AssistantErrorSchema>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue