Skip to content

fix(grok): strip unsupported reasoning parameters for Composer#4071

Closed
JD13703202 wants to merge 1 commit into
Wei-Shaw:mainfrom
JD13703202:fix/grok-composer-reasoning-effort
Closed

fix(grok): strip unsupported reasoning parameters for Composer#4071
JD13703202 wants to merge 1 commit into
Wei-Shaw:mainfrom
JD13703202:fix/grok-composer-reasoning-effort

Conversation

@JD13703202

Copy link
Copy Markdown

Summary

  • remove unsupported reasoning parameters from Grok Composer Responses requests
  • preserve reasoning configuration for Grok models that support it
  • add regression coverage for Composer aliases and provider-prefixed model names

Problem

The Anthropic Messages to Responses conversion adds a default reasoning.effort value. grok-composer-2.5-fast does not support this parameter and rejects the request:

400 invalid-argument:
Model grok-composer-2.5-fast does not support parameter reasoningEffort.

This affects /v1/messages requests converted to /v1/responses, including Claude Code Composer side requests.

Fix

Before forwarding a Grok Responses request, remove:

  • reasoning
  • reasoning_effort
  • reasoningEffort

when the effective upstream model is grok-composer-2.5-fast, composer-2.5, or a provider-prefixed equivalent.

Other Grok models retain their reasoning configuration.

Validation

  • added regression coverage for the canonical model, alias, and provider-prefixed form
  • added regression coverage confirming grok-4.5 preserves reasoning parameters
  • git diff --check passed
  • focused Go tests were not run locally because the installed Snap Go toolchain lacks the required cap_dac_override capability

@github-actions

github-actions Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@JD13703202

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Jul 11, 2026
ZJ-zhangcn added a commit to ZJ-zhangcn/sub2api that referenced this pull request Jul 12, 2026
Take upstream fix so grok-composer-2.5-fast / composer-2.5 drop reasoning.*
while grok-4.5 keeps reasoning effort.
ZJ-zhangcn added a commit to ZJ-zhangcn/sub2api that referenced this pull request Jul 12, 2026
…ecovery

Resolve conflicts by layer:
- keep personal billing_api quota probe + setGrokCLICommonHeaders
- take Wei-Shaw#4060 chat→responses bridge, cache identity, rate-limit persistence
- preserve Wei-Shaw#4071 Composer reasoning sanitize
- keep personal CLI identity assertions in tests
@JD13703202 JD13703202 closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant