From bea7626a9dae4868c13356da31b1b0252c818c26 Mon Sep 17 00:00:00 2001 From: "roomote[bot]" <219738659+roomote[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:16:43 -0500 Subject: [PATCH] fix: add Kimi, MiniMax, and Qwen model configurations for Bedrock (#9905) * fix: add Kimi, MiniMax, and Qwen model configurations for Bedrock - Add moonshot.kimi-k2-thinking with 32K max tokens and 256K context - Add minimax.minimax-m2 with 16K max tokens and 230K context - Add qwen.qwen3-next-80b-a3b with 8K max tokens and 262K context - Add qwen.qwen3-coder-480b-a35b-v1:0 with 8K max tokens and 262K context All models configured with native tool support and appropriate pricing. Fixes #9902 * fix: add preserveReasoning flag and update Kimi K2 context window - Added preserveReasoning: true to moonshot.kimi-k2-thinking model - Added preserveReasoning: true to minimax.minimax-m2 model - Updated Kimi K2 context window from 256_000 to 262_144 These changes ensure: 1. Reasoning traces are properly preserved for both models 2. Roo correctly recognizes task completion 3. Tool calls within reasoning traces are handled appropriately 4. Context window matches AWS Console specification * fix: update MiniMax M2 context window to 196_608 for Bedrock Based on AWS CLI testing, the actual context window limit for MiniMax M2 on Bedrock is 196,608 tokens, not 230,000 as initially configured. * Update packages/types/src/providers/bedrock.ts Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> --------- Co-authored-by: Roo Code Co-authored-by: Matt Rubens Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> --- packages/types/src/providers/bedrock.ts | 46 +++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/packages/types/src/providers/bedrock.ts b/packages/types/src/providers/bedrock.ts index de44e71560..9eaa656ef1 100644 --- a/packages/types/src/providers/bedrock.ts +++ b/packages/types/src/providers/bedrock.ts @@ -439,6 +439,52 @@ export const bedrockModels = { inputPrice: 0.02, description: "Amazon Titan Text Embeddings V2", }, + "moonshot.kimi-k2-thinking": { + maxTokens: 32_000, + contextWindow: 262_144, + supportsImages: false, + supportsPromptCache: false, + supportsNativeTools: true, + defaultToolProtocol: "native", + preserveReasoning: true, + inputPrice: 0.6, + outputPrice: 2.5, + description: "Kimi K2 Thinking (1T parameter MoE model with 32B active parameters)", + }, + "minimax.minimax-m2": { + maxTokens: 16_384, + contextWindow: 196_608, + supportsImages: false, + supportsPromptCache: false, + supportsNativeTools: true, + defaultToolProtocol: "native", + preserveReasoning: true, + inputPrice: 0.3, + outputPrice: 1.2, + description: "MiniMax M2 (230B parameter MoE model with 10B active parameters)", + }, + "qwen.qwen3-next-80b-a3b": { + maxTokens: 8192, + contextWindow: 262_144, + supportsImages: false, + supportsPromptCache: false, + supportsNativeTools: true, + defaultToolProtocol: "native", + inputPrice: 0.15, + outputPrice: 1.2, + description: "Qwen3 Next 80B (MoE model with 3B active parameters)", + }, + "qwen.qwen3-coder-480b-a35b-v1:0": { + maxTokens: 8192, + contextWindow: 262_144, + supportsImages: false, + supportsPromptCache: false, + supportsNativeTools: true, + defaultToolProtocol: "native", + inputPrice: 0.45, + outputPrice: 1.8, + description: "Qwen3 Coder 480B (MoE model with 35B active parameters)", + }, } as const satisfies Record export const BEDROCK_DEFAULT_TEMPERATURE = 0.3