Skip to content

Add MiniMax Token Plan support - #9597

Closed
McoreD wants to merge 2 commits into
omacom:quattrofrom
McoreD:feat/minimax-token-plan
Closed

McoreD wants to merge 2 commits into
omacom:quattrofrom
McoreD:feat/minimax-token-plan

Conversation

@McoreD

@McoreD McoreD commented Sep 1, 2026 •

Copy link
Copy Markdown

Summary

  • add MiniMax Token Plan as a provider in the Agents panel
  • show the authoritative rolling 5-hour and weekly quota windows with reset times
  • discover credentials from MINIMAX_API_KEY, the official mmx auth login API-key/OAuth config, or OpenCode
  • honor the MiniMax region, OAuth resource URL, MINIMAX_BASE_URL, and MMX_CONFIG_DIR
  • ship MiniMax's official mmx CLI as a lazy mise wrapper for first-class mmx auth login, mmx auth status, mmx quota, and mmx agent setup workflows
  • expose MiniMax under Setup > AI > MiniMax with Login, Configure Agents, and Token Plan Quota actions
  • add an idempotent migration for existing installs and keep preinstall removal behavior symmetrical

Why

MiniMax Token Plan exposes the same two subscription windows the Agents panel already models for Claude and Codex. Its current quota endpoint returns remaining percentages and reset times for the general language/agent bucket. Keeping this in a standalone collector preserves the panel's provider-agnostic record contract.

The collector deliberately ignores modality rows such as video: MiniMax currently has a documented server inconsistency where a plan without a modality can report 100% remaining alongside a 0/0 allowance. The general bucket is the relevant coding-agent quota and avoids presenting that misleading state.

MiniMax's official CLI owns authentication, matching Omarchy's existing pattern of delegating provider login to Codex, Claude Code, and other upstream CLIs instead of creating another credential store.

Verification

  • test/shell.d/agent-usage-minimax-test.sh
  • bash test/shell.d/default-agent-test.sh
  • bash test/shell.d/menu-test.sh
  • ./test/cli
  • python3 -m py_compile bin/omarchy-agent-usage-minimax
  • git diff --check

The focused tests cover quota normalization, reset timestamps, API-key/OAuth/OpenCode credential discovery, saved-region handling, the display-ready record contract, new-install stubs, migration stubs, and preinstall removal.

The collector was also verified live with an OAuth session created by mmx auth login. It successfully read the current Token Plan's 5-hour and weekly windows and normalized their reset timestamps without exposing credential material.

References

@McoreD
McoreD force-pushed the feat/minimax-token-plan branch from 1f57d51 to 79dd774 Compare September 1, 2026 12:16
@dhh

dhh commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Thank you! The collector is brought in with your authorship in #14039, with a last-good-limits cache. The mmx install, the Setup menu entry, and the migration were left out.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants