Skip to content

In-place replacement fails with Anthropic error when translating selected text #1541

Description

@fniessen

Please update gptel first -- errors are often fixed by the time they're reported.

  • I have updated gptel to the latest commit and tested that the issue still exists

Bug Description

I want to translate a script comment written in French into English.

  1. I add my translation instruction, and select the relevant text (including the instruction itself),
Image
  1. I choose the "in-place" replacement option, and then run the command.
Image

Despite this, I receive the error message...

Anthropic error: ((HTTP/2 400) invalid_request_error) This model does not support assistant message prefill. The conversation must end with a user message.

... shown below.

Image

Am I using the feature correctly? If so, any idea why is this error occurring?

Backend

None

Steps to Reproduce

  1. I add my translation instruction, and select the relevant text (including the instruction itself),
  2. I choose the "in-place" replacement option, and then run the command.

Additional Context

Not relevant, I think. But Emacs 31.1 on WSL.

Backtrace

Log Information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions