ai icon indicating copy to clipboard operation
ai copied to clipboard

Assistant prefill not supported by Opus 4.6

Open copycatva opened this issue 9 months ago • 4 comments

Description

Assistant prefill seems to be disabled

AI SDK Version

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

copycatva avatar Feb 05 '26 18:02 copycatva

I don't think that's on the AI SDK for opus 4.6 right?

Looks like it's not supported by the model anyway

https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#migrating-away-from-prefilled-responses

psinha40898 avatar Feb 11 '26 01:02 psinha40898

been occasionally seeing these errors as well after tool calls, but we're not intentionally using prefill

nikitatome avatar Feb 22 '26 18:02 nikitatome

Identify issue type

{
  "evidence": [
    "The description only states that “Assistant prefill seems to be disabled” without reproduction steps, expected behavior, SDK version, or error details.",
    "A comment suggests the limitation is due to Claude Opus 4.6/model behavior rather than the AI SDK, linking Anthropic documentation about migrating away from prefilled responses.",
    "Another comment mentions occasional errors after tool calls, but does not provide enough detail to establish a concrete AI SDK defect."
  ],
  "rationale": "The issue is ambiguous and appears to concern a model capability/limitation rather than a clearly demonstrated AI SDK bug or a specific documentation/example/feature request.",
  "type": "none",
  "confidence": "medium"
}

lgrammel avatar Jul 02 '26 08:07 lgrammel

This is expected behavior from Anthropic: prefilled assistant responses are no longer supported for Claude Opus 4.6. Anthropic documents this API change and recommends migrating to direct instructions, structured outputs, or tool calling:

https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#migrating-away-from-prefilled-responses

n1ckoates avatar Sep 03 '26 22:09 n1ckoates