Skip to content

This model does not support assistant message prefill / Github Copilot with Opus 4.6 #13768

Description

@sbrunecker

Description

Working with Opus 4.6, opencode frequently stops with the message "This model does not support assistant message prefill. The conversation must end with a user message."

This is from the session export:

    {
      "info": {
        "role": "assistant",
        "time": {
          "created": 1771187182207,
          "completed": 1771187184086
        },
        "error": {
          "name": "APIError",
          "data": {
            "message": "This model does not support assistant message prefill. The conversation must end with a user message.",
            "statusCode": 400,
            "isRetryable": false,
            "responseHeaders": {
              "cache-control": "no-cache",
              "content-security-policy": "default-src 'none'; sandbox",
              "content-type": "text/plain; charset=utf-8",
              "date": "Sun, 15 Feb 2026 20:26:23 GMT",
              "strict-transport-security": "max-age=31536000",
              "transfer-encoding": "chunked",
              "x-content-type-options": "nosniff",
              "x-github-backend": "Kubernetes",
              "x-github-request-id": "EAAC:14EF1C:253883:31B9E3:69922BEC",
              "x-request-id": "00000-ce7fe972-c41c-43ec-b02b-3d2299740ab9"
            },
            "responseBody": "{\"error\":{\"message\":\"This model does not support assistant message prefill. The conversation must end with a user message.\",\"code\":\"invalid_request_body\"}}\n",
            "metadata": {
              "url": "https://api.githubcopilot.com/chat/completions"
            }
          }
        },
        "parentID": "msg_c62f2be7600192uMJUKpSsJ0qr",
        "modelID": "claude-opus-4.6",
        "providerID": "github-copilot",
        "mode": "build",
        "agent": "build",
        "path": {
          "cwd": "/home/stefan/projects/odoo18",
          "root": "/home/stefan/projects/odoo18"
        },
        "cost": 0,
        "tokens": {
          "input": 0,
          "output": 0,
          "reasoning": 0,
          "cache": {
            "read": 0,
            "write": 0
          }
        },
        "id": "msg_c62fb9a7f001Rl3UkWhXmVKLb7",
        "sessionID": "ses_39d0d418cffeIz9g6wg7wg1Caj"
      },
      "parts": []
    }

Plugins

none

OpenCode version

1.2.4

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

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

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