Skip to content

[Bug] OpenCode Go Responses rejects search_content_types on web_search #2442

Description

@novelKR

Client or integration

Codex App

Provider or upstream service

OpenCode Go

OpenCodex version

2.31.0; current dev has the same request transform.

Endpoint or capability

POST /v1/responses — hosted web_search

Current behaviour

OpenCodex forwards type: "web_search" while retaining search_content_types. OpenCode Go rejects the request before inference. Two different conversations failed 64 seconds apart; each had one upstream send, no recovery, and no reported usage.

Expected behaviour

The non-canonical Responses path should not send the invalid web_search + search_content_types combination. It should emit a provider-compatible tool shape.

Minimal redacted request or reproduction

# OpenCodex 2.31.0
# Provider: opencode-go-responses (openai-responses)
# Model: muse-spark-1.2-contributor
# Send a Codex App turn with hosted web search enabled.

Actual response or error

HTTP 400
[invalid_request_error] `tools[].search_content_types` is only supported for web_search_preview tools.

ocx-mt5saqqu-a: 944 ms
ocx-mt5sc46y-h: 514 ms

Upstream documentation

Suggested mapping or implementation notes

The current generic transform removes external_web_access and search_context_size, but not search_content_types. Add provider-aware normalization: remove the unsupported field or use an explicitly verified web_search_preview mapping.

Additional context and attachments

No prompts, credentials, request bodies, or host details are included.

Checks

  • I searched existing provider and compatibility issues.
  • The request and response were redacted.
  • The expected behaviour is based on an upstream specification or a concrete client requirement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    providerProvider adapters, OpenAI-compat presets, upstream API quirksprovider-compatibilityProvider compatibility reportstoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions