Skip to content

Add MiniMax as LLM provider for SVG generation#23

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

Add MiniMax as LLM provider for SVG generation#23
octo-patch wants to merge 1 commit intoResearAI:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Add MiniMax as a first-class LLM provider for SVG generation in AutoFigure-Edit. MiniMax offers OpenAI-compatible APIs with strong multimodal capabilities (MiniMax-M2.7, 204K context window).

Key Changes

  • MiniMax provider (--provider minimax): text + multimodal LLM calls via OpenAI SDK
    • Temperature clamping to MiniMax required (0, 1] range
    • Think-tag stripping for reasoning model responses
    • MINIMAX_API_KEY env var auto-detection
  • --figure_path flag: Provide a pre-generated figure to skip step 1 (image generation), enabling MiniMax for SVG-only workflows
  • Web UI: MiniMax option added to provider dropdown
  • Documentation: Usage examples in both README.md and README_ZH.md

Files Changed (7 files, ~600 additions)

File Change
autofigure2.py MiniMax provider implementation, figure_path support
server.py figure_path field in RunRequest
web/index.html MiniMax option in provider dropdown
README.md MiniMax docs + usage examples
README_ZH.md MiniMax docs + usage examples (Chinese)
tests/test_minimax_provider.py 24 tests (21 unit + 3 integration)
tests/init.py Test package init

Test Plan

  • 21 unit tests pass (temperature clamping, config, dispatch, think-tag stripping, figure_path, CLI args)
  • 3 integration tests pass with real MiniMax API
  • Python syntax validation passes

Add MiniMax (MiniMax-M2.7, 204K context) as a first-class LLM provider
using OpenAI-compatible API. MiniMax excels at multimodal SVG generation
and text understanding but does not support image generation.

Changes:
- Add MiniMax to PROVIDER_CONFIGS with base_url and default models
- Implement _call_minimax_text/multimodal with temperature clamping (0,1]
- Add think-tag stripping for MiniMax reasoning model responses
- Add --figure_path CLI flag to provide pre-generated figures (skip step 1)
- Add MINIMAX_API_KEY env var auto-detection
- Update web UI provider dropdown with MiniMax option
- Update README.md and README_ZH.md with MiniMax docs and usage examples
- Add 24 tests (21 unit + 3 integration)
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