Skip to content

Console Go web_search_call 400: input[N].action missing required field query on replayed multi-query search #3071

Description

@justin-mc-lai

Client or integration

Codex CLI

Area

Provider adapter / Tools / MCP / web search

Summary

Using opencode-go/muse-spark-1.2-contributor on the native Responses route, a conversation that performed a multi-query web search 400s on every subsequent turn: input[N].action missing required field query (Console Go). Sibling of the queries missing-field bug (#930/#929): DeepSeek native Responses needs plural queries, Console Go's upstream validator needs singular query, and webSearchAction() only emitted queries for multi-query batches. The offending web_search_call item is replayed in the history of every request, so the thread is permanently poisoned until repaired.

Reproduction

  1. Run OpenCodex 2.37.0 with the opencode-go provider and opencode-go/muse-spark-1.2-contributor.
  2. In one Codex session, have the model perform a web search with more than one query so the bridge records {type:"web_search_call", action:{type:"search", queries:[...]}} (no singular query).
  3. Continue the conversation for another turn (the item is replayed at input[N]).
  4. Observe 400: Error from provider (Console Go): Upstream request failed: [invalid_request_error] input[N].actionmissing required fieldquery``.

Pre-fix repro via a direct replay: POST /v1/responses with {type:"web_search_call", action:{type:"search", queries:["a","b"]}} in input => 400 missing query; with singular query present => 200.

Version

2.37.0

Operating system

macOS (Darwin)

Provider and model

opencode-go / muse-spark-1.2-contributor

Logs or error output

{"model":"muse-spark-1.2-contributor","error":{"param":"input[240].action","type":"invalid_request_error","message":"Error from provider (Console Go): Upstream request failed: [invalid_request_error] `input[240].action` missing required field `query`"}}

Redacted configuration

{"providers":{"opencode-go":{"adapter":"openai-chat","baseUrl":"https://opencode.ai/zen/go/v1","defaultModel":"deepseek-v4-flash","models":["deepseek-v4-flash","muse-spark-1.2-contributor"]}}}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Fix proposal (PR #3069): webSearchAction() now always emits action.query (first query) alongside queries; backfillWebSearchQueries() heals previously recorded items in either missing direction.

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

    bugSomething isn't workingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions