Skip to content

feat(llm): Claude provider native tool_use #256

@bug-ops

Description

@bug-ops

Problem

Claude provider sends plain text and parses bash blocks. Anthropic API supports native tool_use with structured responses.

Solution

  • Serialize ToolDef → Anthropic tool format in chat request
  • Parse tool_use content blocks from response
  • Return ChatResponse::ToolUse with id, name, input
  • supports_tool_use() returns true

Acceptance Criteria

  • Tool definitions serialized in Claude API requests
  • tool_use blocks parsed from responses
  • Tool results sent back as tool_result messages
  • Fallback to text mode when no tools provided

Part of #253 (M20)

Metadata

Metadata

Assignees

No one assigned

    Labels

    llmLLM provider related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions