fix(executors): strip params unsupported by provider/model

Add config-driven stripUnsupportedParams helper and use it in the default and github executors. Removes the deprecated temperature param for claude-opus-4 models (Anthropic 400) and consolidates github's scattered capability checks into one rule table.

Fixes #1748

Co-Authored-By: fjia <fjia@suntekcorps.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
fjia
2026-06-17 10:34:53 +07:00
committed by decolua
co-authored by Cursor
parent 87e5c1c6dd
commit 7ae9fff663
3 changed files with 36 additions and 38 deletions
+2
View File
@@ -6,6 +6,7 @@ import { buildClineHeaders } from "../shared/clineAuth.js";
import { getCachedClaudeHeaders } from "../utils/claudeHeaderCache.js";
import { proxyAwareFetch } from "../utils/proxyFetch.js";
import { injectReasoningContent } from "../utils/reasoningContentInjector.js";
import { stripUnsupportedParams } from "../translator/concerns/paramSupport.js";
// Auth header descriptors — derived from registry transport.auth, fallback to hardcoded defaults.
const BEARER = { combined: true, header: "Authorization", scheme: "bearer" };
@@ -88,6 +89,7 @@ export class DefaultExecutor extends BaseExecutor {
if (this.config.quirks?.dropClientMetadata) {
delete transformed.client_metadata;
}
stripUnsupportedParams(this.provider, model, transformed);
}
return injectReasoningContent({ provider: this.provider, model, body: transformed });