Skip to content

Fix MiniMax M2 nullable tool arguments - #1647

Open
Mr-Neutr0n wants to merge 1 commit into
ml-explore:mainfrom
Mr-Neutr0n:fix/minimax-m2-nullable-arguments
Open

Fix MiniMax M2 nullable tool arguments#1647
Mr-Neutr0n wants to merge 1 commit into
ml-explore:mainfrom
Mr-Neutr0n:fix/minimax-m2-nullable-arguments

Conversation

@Mr-Neutr0n

Copy link
Copy Markdown

Summary

  • preserve non-null MiniMax M2 tool arguments when their schema also allows null
  • continue mapping explicit null, none, and nil values to Python None
  • add regression coverage for nullable string and integer arguments

Why

The converter checked whether null appeared anywhere in a parameter's allowed types and returned None before inspecting the actual value. As a result, values such as "weather" and "10" were discarded for nullable parameters.

Tests

  • uv run python -m unittest tests.test_tool_parsing (6 passed)
  • uvx pre-commit run --files mlx_lm/tool_parsers/minimax_m2.py tests/test_tool_parsing.py (Black and isort passed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant