Skip to content

Treat MiniMax M2 thinking as always on - #2238

Open
octo-patch wants to merge 2 commits into
Zipstack:mainfrom
octo-patch:octo/20260812-parameter-refresh-recvrNgVrvUya9
Open

Treat MiniMax M2 thinking as always on#2238
octo-patch wants to merge 2 commits into
Zipstack:mainfrom
octo-patch:octo/20260812-parameter-refresh-recvrNgVrvUya9

Conversation

@octo-patch

Copy link
Copy Markdown
Contributor

Reason: Align MiniMax-M2.7 requests with its always-on thinking contract.

  • Stop injecting an adaptive thinking payload for always-on M2-family models.
  • Accept an explicit enabled setting without forwarding it, while rejecting disabled or configurable thinking payloads.
  • Constrain the adapter schema and cover the always-on behavior with focused tests.

Checks:

  • uv run --project unstract/sdk1 --locked ruff check --ignore I001 unstract/sdk1/src/unstract/sdk1/adapters/base1.py unstract/sdk1/tests/test_branded_openai_adapters.py
  • uv run --project unstract/sdk1 --locked ruff format --check unstract/sdk1/src/unstract/sdk1/adapters/base1.py unstract/sdk1/tests/test_branded_openai_adapters.py
  • uv run --project unstract/sdk1 --locked pytest -q unstract/sdk1/tests/test_branded_openai_adapters.py -k 'minimax_m2 or minimax_schema_covers'
  • git diff --check

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR aligns MiniMax M2-family requests with their always-on thinking behavior.

  • Removes the generated thinking request parameter for M2 models, including after revalidation.
  • Accepts enable_thinking: true without forwarding it and rejects disabled or configurable thinking.
  • Aligns schema validation with supported casing and provider-prefixed model identifiers.
  • Adds focused runtime and JSON Schema coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
unstract/sdk1/src/unstract/sdk1/adapters/base1.py Centralizes MiniMax thinking normalization and removes the materialized null thinking field from M2 validation output.
unstract/sdk1/src/unstract/sdk1/adapters/llm1/static/minimax.json Constrains M2-family configurations to explicit enabled thinking across the supported model identifier forms.
unstract/sdk1/tests/test_branded_openai_adapters.py Covers omitted, explicitly enabled, configurable, boundary, casing, and provider-prefixed M2 behavior.

Reviews (2): Last reviewed commit: "Align MiniMax M2 thinking validation" | Re-trigger Greptile

Comment thread unstract/sdk1/src/unstract/sdk1/adapters/base1.py
Comment thread unstract/sdk1/src/unstract/sdk1/adapters/llm1/static/minimax.json Outdated
@sonarqubecloud

Copy link
Copy Markdown

@octo-patch

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Commit a235538 now omits the thinking parameter for MiniMax M2 requests and aligns schema matching with runtime handling. I ran 64 adapter tests plus Ruff format and lint checks.

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