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 <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
This commit is contained in:
roomote[bot] 2025-12-08 10:16:43 -05:00 committed by GitHub
parent 1f7e1ee630
commit bea7626a9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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<string, ModelInfo>
export const BEDROCK_DEFAULT_TEMPERATURE = 0.3