Skip to content

Consider "refusal" in AiResponse.FinishReason #4902

@alex-dixon

Description

@alex-dixon

I see in the latest generated Anthropic PR (#4897) we parse "refusal" from the Anthropic API stop reason.

Currently this would be parsed into AiResponse.FinishReason as "unknown". Just wanted to mention in case it slips through the cracks.

export const FinishReason: Schema.Literal<[

As a side note, if refusals are ultimately surfaced as successful responses, the retry/model fallback behavior via AiPlan's while function seems unable provide input for what to do next when there is a refusal.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions