Skip to content

Filter 16: handle hosted-only tools in Chat Completions translation #297

Description

@leseb

Parent

Part of #35 (responses_to_chat_completions)

Context

The Responses API supports hosted tool types that have no Chat Completions equivalent:

  • code_interpreter — sandboxed Python execution
  • computer_use / computer_use_preview — screen automation
  • image_generation — DALL-E image generation
  • tool_search — tool discovery (gpt-5.4+)

When translating a Responses API request to Chat Completions format, the filter needs a strategy for these tools.

Decision needed

For each hosted-only tool type, choose one of:

  1. Synthesize — create a function tool equivalent (like web_search/file_search), proxy intercepts and dispatches
  2. Strip — remove from the tools array, log a warning
  3. Reject — return an error if the request contains unsupported tools for the target backend

The strategy may differ per tool type (e.g., strip image_generation but reject computer_use).

Reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    Status
    Next

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions