feat: add MiniMax model support with temperature clamping
Add MiniMax (M2.5 / M2.5-highspeed) as a tested model provider: - Add model-specific patch in utils.ts: clamp temperature to (0, 1] since MiniMax API rejects temperature=0, and remove unsupported parallel_tool_calls parameter - Add MiniMax to the tested models list on the Models documentation page - Add MiniMax configuration example alongside existing providers
This commit is contained in:
@@ -93,6 +93,15 @@ export function modelPatch(body: Record<string, any>) {
|
||||
body.reasoning_effort = 'minimal'
|
||||
}
|
||||
|
||||
if (modelName.startsWith('minimax')) {
|
||||
debug('Applying MiniMax patch: clamp temperature to (0, 1]')
|
||||
// MiniMax API rejects temperature = 0; clamp to a small positive value
|
||||
body.temperature = Math.max(body.temperature || 0, 0.01)
|
||||
if (body.temperature > 1) body.temperature = 1
|
||||
// MiniMax does not support parallel_tool_calls
|
||||
delete body.parallel_tool_calls
|
||||
}
|
||||
|
||||
return body
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user