Skip to content

ci: trigger CI for PR #499 (add MiniMax provider)#514

Open
GenerQAQ wants to merge 4 commits intodevfrom
ci/minimax-provider
Open

ci: trigger CI for PR #499 (add MiniMax provider)#514
GenerQAQ wants to merge 4 commits intodevfrom
ci/minimax-provider

Conversation

@GenerQAQ
Copy link
Copy Markdown
Contributor

Temporary PR to trigger CI for fork PR #499. Will be closed after CI passes.

octopus and others added 3 commits March 26, 2026 19:22
Add MiniMax as a new LLM provider alongside OpenAI and Anthropic.
MiniMax uses an OpenAI-compatible API with temperature clamping to
(0.0, 1.0] and automatic stripping of think tags from reasoning
model responses.

Changes:
- Add minimax_sdk.py with minimax_complete, temperature clamping,
  and think-tag stripping
- Add get_minimax_async_client_instance in clients.py with default
  base URL https://api.minimax.io/v1
- Register minimax in FACTORIES mapping and update
  response_to_sendable_message to handle minimax SDK
- Add minimax to CoreConfig.llm_sdk Literal type
- Add 30 unit tests and 3 integration tests
- Update docs with MiniMax setup example and README mention
…eneric think-tag stripping

Removed the separate minimax_sdk.py, MiniMax provider enum, and dedicated
client singleton.  MiniMax is OpenAI-compatible, so users now configure it
via LLM_SDK=openai + LLM_BASE_URL=https://api.minimax.io/v1.

Added a generic _strip_think_tags() helper in openai_complete that benefits
all reasoning models (MiniMax, DeepSeek, QwQ, etc.) by stripping
<think>...</think> blocks from responses.
Address review feedback: stripping is now off by default and opt-in via
the LLM_STRIP_TAGS env var (comma-separated tag names). This preserves
raw LLM responses for downstream consumers while letting users who need
stripping (e.g. for reasoning models) enable it explicitly.

- Add llm_strip_tags: list[str] config field with comma-separated
  validator for env var support
- Rename _strip_think_tags to generic _strip_tags(text, tags)
- Apply stripping conditionally in openai_complete
- Update tests to verify default-off and configured-on behavior
- Document LLM_STRIP_TAGS env var in core settings docs
@GenerQAQ GenerQAQ requested a review from a team as a code owner March 30, 2026 13:38
The regex in _strip_tags consumes trailing whitespace after the closing
tag, so "before <think>...</think> after" becomes "before after" (single
space), not "before  after" (double space).
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.

2 participants