Skip to content

feat(llm): OpenAI provider native function calling #257

@bug-ops

Description

@bug-ops

Problem

OpenAI provider sends plain text. OpenAI API supports function calling with tool_calls.

Solution

  • Serialize ToolDef → OpenAI function format
  • Parse tool_calls from response choices
  • Return ChatResponse::ToolUse
  • supports_tool_use() returns true

Acceptance Criteria

  • Function definitions serialized in OpenAI API requests
  • tool_calls parsed from responses
  • Tool results sent back as function role 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