Skip to content

feat: add MiniMax provider integration#799

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

feat: add MiniMax provider integration#799
octo-patch wants to merge 1 commit intosupermemoryai:mainfrom
octo-patch:feature/add-minimax-provider

Conversation

@octo-patch
Copy link
Copy Markdown

Summary

  • Add @supermemory/tools/minimax integration module for MiniMax LLM provider
  • Provide withSupermemory() wrapper that wraps MiniMax OpenAI-compatible clients with persistent memory middleware
  • Export clampTemperature() utility for MiniMax temperature range constraint (0, 1.0]
  • Export MINIMAX_MODELS constant with MiniMax-M2.7 and MiniMax-M2.7-highspeed models
  • Re-export all OpenAI memory tools (searchMemories, addMemory, getProfile, etc.) for MiniMax clients
  • Add MiniMax to README framework integrations section

Changes

File Change
packages/tools/src/minimax/index.ts New MiniMax integration module
packages/tools/tsdown.config.ts Add minimax build entry
packages/tools/package.json Add ./minimax export
packages/tools/test/minimax/unit.test.ts 19 unit tests
packages/tools/test/minimax/integration.test.ts 3 integration tests (MiniMax API)
README.md Add MiniMax to framework integrations

Usage

import OpenAI from "openai"
import { withSupermemory, clampTemperature } from "@supermemory/tools/minimax"

const minimax = new OpenAI({
  apiKey: process.env.MINIMAX_API_KEY,
  baseURL: "https://api.minimax.io/v1",
})

const client = withSupermemory(minimax, "user-123", {
  mode: "full",
  addMemory: "always",
})

const response = await client.chat.completions.create({
  model: "MiniMax-M2.7",
  messages: [{ role: "user", content: "What do you know about me?" }],
  temperature: clampTemperature(0.7),
})

Test plan

  • 19 unit tests pass (model constants, temperature clamping, wrapper creation, tool re-exports)
  • 3 integration tests pass (MiniMax API chat completion with M2.7 and M2.7-highspeed)
  • Verify build with bun run build in packages/tools

API References

- Add @supermemory/tools/minimax export for MiniMax OpenAI-compatible API
- Include withSupermemory() wrapper, clampTemperature(), model constants
- Re-export all OpenAI memory tools for use with MiniMax clients
- Add MiniMax to README framework integrations section
- Add 19 unit tests + 3 integration tests
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