Skip to content

Commit c01e019

Browse files
octo-patchclaude
andcommitted
Fix model validation and empty choices handling in MiniMaxChatNode
- Validate `model` parameter against MiniMaxChatModel enum before forwarding to the API request, preventing invalid model strings. - Raise RuntimeError instead of returning a fallback string when the API returns empty choices, surfacing failures consistently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent acf25ee commit c01e019

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

comfy_api_nodes/nodes_minimax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ async def execute(
541541
ApiEndpoint(path="/proxy/minimax/chat/completions", method="POST"),
542542
response_model=MiniMaxChatResponse,
543543
data=MiniMaxChatRequest(
544-
model=model,
544+
model=MiniMaxChatModel(model).value,
545545
messages=messages,
546546
max_tokens=max_tokens,
547547
temperature=temperature,
@@ -550,7 +550,7 @@ async def execute(
550550

551551
if response.choices:
552552
return IO.NodeOutput(response.choices[0].message.content)
553-
return IO.NodeOutput("No response generated by MiniMax model.")
553+
raise RuntimeError("No response generated by MiniMax model.")
554554

555555

556556
class MinimaxExtension(ComfyExtension):

0 commit comments

Comments
 (0)