Skip to content

Opencode cannot identify itself correctly with Anthropic models #13142

@bcardarella

Description

@bcardarella

Description

When asking Opencode what agent it is, it will incorrectly reply with Claude Code if an Anthropic model is being used. I presume this is because of the ANTHROPIC system prompt which specifically mentions Claude Code several times.

I'm guessing this is an artifact from when the Pro Max subs were supported?

I tried with Gemini Flash and using that model correctly identifies the agent as Opencode.

I haven't tried other models.

Why I care: I'm writing an install prompt for different agents, and I need the agent to correctly identify itself so it receives the agent specific install prompt.

Image Image

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions