Skip to content

[Bug]: OpenCode Go Muse Spark 1.3 rejects Codex web_search indexed_web_access #3362

Description

@0disoft

Client or integration

Codex App

Provider or upstream service

OpenCode Go (opencode-go / Console Go)

OpenCodex version

2.41.0

Endpoint or capability

/v1/responses web search tool translation for opencode-go/muse-spark-1.3-contributor

Current behaviour

OpenCodex 2.41.0 correctly routes muse-spark-1.3-contributor through openai-responses, but a normal Codex App turn fails when the client-provided web_search tool includes indexed_web_access.

The OpenCode Go upstream rejects the request with HTTP 400:

[invalid_request_error] `tools[].indexed_web_access` is not supported for Responses web_search.

A text-only request through the same provider/model succeeds. Provider authentication, model discovery, and the base Responses route are healthy.

stripMuseSparkUnsupportedWebSearchFields() already removes search_content_types for Muse Spark 1.2 and 1.3, but does not remove indexed_web_access.

Expected behaviour

For the strict Muse Spark Responses models, OpenCodex should remove indexed_web_access from a plain web_search tool before forwarding the request to OpenCode Go, just as it already removes search_content_types.

The request should then complete normally through /zen/go/v1/responses while preserving the supported web search tool fields.

Minimal redacted request or reproduction

# Select opencode-go/muse-spark-1.3-contributor in Codex App and send any turn.
# Codex App 0.153.0-alpha.5 advertises web_search with indexed_web_access.

curl http://127.0.0.1:10100/v1/responses \
  -H 'Authorization: Bearer [REDACTED]' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "opencode-go/muse-spark-1.3-contributor",
    "input": [{
      "role": "user",
      "content": [{"type": "input_text", "text": "Reply with exactly OK."}]
    }],
    "tools": [{
      "type": "web_search",
      "indexed_web_access": true,
      "search_content_types": ["webpage"]
    }],
    "tool_choice": "auto",
    "reasoning": {"effort": "low"},
    "stream": true,
    "max_output_tokens": 64
  }'

Actual response or error

HTTP 400
Error from provider (Console Go): Upstream request failed: [invalid_request_error] `tools[].indexed_web_access` is not supported for Responses web_search.

OpenCodex request-history evidence:

provider: opencode-go
model: muse-spark-1.3-contributor
adapter: openai-responses
status: 400
closeReason: non_stream
errorCode: invalid_request_error
usageStatus: unreported

Control results:

Direct OpenCode Go /zen/go/v1/responses request without indexed_web_access: HTTP 200
OpenCodex text-only request: HTTP 200, closeReason=terminal
Locally patched OpenCodex request with the full Codex web_search shape: HTTP 200, closeReason=terminal, usageStatus=reported

Upstream documentation

Suggested mapping or implementation notes

Extend the existing Muse-only sanitizer in src/adapters/openai-responses.ts:

if (!Object.hasOwn(tool, "search_content_types") &&
    !Object.hasOwn(tool, "indexed_web_access")) return tool;

const {
  search_content_types: _droppedSearchContentTypes,
  indexed_web_access: _droppedIndexedWebAccess,
  ...rest
} = tool;

Apply the same rewrite to both top-level body.tools and nested additional_tools, matching the existing function's behavior.

This was locally validated against the exact failing provider/model and changed the result from HTTP 400 to HTTP 200.

Additional context and attachments

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. added
    providerProvider adapters, OpenAI-compat presets, upstream API quirks
    toolstool_calls, MCP, web-search / sidecar tools
    on Sep 3, 2026
  2. lidge-jun commented on Sep 3, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 67 / 80

    이 이슈는 유효한 신규 후속 결함이다. 현재 dev HEAD 1cc2ff22dfc42d2100e2330ff3d2ebe7dc2331db에서 opencode-go/muse-spark-1.3-contributor는 정상적으로 openai-responses 경로를 탄다. 하지만 Codex App 0.153.0-alpha.5가 평범한 web_search 도구에 indexed_web_access: true를 붙이면, OpenCodex가 그 필드를 그대로 OpenCode Go로 보낸다. OpenCode Go는 이 필드를 지원하지 않아 추론 전에 HTTP 400으로 전체 요청을 거절한다.

    현재 요청 변환 코드를 확인하면 입력 도구에 indexed_web_access, search_content_types, search_context_size가 함께 있을 때 기존 가드는 search_content_types만 지운다. 그래서 indexed_web_access가 남은 채 upstream으로 간다. 텍스트 요청과 해당 필드를 뺀 같은 요청은 성공한다는 보고와도 맞으며, 인증이나 모델 발견 문제가 아니라 도구 변환의 누락이다.

    이것은 #2442의 정확한 중복은 아니다. #2442는 Muse Spark 1.2에서 search_content_types 때문에 생긴 문제였고, 이번 이슈는 최신 Codex App이 추가한 indexed_web_access라는 다른 필드가 다시 400을 만드는 후속 문제다. #2442를 다시 여는 것보다 새 재현과 새 필드를 가진 #3362에 수정 기록을 남기는 편이 맞다.

    #3317은 Muse Spark 1.3 Contributor와 기존 search_content_types 가드를 등록한 작업이다. 모델 배선 자체가 틀린 것은 아니다. 다만 당시 가드가 알고 있던 거절 필드보다 Codex App의 도구 모양이 늘어났다. #3321은 직접 Meta Model API 프로바이더를 추가한 작업이므로 이 OpenCode Go 오류를 해결하지 않는다.

    수정 위치는 src/adapters/openai-responses.ts의 rewriteTools()가 맞다. plain web_search에서 search_content_types와 indexed_web_access를 함께 제거하고, search_context_size 같은 나머지 필드는 보존하면 된다. 이 함수는 최상위 body.tools와 중첩 additional_tools가 함께 사용하므로 공통 함수 한 곳을 고치면 된다. 다만 모델별 범위와 web_search_preview 적용 여부는 함부로 넓히면 안 된다.

    현재 tests/muse-spark-web-search-compat.test.ts는 기존 필드만 검사하므로 이 회귀를 잡지 못한다. Muse Spark 1.3의 최상위 도구와 중첩 additional_tools에서 두 거절 필드가 모두 없어지고 search_context_size는 남는지, 다른 모델은 indexed_web_access를 그대로 받는지 테스트해야 한다.

    라인 1969-1977 (src/adapters/openai-responses.ts) - 주석과 Set이 Muse 1.2·1.3의 search_content_types 거절만 설명해 이번 필드의 거절 근거가 빠져 있다.
    라인 1997-2001 (src/adapters/openai-responses.ts) - rewriteTools()가 search_content_types가 없으면 바로 반환하고 그 필드 하나만 제거해 indexed_web_access가 남는다.
    라인 2008-2026 (src/adapters/openai-responses.ts) - 최상위 도구와 중첩 additional_tools가 같은 변환 함수를 쓰므로 별도 수정이 아니라 공통 함수 수정이 필요하다.
    라인 2253 (src/adapters/openai-responses.ts) - 현재 가드는 모델 id 기준이라 새 필드를 추가하면 직접 meta-model에도 적용될 수 있다.
    라인 16-22 (tests/muse-spark-web-search-compat.test.ts) - 테스트 픽스처에 문제의 indexed_web_access가 없다.
    라인 95-119 (tests/muse-spark-web-search-compat.test.ts) - 최상위·중첩 테스트가 기존 필드만 검사하므로 새 필드 제거와 나머지 필드 보존을 잠그지 못한다.

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

    • 모델별 가드에 indexed_web_access를 추가할지
    • 현재 모델 id 범위를 유지해 직접 meta-model에도 적용할지, OpenCode Go 전용으로 좁힐지
    • web_search_preview는 별도 실측 전까지 그대로 둘지
    • #2442는 기존 수정 기록으로 유지하고 #3362를 후속 수정 이슈로 닫을지

    너의 추천
    #3362는 열어 두고 작은 독립 PR로 수정한다. stripMuseSparkUnsupportedWebSearchFields()가 plain web_search에서 search_content_types와 indexed_web_access를 함께 제거하도록 바꾸고, 최상위·중첩·다른 모델 격리 테스트를 추가한다. web_search_preview나 모든 Responses 프로바이더로 범위를 넓히지 말고, #3317과 #3321은 되돌리지 않는다.

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

  3. lidge-jun commented on Sep 3, 2026

    @lidge-jun
    Owner

    Closing in favor of #3378, which tracks both OpenCode Go wire-contract defects together.

    Thank you @0disoft — your report on Muse Spark 1.3 rejecting indexed_web_access was accurate and reproducible.

    Verified. Confirmed: the Muse sanitizer at src/adapters/openai-responses.ts strips search_content_types but preserves indexed_web_access, which is exactly the field the upstream rejects.

    This is grouped with the other open opencode-go defect because both have the same cause — a provider-specific wire requirement the adapter does not represent — and fixing them in one pass avoids a second round of the same investigation. #3378 names this issue and credits you.

    Please follow #3378 for the fix.

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