Skip to content

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

Closed

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.

Activity

  1. github-actions commented on Aug 23, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  2. added
    providerProvider adapters, OpenAI-compat presets, upstream API quirks
    toolstool_calls, MCP, web-search / sidecar tools
    on Aug 23, 2026
  3. lidge-jun commented on Aug 23, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 62 / 80

    설명: 이 이슈는 코덱스 앱이 호스트 웹검색을 켠 채로 오픈코드 고 응답 길로 보내면, 위가 web_search 도구에 search_content_types 칸을 보고 400 으로 막아서, 그 턴이 추론 전에 끝난다고 한다. 지금 CURRENT dev HEAD 는 bf8bcfd3c 이다. 이번 시간에 origin/dev 는 그 자리에서 안 움직였다. 새 머지는 없다. 지난 시간 착지는 2403 사이드카 호출 취소 건강이다. package.json 은 2.27.0 이다. src/config.ts 는 3975줄이다. src/runtime 폴더는 지금 HEAD 에 없다. 작성자는 2.31.0 과 지금 HEAD 에 같은 변환이 있다고 적었다. 내가 HEAD 를 열어 보니 그 칸은 그대로 나간다.

    작성자가 본 일은 이렇다. 제공자는 opencode-go-responses, 모델은 muse-spark-1.2-contributor 다. 코덱스 앱이 호스트 웹검색을 켠다. 오픈코덱스는 도구 종류를 web_search 로 보내면서 search_content_types 를 남긴다. 오픈코드 고는 그 조합을 거절한다. 에러는 tools[].search_content_types 는 web_search_preview 도구에만 있다 이다. 서로 다른 대화 두 개가 64초 간격으로 같은 400 을 맞았다. 각 대화는 위 전송이 한 번뿐이고, 회복이 없고, 사용량도 없다. 기대는 비정규 응답 길이에서 그 잘못된 조합을 보내지 않는 것이다.

    지금 HEAD 의 src/adapters/openai-responses.ts 1506줄 OPENAI_ONLY_WEB_SEARCH_FIELDS 는 external_web_access 와 search_context_size 두 칸만 뺀다. search_content_types 는 그 목록에 없다. 1766줄은 제공자 능력 칸이 거짓일 때만 그 빼기를 돌린다. src/providers/registry.ts 1332줄 오픈코드 고 항목은 그 능력 칸을 안 적는다. 그래서 이 제공자는 미분류다. 미분류면 그 빼기 자체가 안 돈다. 두 칸도, search_content_types 도 그대로 올라간다. 작성자가 말한 일반 변환은 그 함수의 목록을 가리킨다. 이 제공자 길에는 그 함수가 아직 안 붙는다.

    같은 HEAD 의 src/adapters/xai-web-search.ts 58줄은 search_content_types 를 살리고, 이미지 값이 있으면 enable_image_search 로 옮긴다. tests/responses-routed-web-search-fields.test.ts 111줄 엑스에이아이 시험도 그 칸을 남긴다. 93줄 공식 오픈에이아이 키 길도 남긴다. 그래서 그 칸을 일반 두 칸 목록에 그냥 넣으면, 엑스에이아이가 받는 칸을 같이 지울 수 있다. 종류를 web_search_preview 로 바꾸는 것도, 오픈코드 고가 그 종류를 받는다는 산 증거가 있기 전에는 하지 않는 편이 맞다. 2422 는 엑스에이아이가 받는 웹검색 칸을 지워서 생긴 다른 길이다. 이 이슈만으로 2422 를 닫지 않는다.

    이건 요청 길을 넓히라는 이슈가 아니다. 콤보 빈 에스에스, 코덱스 웹소켓 크기, 가져오기 잎, 기록 명세 잎은 안 만진다. 고치는 풀 리퀘스트는 아직 없다. 착지 전에는 이 이슈를 닫지 않는다. 사용자 길이로는 호스트 웹검색 턴이 400 으로 추론 전에 죽는 구멍이라서 62. 카탈로그 팁은 Ox Alpha x-preview-f-free + deepseek-v4-flash-vision-exp. Cursor 정적 카탈로그는 opus-4-8-fast / opus-5-fast. 2334 CursorCredentialRouter 는 여전히 src/providers/cursor-pool.ts 모듈+테스트만 있고 어댑터에 연결되지 않았다. 2332 H2 는 discovery 전용. 2320 overflow + 2342 는 이미 dev. 2188 사이드카는 이미 dev. 2382 데스크톱 앱 재시작은 이미 dev. 2361 __omit__ 는 이미 HEAD 다. 2292 는 아직 연다. 지금 HEAD 의 남은 구멍은 그대로다. src/lib/bounded-body.ts 128줄은 이미 죽은 시그널에서 취소 없이 던진다. 222줄 본문 읽기는 취소한다. 2426 코덱스 웹소켓 나가는 크기 가드는 없다. 2431 빈 에스에스와 410 구멍은 그대로다. combo-stream-preflight.ts 는 HEAD 에 없다. 2434 가져오기 복사 import 도 그대로다. history-manifest.ts 는 HEAD 에 없다.

    src/adapters/openai-responses.ts 라인 1506 - 일반 빼기 목록은 두 칸뿐이다. search_content_types 는 없다
    src/adapters/openai-responses.ts 라인 1766 - 능력 칸이 거짓일 때만 그 빼기를 돌린다. 미분류는 안 돈다
    src/providers/registry.ts 라인 1332 - 오픈코드 고 항목은 그 능력 칸을 안 적는다. 이 길은 미분류다
    src/adapters/xai-web-search.ts 라인 58 - 엑스에이아이는 그 칸을 살리고 이미지 검색으로 옮긴다
    tests/responses-routed-web-search-fields.test.ts 라인 111 - 엑스에이아이 시험이 그 칸을 남긴다고 잠근다
    이슈 2422 - 엑스에이아이 웹검색 칸의 다른 길이다. 이 이슈만으로 닫지 않는다

    메인테이너의 판단이 필요한 지점

    • 오픈코드 고를 웹검색 칸 미지원으로 분류할지. 지금은 미분류라서 빼기 자체가 안 돈다
    • search_content_types 를 일반 두 칸 목록에 넣을지, 오픈코드 고만 추가로 뺄지. 엑스에이아이는 그 칸을 받는다
    • 종류를 web_search_preview 로 바꿀지. 산 증거 없이 바꾸지 않는 편이 맞다
    • 2426 웹소켓 크기와 2431 콤보 구멍과 2434 가져오기 잎을 이 필드 고침에 섞지 말 것

    너의 추천
    이슈는 열어 둔다. 고치는 PR 이 오면 그 PR 로 닫는다. 일반 두 칸 목록에 search_content_types 를 그냥 넣지 말 것. 오픈코드 고처럼 그 조합을 거절하는 게이트만 빼거나, 분류 뒤에 제공자별 빼기를 둔다. 종류를 preview 로 바꾸지 말 것. 2422 와 2426 과 2431 과 2434 는 닫지 않는다. 호출 길을 넓히지 말 것. 라벨은 그대로 둔다. 프리뷰 배포가 아니다.

    이 댓글은 grok-bot이 작성했습니다

  4. lidge-jun commented on Aug 26, 2026

    @lidge-jun
    Owner

    Closing as already implemented on dev.

    The adapter strips search_content_types for Muse Spark plain web_search at openai-responses.ts:1587, with positive and isolation coverage in tests/muse-spark-web-search-compat.test.ts:38 — the isolation case matters because the strip must not leak to other providers or to non-plain web-search shapes.

    Verified against dev at 37909c670. If you still see the rejection on a current build, please reopen with the request body and the exact model id — that would mean a different shape is reaching the wire than the one covered here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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