Skip to content

feat: add MiniMax CLI harness (chat + TTS)#189

Open
octo-patch wants to merge 1 commit intoHKUDS:mainfrom
octo-patch:feature/add-minimax-provider
Open

feat: add MiniMax CLI harness (chat + TTS)#189
octo-patch wants to merge 1 commit intoHKUDS:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown
Contributor

Summary

  • Add minimax/agent-harness/ — a new CLI harness for the MiniMax AI platform
  • Implements chat via MiniMax's OpenAI-compatible API (models: MiniMax-M2.7, MiniMax-M2.7-highspeed)
  • Implements TTS via MiniMax's t2a_v2 SSE streaming endpoint (models: speech-2.8-hd, speech-2.8-turbo), with hex-encoded audio decoding
  • Uses MINIMAX_API_KEY environment variable (shared for both chat and TTS)
  • Registers entry in registry.json under category ai
  • Updates .gitignore to track minimax/agent-harness/

API Reference

Test Results

20 passed in 10.88s (16 unit + 4 e2e, all with real API)

Checklist

  • cli-anything-minimax entry point registered
  • Default base URL: https://api.minimax.io/v1
  • Chat models: MiniMax-M2.7 (default) and MiniMax-M2.7-highspeed
  • TTS models: speech-2.8-hd (default) and speech-2.8-turbo
  • MINIMAX_API_KEY supported via env, config file, and --api-key flag
  • Temperature defaults to 1.0 (MiniMax requirement: must be in (0.0, 1.0])
  • TTS audio decoded from hex (SSE stream)
  • SKILL.md included for agent discovery
  • 20 tests passing (unit + integration)

- Add MiniMax CLI harness with chat and TTS capabilities
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed chat models via OpenAI-compatible API
- Add TTS support with speech-2.8-hd and speech-2.8-turbo models (hex-encoded SSE stream)
- Add MINIMAX_API_KEY environment variable support
- Add 20 unit and integration tests (all passing)
- Register in registry.json under category 'ai'
@yuh-yang yuh-yang added the community-contrib-CLI Community-contributed CLI or harness label Apr 7, 2026
Copy link
Copy Markdown
Collaborator

@yuh-yang yuh-yang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR structure looks good to me, also the e2e test results. But was wondering if there are critical scenarios where such CLIs for calling another LLM API are important 🤔

@omerarslan0
Copy link
Copy Markdown
Collaborator

@octo-patch Went through the diff. Re @yuh-yang's scope question — AnyGen sets precedent for API-wrapping harnesses, and the TTS feature adds real value beyond a simple API client. Fits fine.

Blockers:

  1. tts command will crash — The Click parameter output shadows the module-level output() function. When tts() calls output(output_data, ...) on its last line, it tries to call the string "output.mp3" as a function → TypeError. Rename the parameter to output_path.

  2. .gitignore missing Step 5 — You have !/minimax/ (Step 4) and !/minimax/agent-harness/ (Step 6) but Step 5 is missing. Add /minimax/* and /minimax/.* in the Step 5 section.

Should fix:

  1. handle_error doesn't use functools.wraps — Manually copying __name__/__doc__ works by coincidence of decorator ordering but it's fragile. Use @functools.wraps(func).

  2. E2E tests silently fall back to mocks when no API key — This duplicates unit test coverage instead of testing real E2E. Use @pytest.mark.skipif(not API_KEY, ...) instead, so CI doesn't report false passes.

  3. registry.json contributor is ximi but PR author is @octo-patch — verify the GitHub handle matches.

Fix 1-2, and this is ready to merge.

@yuh-yang
Copy link
Copy Markdown
Collaborator

Thanks for the MiniMax harness. Two fixes before merge: the REPL should use shlex.split() so quoted chat/TTS prompts work, and models/voices need to respect global --json by returning structured arrays through the shared output helper.

One test cleanup too: test_get_api_key_priority() should mock config loading for the empty-env case so local config files do not affect the test.

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

Labels

community-contrib-CLI Community-contributed CLI or harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants