(fix: fable) surface model refusals in the TUI instead of silently stopping work - #3453
Open
sven2718 wants to merge 1 commit into
Open
(fix: fable) surface model refusals in the TUI instead of silently stopping work#3453sven2718 wants to merge 1 commit into
sven2718 wants to merge 1 commit into
Conversation
Anthropic stop_reason=refusal maps to fantasy's content-filter finish reason, but Crush had no case for it: the finish fell through to "unknown" and the TUI rendered a silently empty turn. Handle content-filter finishes in the agent loop with a clear title and explanation, and render a REFUSED banner in chat so the user can see what happened.
Contributor
Author
|
@taciturnaxolotl: poke for review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If I'm working in crush with fable and trigger fable's "this seems too dangerous to process" classifier, crush will just end the turn with no explanation. There's no text, no banner, no indication of why crush has stopped working on the task. It feels like a bug.
This PR adds a little banner so that in the case that the model API is explicitly telling us that it's not willing to process the request, we get a notification that this is a thing that has happened. It looks like this:
Given the way the patch is written, I believe the same banner should also show up if we were to trip openai's "dangerous content" classifier, but I've only tested it on fable's.
CONTRIBUTING.md.