Repository navigation
v0.23.0
Added
ClaudeAgentOptions.advisor_modelenables Claude Code's experimental server-side advisor tool (--advisorCLI 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 asProcessError. Consultations appear inAssistantMessagecontent asServerToolUseBlock(name'advisor') andServerToolResultBlockblocks, 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
endWhat'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