Skip to content

[FEATURE]: Add support for Anthropic's Advisor Tool (Beta) #21884

@baob

Description

@baob
  • I have verified this feature I'm about to request hasn't been suggested before.

Note: Issue #21789 covered this feature but was auto-closed by the compliance bot for formatting issues before any maintainer could review the actual feature request on its merits. This is a properly formatted resubmission to ensure the feature gets human consideration.

Problem:

When working on complex coding tasks in OpenCode, I often need Opus-level intelligence for planning and decision-making, but running Opus for the entire conversation is expensive. Anthropic recently released an "Advisor Tool" that solves this perfectly - it lets Sonnet consult Opus mid-conversation for strategic guidance, giving near-Opus quality at mostly-Sonnet cost.

What I want:

I'd like OpenCode to support Anthropic's Advisor Tool so I can:

  • Use Sonnet as my main model (keeps costs down, maintains access to all tools/files)
  • Have Sonnet automatically consult Opus when it needs strategic guidance
  • Get better results on complex tasks without paying for full Opus usage

How it works:

The advisor tool is a server-side Anthropic feature (similar to their bash or web_search tools). When enabled, Sonnet can call an "advisor" during generation. Anthropic routes that to Opus, gets advice, and Sonnet continues - all in one API request.

What needs to change:

  1. Add the beta header: anthropic-beta: advisor-tool-2026-03-01
  2. Support the advisor_20260301 tool type in the Anthropic provider
  3. Let users configure it in opencode.json:
{
  "model": "anthropic/claude-sonnet-4-6",
  "advisor": {
    "enabled": true,
    "model": "anthropic/claude-opus-4-6"
  }
}

Why this matters to me:

I built a workaround script that uses the advisor tool externally, but it runs outside OpenCode's context so the advisor can't see my codebase. Native support would let me get Opus-level guidance while keeping full access to my project files.

Reference:
https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool

Metadata

Metadata

Assignees

Labels

acpcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions