Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion mllm_tools/litellm.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,37 @@ def __call__(self, messages: List[Dict[str, Any]], metadata: Optional[Dict[str,
})
else:
raise ValueError("For GPT, only text and image inferencing are supported")
elif "minimax" in self.model_name.lower():
# MiniMax uses the OpenAI-compatible content schema and
# supports both image and video inputs.
if msg["type"] == "image":
formatted_messages.append({
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": data_url
}
}
]
})
elif msg["type"] == "video":
formatted_messages.append({
"role": "user",
"content": [
{
"type": "video_url",
"video_url": {
"url": data_url
}
}
]
})
else:
raise ValueError("For MiniMax, only text, image and video inferencing are supported")
else:
raise ValueError("Only support Gemini and Gpt for Multimodal capability now")
raise ValueError("Only support Gemini, Gpt and MiniMax for Multimodal capability now")

try:
# if it's openai o series model, set temperature to None and reasoning_effort to "medium"
Expand Down
4 changes: 3 additions & 1 deletion src/utils/allowed_models.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0",
"bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",
"bedrock/anthropic.claude-3-5-haiku-20241022-v1:0",
"bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0"
"bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0",
"minimax/MiniMax-M3",
"minimax/MiniMax-M2.7"
]
}