Skip to content

feat(pi-ai): refresh MiniMax-M3 video input and adaptive thinking - #1573

Open
octo-patch wants to merge 2 commits into
open-gsd:mainfrom
octo-patch:octo/20260730-parameter-refresh-recvqbOMBI0P1g
Open

feat(pi-ai): refresh MiniMax-M3 video input and adaptive thinking#1573
octo-patch wants to merge 2 commits into
open-gsd:mainfrom
octo-patch:octo/20260730-parameter-refresh-recvqbOMBI0P1g

Conversation

@octo-patch

@octo-patch octo-patch commented Jul 30, 2026

Copy link
Copy Markdown

Reason: MiniMax-M3 accepts video input and supports adaptive and disabled thinking modes, but the generated catalog capped its input at text and image and left it on the budget-based thinking default.

What changed

  • Add video to the Model.input modality union and to the catalog validation schema, so a model can declare video input support.
  • Update the model generator so MiniMax-M3 is emitted with ["text", "image", "video"] input and with forceAdaptiveThinking enabled to match its adaptive and disabled thinking modes.
  • Refresh the generated catalog (models.generated.ts and models.generated.json) for MiniMax-M3 on both the global and China providers.
  • Update the MiniMax-M3 regression test to assert the video input modality and the thinking compatibility flag.

MiniMax-M2.7 is intentionally left unchanged, as its parameters already match.

Checks

  • pnpm --filter @gsd/pi-ai exec vitest --run test/generated-models.test.ts — 14 passed (includes the catalog mirror and validation tests).
  • pnpm --filter @gsd/pi-ai exec tsc -p tsconfig.json --noEmit — clean.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

MiniMax-M3 accepts video inputs in addition to text and image, and exposes
adaptive and disabled thinking modes over its Anthropic-compatible endpoint.
Extend the model input modality vocabulary with "video", teach the generator
to emit the video modality and forceAdaptiveThinking for M3, and refresh the
generated catalog and its regression test to match.
@octo-patch
octo-patch requested a review from jeremymcs as a code owner July 30, 2026 05:19
@github-actions

Copy link
Copy Markdown
Contributor

🔴 PR Risk Report — CRITICAL

Files changed 6
Systems affected 2
Overall risk 🔴 CRITICAL

Affected Systems

Risk System
🔴 critical Agent Core
🟠 high AI Providers
File Breakdown
Risk File Systems
🔴 packages/pi-ai/src/types.ts Agent Core, AI Providers
packages/pi-ai/scripts/generate-models.ts (unclassified)
packages/pi-ai/src/model-catalog.ts (unclassified)
packages/pi-ai/src/models.generated.json (unclassified)
packages/pi-ai/src/models.generated.ts (unclassified)
packages/pi-ai/test/generated-models.test.ts (unclassified)

⚠️ 🔴 Critical risk — the following systems require verification before merge:

  • 🔴 Agent Core: check for race conditions and loop exit paths in the agent loop
  • 🟠 AI Providers: confirm provider API contract and error handling are intact

⛔ This PR should not be merged without executing this follow-up prompt.

Ask your coding agent to verify before submitting:

Review this PR for risks in: Agent Core, AI Providers. Verify:

1. check for race conditions and loop exit paths in the agent loop
2. confirm provider API contract and error handling are intact

Before modifying any code, assess the scope of this fix:

- Identify the root cause, not just the reported symptom.
- Search the codebase for other call sites, similar patterns, or duplicated logic that may share the same bug.
- List affected tests, documentation, and any downstream consumers that depend on the current behavior.
- Flag any changes that extend beyond the immediate file or function.

Report findings first. Then propose a fix scoped to the actual root cause, and wait for confirmation before applying changes outside the originally reported location.

💡 Have a Codex subscription? Get an independent second opinion: codex review --adversarial

@jeremymcs

Copy link
Copy Markdown
Member

@octo-patch please create a matching issue for PR

… video modality

The pi-ai Model.input type now includes "video", so deriving the
discovery provider defaults from the first catalog model no longer
assigns to the narrower ("text" | "image")[] declaration. Reference
Model<Api>["input"] directly so the default stays in sync with the
catalog type.
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.

2 participants