Merge pull request #4473 from apoorvumang/fix/inception-mercury-2-reasoning-off
fix(ai): mark inception/mercury-2 thinkingLevelMap.off as null
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
- Fixed Bedrock proxy handling to preserve `NO_PROXY` exclusions while using HTTP(S)-only proxy agents.
|
- Fixed Bedrock proxy handling to preserve `NO_PROXY` exclusions while using HTTP(S)-only proxy agents.
|
||||||
- Fixed GitHub Copilot Claude test coverage to use the current Claude Sonnet 4.6 model ID.
|
- Fixed GitHub Copilot Claude test coverage to use the current Claude Sonnet 4.6 model ID.
|
||||||
- Fixed OpenAI Responses requests for models that support disabling reasoning to send `reasoning.effort: "none"` when thinking is off.
|
- Fixed OpenAI Responses requests for models that support disabling reasoning to send `reasoning.effort: "none"` when thinking is off.
|
||||||
|
- Fixed Inception Mercury 2 tool calling on OpenRouter by marking `off` as unsupported in `thinkingLevelMap`, so the openai-completions provider omits the reasoning param instead of defaulting to `{reasoning:{effort:"none"}}` (which puts Mercury 2 in instant mode, disabling tool calls).
|
||||||
|
|
||||||
## [0.74.0] - 2026-05-07
|
## [0.74.0] - 2026-05-07
|
||||||
|
|
||||||
|
|||||||
@@ -240,6 +240,13 @@ function applyThinkingLevelMetadata(model: Model<any>): void {
|
|||||||
if (model.provider === "openai-codex" && model.id === "gpt-5.1-codex-mini") {
|
if (model.provider === "openai-codex" && model.id === "gpt-5.1-codex-mini") {
|
||||||
mergeThinkingLevelMap(model, { minimal: "medium", low: "medium", medium: "medium", high: "high" });
|
mergeThinkingLevelMap(model, { minimal: "medium", low: "medium", medium: "medium", high: "high" });
|
||||||
}
|
}
|
||||||
|
if (model.provider === "openrouter" && model.id.startsWith("inception/mercury-2")) {
|
||||||
|
// Mercury 2 in instant mode (reasoning_effort: "none") disables tool calling.
|
||||||
|
// Mark "off" unsupported so the openai-completions provider omits the reasoning param
|
||||||
|
// instead of defaulting to {reasoning:{effort:"none"}} (see openai-completions.ts:575).
|
||||||
|
// Pi's low/medium/high pass through verbatim; OpenRouter normalizes to Mercury's vocabulary.
|
||||||
|
mergeThinkingLevelMap(model, { off: null });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAnthropicMessagesCompat(provider: string, modelId: string): AnthropicMessagesCompat | undefined {
|
function getAnthropicMessagesCompat(provider: string, modelId: string): AnthropicMessagesCompat | undefined {
|
||||||
|
|||||||
@@ -9731,6 +9731,7 @@ export const MODELS = {
|
|||||||
provider: "openrouter",
|
provider: "openrouter",
|
||||||
baseUrl: "https://openrouter.ai/api/v1",
|
baseUrl: "https://openrouter.ai/api/v1",
|
||||||
reasoning: true,
|
reasoning: true,
|
||||||
|
thinkingLevelMap: {"off":null},
|
||||||
input: ["text"],
|
input: ["text"],
|
||||||
cost: {
|
cost: {
|
||||||
input: 0.25,
|
input: 0.25,
|
||||||
|
|||||||
Reference in New Issue
Block a user