Skip to content

feat: add MiniMax model support via OpenAI-compatible API#416

Open
JithendraNara wants to merge 2 commits intogoogle:mainfrom
JithendraNara:feat/minimax-provider
Open

feat: add MiniMax model support via OpenAI-compatible API#416
JithendraNara wants to merge 2 commits intogoogle:mainfrom
JithendraNara:feat/minimax-provider

Conversation

@JithendraNara
Copy link
Copy Markdown

@JithendraNara JithendraNara commented Mar 17, 2026

Summary

Add support for MiniMax models in LangExtract via the OpenAI-compatible API. Closes #417

Changes

  • Add MiniMax patterns (MiniMax-M2.5, etc.) to patterns.py
  • These work with the existing OpenAI provider since MiniMax offers OpenAI-compatible API

Usage

from langextract.factory import ModelConfig, create_model
import langextract as lx

config = ModelConfig(
    model_id="MiniMax-M2.5",
    provider_kwargs={
        "api_key": "your-minimax-api-key",
        "base_url": "https://api.minimax.io/v1"
    }
)
model = create_model(config)

result = lx.extract(
    text_or_documents=your_text,
    prompt_description=your_instructions,
    model=model
)

Testing

Tested successfully with MiniMax-M2.5 model via OpenAI-compatible API.

@google-cla
Copy link
Copy Markdown

google-cla bot commented Mar 17, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added the size/M Pull request with 150-600 lines changed label Mar 17, 2026
@github-actions
Copy link
Copy Markdown

No linked issues found. Please link an issue in your pull request description or title.

Per our Contributing Guidelines, all PRs must:

  • Reference an issue with one of:
    • Closing keywords: Fixes #123, Closes #123, Resolves #123 (auto-closes on merge in the same repository)
    • Reference keywords: Related to #123, Refs #123, Part of #123, See #123 (links without closing)
  • The linked issue should have 5+ 👍 reactions from unique users (excluding bots and the PR author)
  • Include discussion demonstrating the importance of the change

You can also use cross-repo references like owner/repo#123 or full URLs.

- Add MiniMax patterns (MiniMax-M2.5, etc.) to OpenAI provider
- Users can now use MiniMax with LangExtract by specifying:
  - model_id: 'MiniMax-M2.5' (or other MiniMax models)
  - provider_kwargs: { api_key, base_url: 'https://api.minimax.io/v1' }

Example:
    config = ModelConfig(
        model_id='MiniMax-M2.5',
        provider_kwargs={'api_key': '...', 'base_url': 'https://api.minimax.io/v1'}
    )
    model = create_model(config)
@JithendraNara JithendraNara force-pushed the feat/minimax-provider branch from 7bfb52a to a0b54d3 Compare March 17, 2026 19:45
@github-actions github-actions bot added size/L Pull request with 600-1000 lines changed and removed size/M Pull request with 150-600 lines changed labels Mar 17, 2026
@github-actions
Copy link
Copy Markdown

⚠️ Branch Update Required

Your branch is 1 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

@github-actions
Copy link
Copy Markdown

⚠️ Branch Update Required

Your branch is 6 commits behind main. Please update your branch to ensure CI checks run with the latest code:

git fetch origin main
git merge origin/main
git push

Note: Enable "Allow edits by maintainers" to allow automatic updates.

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

Labels

size/L Pull request with 600-1000 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add MiniMax model support

1 participant