Skip to content

v0.23.0

Choose a tag to compare

@ya-luotao ya-luotao released this 14 Jul 00:37
· 582 commits to main since this release

Added

  • ClaudeAgentOptions.advisor_model enables Claude Code's experimental server-side advisor tool (--advisor CLI flag): the main model consults a stronger advisor model at key decision points — before committing to an approach, when stuck on a recurring error, before declaring a task done. Accepts a model alias ('opus') or full model ID. Anthropic API only; the CLI validates the main-model/advisor pairing, so invalid pairings surface as ProcessError. Consultations appear in AssistantMessage content as ServerToolUseBlock (name 'advisor') and ServerToolResultBlock blocks, which the SDK already parsed. See examples/advisor_example.rb and the new Advisor Model docs section.

Usage

options = ClaudeAgentSDK::ClaudeAgentOptions.new(
  model: 'haiku',
  advisor_model: 'opus' # alias or full model ID, e.g. 'claude-opus-4-8'
)

ClaudeAgentSDK.query(prompt: 'Refactor this module', options: options) do |message|
  # advisor consultations surface as ServerToolUseBlock / ServerToolResultBlock
end

What's changed

  • #45 Add advisor_model option for the server-side advisor tool — @ya-luotao

Full Changelog: v0.22.0...v0.23.0


gem install claude-agent-sdk -v 0.23.0