fix(responses): strip search_content_types on web_search for Muse Spark (#2617) - #2621
Conversation
release: promote dev into main for v2.32.1
# Conflicts: # package.json
[WRONG BRANCH] merge dev into main for the v2.33.0 release
Muse Spark (muse-spark-1.2-contributor) only serves over the Responses API. Its gateway rejects search_content_types on a plain web_search tool (400) but accepts it on web_search_preview and accepts every other web_search field on both tool types (probed directly 2026-08-26). Only Muse is affected; Luna and DeepSeek are not. - Strip search_content_types from web_search for Muse only. - Route Muse to the same openai-responses default as gpt-5.6-luna.
…rk (#2617) Carries DevonGithub's change onto dev with the test it needs, minus an unrelated version bump. Three changes to what was submitted: - dropped the package.json 2.32.1-preview -> 2.33.0 bump. Versioning is the release train's, not a bug fix's. - added tests/muse-spark-web-search-compat.test.ts. This touches a shared adapter and the provider registry; without a test neither the model-scoped field removal nor the Responses wire default is protected. - updated the registry decision log, which still described the map as Luna-only after gaining a second entry. Falsified: removing the sanitizer call reddens the plain-web_search and nested additional_tools cases and nothing else.
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe change routes ChangesMuse Spark Responses compatibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant OpenCodeGo
participant OpenAIResponses
participant MuseSpark
OpenCodeGo->>OpenAIResponses: route muse-spark-1.2-contributor request
OpenAIResponses->>OpenAIResponses: remove search_content_types from web_search tools
OpenAIResponses->>MuseSpark: send sanitized Responses request
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3426644607
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (provider.supportsOpenAiWebSearchToolFields === false) { | ||
| outBody = stripOpenAiOnlyWebSearchFields(outBody); | ||
| } | ||
| outBody = stripMuseSparkUnsupportedWebSearchFields(outBody, parsed.modelId); |
There was a problem hiding this comment.
Scope the Muse rewrite to the OpenCode Go destination
When an operator routes muse-spark-1.2-contributor through any other noncanonical Responses provider or custom gateway, this call strips search_content_types solely because the model ID matches, silently downgrading the requested TextAndImage search even though only OpenCode Go was observed to reject the field. Pass the provider into the guard and restrict the rewrite to the normalized OpenCode Go destination (or an explicit provider capability); the test should also cover the same model on another provider.
AGENTS.md reference: src/AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
…rk (lidge-jun#2617) (lidge-jun#2621) * release: v2.32.1 * release: v2.33.0 * fix(responses): strip search_content_types on web_search for Muse Spark Muse Spark (muse-spark-1.2-contributor) only serves over the Responses API. Its gateway rejects search_content_types on a plain web_search tool (400) but accepts it on web_search_preview and accepts every other web_search field on both tool types (probed directly 2026-08-26). Only Muse is affected; Luna and DeepSeek are not. - Strip search_content_types from web_search for Muse only. - Route Muse to the same openai-responses default as gpt-5.6-luna. * fix(responses): strip search_content_types on web_search for Muse Spark (lidge-jun#2617) Carries DevonGithub's change onto dev with the test it needs, minus an unrelated version bump. Three changes to what was submitted: - dropped the package.json 2.32.1-preview -> 2.33.0 bump. Versioning is the release train's, not a bug fix's. - added tests/muse-spark-web-search-compat.test.ts. This touches a shared adapter and the provider registry; without a test neither the model-scoped field removal nor the Responses wire default is protected. - updated the registry decision log, which still described the map as Luna-only after gaining a second entry. Falsified: removing the sanitizer call reddens the plain-web_search and nested additional_tools cases and nothing else. --------- Co-authored-by: DevonGithub <DevonGithub@users.noreply.github.com>
…rk (lidge-jun#2617) (lidge-jun#2621) * release: v2.32.1 * release: v2.33.0 * fix(responses): strip search_content_types on web_search for Muse Spark Muse Spark (muse-spark-1.2-contributor) only serves over the Responses API. Its gateway rejects search_content_types on a plain web_search tool (400) but accepts it on web_search_preview and accepts every other web_search field on both tool types (probed directly 2026-08-26). Only Muse is affected; Luna and DeepSeek are not. - Strip search_content_types from web_search for Muse only. - Route Muse to the same openai-responses default as gpt-5.6-luna. * fix(responses): strip search_content_types on web_search for Muse Spark (lidge-jun#2617) Carries DevonGithub's change onto dev with the test it needs, minus an unrelated version bump. Three changes to what was submitted: - dropped the package.json 2.32.1-preview -> 2.33.0 bump. Versioning is the release train's, not a bug fix's. - added tests/muse-spark-web-search-compat.test.ts. This touches a shared adapter and the provider registry; without a test neither the model-scoped field removal nor the Responses wire default is protected. - updated the registry decision log, which still described the map as Luna-only after gaining a second entry. Falsified: removing the sanitizer call reddens the plain-web_search and nested additional_tools cases and nothing else. --------- Co-authored-by: DevonGithub <DevonGithub@users.noreply.github.com>
Summary
Carries #2617 by @DevonGithub onto
dev(the original targetsmain, which is maintainer-promotion-only), with a regression test and without an unrelated version bump.Muse Spark's Responses gateway 400s a plain
web_searchcarryingsearch_content_types, while accepting the same field onweb_search_previewand accepting a bareweb_search. The field is not ours: Codex emits it fromweb_search_tool_type: TextAndImage. This is the same incompatibility class Codex itself handles for Bedrock by selecting text-only search, so dropping exactly the refused field at the adapter boundary is a compatibility guard rather than a symptom patch — the tool type and every other accepted option survive, and other models on the same provider are untouched.What I changed from the submitted PR
package.json2.32.1-preview.20260825→2.33.0bump. Versioning belongs to the release train, not to a bug fix; that edit would have moved the release surface as a side effect of a web-search fix.tests/muse-spark-web-search-compat.test.ts. This touches a shared adapter and the provider registry, and shipped with no test, so neither the model-scoped field removal nor the new Responses wire default was protected.modelWireDefaultsas Luna-only after gaining a second entry. A decision log that no longer matches its own map is worse than none.Verification
Falsified: removing the sanitizer call reddens the plain-
web_searchand nestedadditional_toolscases and nothing else — theweb_search_preview, other-model, and registry assertions stay green, which is what pins the change as narrow rather than blanket.One claim I could not independently reproduce, stated plainly: the PR's live 200/400 matrix. The available account now receives
403 … requires explicit opt infor every Muse request, so the gateway's rejection could not be re-probed here. What is independently confirmed is the field's origin in Codex'shosted_spec.rsand the precedent of Codex switching Bedrock to text-only for the same reason. The change is safe regardless of that matrix: it is scoped to one exact model and removes one field the OpenAI-only sanitizer already treats as optional.Checklist
devCloses #2617.
Summary by CodeRabbit