Skip to content

[Provider compatibility] OpenCode Go wire contract: missing x-opencode-session and unsanitized indexed_web_access #3378

Description

@lidge-jun

Provider

OpenCode Go (opencode-go)

What is the compatibility problem?

Two independently reported defects on the same provider, both caused by OpenCodex not modelling what the OpenCode Go endpoint requires on the wire. Each is closed individually and absorbed here:

Missing session header. The opencode-go registry row in src/providers/registry.ts defines no session-header behavior, and x-opencode-session appears nowhere under src/. Requests therefore arrive without the session identity the upstream expects.

Unsanitized web_search field. The Muse sanitizer in src/adapters/openai-responses.ts removes search_content_types but preserves indexed_web_access, which Muse Spark 1.3 rejects. The sanitizer knows this tool needs field-level filtering; it just does not filter this field.

Both are the same shape of bug: a provider-specific wire requirement that the adapter does not represent, so the request is well-formed for OpenAI and wrong for this upstream.

Expected behavior

  1. opencode-go requests carry a stable x-opencode-session value for the life of a session.
  2. The Muse sanitizer drops indexed_web_access alongside search_content_types, and the sanitizer's field list is expressed so that the next rejected field is a one-line addition rather than a new investigation.

Reproduction

Send any Codex request through an opencode-go provider and inspect the outbound headers for x-opencode-session. For the second defect, send a Codex web_search turn to Muse Spark 1.3 and observe the upstream rejection naming indexed_web_access.

Additional context

Absorbs #3344 and #3362. Credit for the original reports belongs to @colthreepv and @0disoft, who each supplied the upstream evidence that made these diagnosable.

Checks

  • I searched existing issues and documentation.
  • I removed secrets and personal data.

Activity

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 reports

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions