Skip to content

core: Vertex Gemini rejects system updates after conversation starts #43431

Closed

Description

@major

Summary

Gemini 3.7 Flash through Vertex AI fails when OpenCode adds an instruction update to an existing conversation.

Environment

  • opencode version: opencode2 v0.0.0-dev-17653
  • OS: Fedora Linux 44, kernel 7.1.8-200.fc44.x86_64, x86_64
  • Terminal: xterm-256color, truecolor; terminal application unavailable
  • Shell: /bin/zsh
  • Install/channel: Dev channel
  • Active plugins: Configured opencode-chatgpt-websearch

Reproduction

  1. Start an OpenCode session using Gemini 3.7 Flash through Vertex AI.
  2. Use the session until its instructions change or refresh.
  3. Continue the existing session after the update.

Expected Behavior

The session should continue with the updated instructions.

Actual Behavior

The session is interrupted and fails with:

'system messages are only supported at the beginning of the conversation' functionality not supported.

The failure appeared after:

Instructions updated: core/codemode, core/skill-guidance

Additional Context

The error occurred after an interrupted tool execution and restart.

Vertex Gemini appears to receive the chronological instruction update as a system message after conversation history has already started.

The issue was observed once, and no workaround was tested.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions