Skip to content

Gate Claude effort/adaptive-thinking by resolved model capability#37320

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-claude-engine-parameter-issue
Draft

Gate Claude effort/adaptive-thinking by resolved model capability#37320
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-claude-engine-parameter-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 6, 2026

daily-doc-updater and daily-function-namer were failing on turn 1 when the model_size experiment selected models that reject Claude effort / adaptive-thinking fields. This change makes Claude request shaping model-aware so unsupported params are not sent to incompatible models.

  • Claude engine: capability-aware request shaping

    • Added model-capability gating so effort and adaptive-thinking config are only emitted when the resolved Claude model supports them.
    • Prevents first-request 400 invalid_request_error from unsupported params while preserving current behavior for capable models.
  • Model resolution integration

    • Applied gating after resolved model selection (including model_size experiment outputs), so behavior matches the actual runtime model instead of static config assumptions.
  • Compatibility and scope

    • Keeps existing model-selection and fallback flow unchanged.
    • Targets only unsupported-parameter emission; no workflow semantic changes beyond avoiding immediate API rejection.
// simplified request-shaping logic
if (!supportsAdaptiveThinking(resolvedModel)) {
  delete request.effort;
  delete request.thinking?.type; // adaptive
}

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Claude engine to prevent invalid parameters for models Gate Claude effort/adaptive-thinking by resolved model capability Jun 6, 2026
Copilot AI requested a review from pelikhan June 6, 2026 14:45
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.

[aw-failures] Claude effort/adaptive-thinking 400 kills daily-doc-updater + daily-function-namer (P0)

2 participants