Skip to content

Add MiniMax as first-class LLM provider#41

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

Add MiniMax as first-class LLM provider#41
octo-patch wants to merge 1 commit into
emcf:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax as a first-class LLM provider alongside OpenAI, with full support for PDF VLM scraping, webpage analysis, agentic chunking, and structured extraction.

Changes

  • thepipe/provider.py (new): Provider abstraction with ProviderPreset dataclass, create_provider_client() factory, auto-detection via MINIMAX_API_KEY, temperature clamping, and think-tag stripping
  • thepipe/__init__.py: Added --provider and --api-key CLI flags for provider selection (backwards-compatible with existing --openai-* flags)
  • thepipe/chunker.py: chunk_agentic() now falls back from .beta.chat.completions.parse() to json_object mode when structured output is not supported (e.g. MiniMax)
  • README.md: MiniMax setup guide with Python/CLI examples, models table, and provider selection docs
  • tests/test_provider.py: 31 unit tests + 3 integration tests

MiniMax Models

Model Context Notes
MiniMax-M2.7 1M tokens Latest, recommended
MiniMax-M2.7-highspeed 1M tokens Faster inference
MiniMax-M2.5 204K tokens Previous generation
MiniMax-M2.5-highspeed 204K tokens Fast inference

Test plan

  • 31 unit tests passing (provider presets, factory, temperature clamping, think-tag stripping, agentic chunking fallback)
  • 3 integration tests passing with real MiniMax API (chat completion, JSON mode, PDF scraping)
  • Existing test suite unaffected (17 passing, 2 pre-existing failures unrelated to changes)

Add provider abstraction with MiniMax and OpenAI presets, including:
- thepipe/provider.py: ProviderPreset dataclass, create_provider_client()
  factory, auto-detection via MINIMAX_API_KEY, temperature clamping,
  think-tag stripping for MiniMax models
- CLI --provider/--api-key flags for easy provider switching
- chunk_agentic() fallback from .beta.chat.completions.parse() to
  json_object mode for MiniMax compatibility
- README documentation with MiniMax setup, models table, and CLI usage
- 31 unit tests + 3 integration tests covering presets, factory,
  temperature clamping, think-tag stripping, agentic chunking fallback

MiniMax models: M2.7, M2.7-highspeed, M2.5, M2.5-highspeed
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