Skip to content

feat: Add MiniMax as LLM provider in playground and cost tracking#438

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

feat: Add MiniMax as LLM provider in playground and cost tracking#438
octo-patch wants to merge 1 commit into
Scale3-Labs:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

Adds MiniMax AI as the 6th direct LLM provider in Langtrace playground and observability platform. MiniMax provides an OpenAI-compatible API at https://api.minimax.io/v1.

Changes

API Route (app/api/chat/minimax/route.ts)

  • New chat endpoint using OpenAI SDK with MiniMax base URL
  • Temperature clamping to [0, 1]
  • Streaming support via OpenAIStream/StreamingTextResponse

Playground Integration

  • MiniMax models: M2.7, M2.7-highspeed, M2.5, M2.5-highspeed
  • MiniMaxSettings interface and MiniMaxChatInterface type
  • minimaxHandler() in chat-handlers
  • MiniMaxSettingsSheet component with temperature validation

Cost Tracking

  • MINIMAX_PRICING cost table for all 4 models
  • Vendor detection in cost calculation

Tests - 26 total (16 unit + 10 integration)

Test Plan

  • All 26 tests pass
  • Manual: Add MiniMax API key, select vendor in playground
  • Manual: Send chat message with M2.7, verify response
  • Manual: Enable streaming, verify streamed response

Add MiniMax AI as the 6th direct LLM provider in Langtrace playground
and observability platform. MiniMax provides an OpenAI-compatible API.

- Add /api/chat/minimax route using OpenAI SDK with MiniMax base URL
- Add MiniMax models (M2.7, M2.7-highspeed, M2.5, M2.5-highspeed)
- Add MiniMaxSettings interface and MiniMaxChatInterface types
- Add minimaxHandler in chat-handlers for playground integration
- Add MiniMaxSettingsSheet with temperature clamped to [0, 1]
- Add MINIMAX_PRICING cost table for all 4 models
- Add MiniMax to LLM_VENDORS, LLM_VENDOR_APIS, SUPPORTED_VENDORS
- Add MiniMax vendor badge/color/logo in vendor-metadata
- Add MiniMax to cost calculation in utils.ts
- Add 26 tests (16 unit + 10 integration) with vitest
- Update README supported integrations table
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