feat(translator): drop temperature for all Claude models
Broaden strip rule from /claude-opus-4/i to /claude/i so temperature is removed for every Claude model, not just opus-4. Fixes Anthropic 400 on OpenAI-compatible routes. #1748
This commit is contained in:
committed by
decolua
parent
eceac9d7ae
commit
9173c29b66
@@ -4,8 +4,8 @@
|
|||||||
// Each rule: optional provider, regex match on model, list of params to drop.
|
// Each rule: optional provider, regex match on model, list of params to drop.
|
||||||
// A param is removed only when it is present (!== undefined).
|
// A param is removed only when it is present (!== undefined).
|
||||||
const STRIP_RULES = [
|
const STRIP_RULES = [
|
||||||
// claude-opus-4 series: temperature is deprecated (Anthropic 400). #1748
|
// All Claude models: temperature deprecated/rejected upstream (Anthropic 400). #1748
|
||||||
{ match: /claude-opus-4/i, drop: ["temperature"] },
|
{ match: /claude/i, drop: ["temperature"] },
|
||||||
// GitHub Copilot gpt-5.4: temperature unsupported.
|
// GitHub Copilot gpt-5.4: temperature unsupported.
|
||||||
{ provider: "github", match: /gpt-5\.4/i, drop: ["temperature"] },
|
{ provider: "github", match: /gpt-5\.4/i, drop: ["temperature"] },
|
||||||
// GitHub Copilot Claude (except opus/sonnet 4.6): thinking + reasoning_effort rejected. #713
|
// GitHub Copilot Claude (except opus/sonnet 4.6): thinking + reasoning_effort rejected. #713
|
||||||
|
|||||||
Reference in New Issue
Block a user