Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ All settings are manageable in the **Settings** page at `/settings` or via envir
| API Base URL | `ANTHROPIC_BASE_URL` | Custom endpoint for proxies or local Anthropic-compatible models |
| AI Model | Settings page only | Haiku 4.5 (default, fastest/cheapest), Sonnet 4.6, Opus 4.6 |
| OpenAI Key | `OPENAI_API_KEY` | Alternative provider — GPT-4.1 Mini/Nano/Full, o4-mini, o3 |
| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M2.7 (1M context), M2.5, M2.5-highspeed |
| MiniMax Key | `MINIMAX_API_KEY` | Alternative provider — M3 (default, 512K context), M2.7 (192K context), M2.7 Highspeed |
| MiniMax Base URL | `MINIMAX_BASE_URL` | Custom MiniMax API endpoint (default: `https://api.minimax.io/v1`) |
| Database | `DATABASE_URL` | SQLite file path (default: `file:./prisma/dev.db`) |

Expand Down Expand Up @@ -356,7 +356,7 @@ For Prisma command and workflow details, see:
| [SQLite](https://sqlite.org) | — | Local database — zero setup, includes FTS5 |
| [Tailwind CSS](https://tailwindcss.com) | v4 | Styling |
| [Anthropic SDK](https://docs.anthropic.com) | — | Vision, semantic tagging, categorization, search |
| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M2.7 1M context, M2.5) |
| [MiniMax](https://platform.minimaxi.com) | — | Alternative AI provider (M3 default, M2.7 192K context, M2.7 Highspeed) |
| [@xyflow/react](https://xyflow.com) | 12 | Interactive mindmap graph |
| [Framer Motion](https://www.framer.com/motion/) | 12 | Animations |
| [Radix UI](https://www.radix-ui.com) | — | Accessible UI primitives |
Expand Down
10 changes: 5 additions & 5 deletions __tests__/minimax-ai-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('MiniMaxAIClient', () => {
const client = new MiniMaxAIClient(mock)

const result = await client.createMessage({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
max_tokens: 100,
messages: [{ role: 'user', content: 'hi' }],
})
Expand All @@ -41,7 +41,7 @@ describe('MiniMaxAIClient', () => {
const client = new MiniMaxAIClient(mock)

const result = await client.createMessage({
model: 'MiniMax-M2.5',
model: 'MiniMax-M3',
max_tokens: 100,
messages: [{ role: 'user', content: 'test' }],
})
Expand All @@ -57,7 +57,7 @@ describe('MiniMaxAIClient', () => {
const client = new MiniMaxAIClient(mock)

const result = await client.createMessage({
model: 'MiniMax-M2.5',
model: 'MiniMax-M3',
max_tokens: 100,
messages: [{ role: 'user', content: 'test' }],
})
Expand Down Expand Up @@ -113,14 +113,14 @@ describe('MiniMaxAIClient', () => {
const client = new MiniMaxAIClient(mock)

await client.createMessage({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
max_tokens: 512,
messages: [{ role: 'user', content: 'test' }],
})

expect(createFn).toHaveBeenCalledWith(
expect.objectContaining({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
max_tokens: 512,
})
)
Expand Down
4 changes: 2 additions & 2 deletions __tests__/minimax-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('MiniMax integration - categorization pipeline', () => {
const client = new MiniMaxAIClient(createMockSDK(jsonResponse))

const result = await client.createMessage({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
max_tokens: 4096,
messages: [
{
Expand All @@ -53,7 +53,7 @@ describe('MiniMax integration - categorization pipeline', () => {
const client = new MiniMaxAIClient(createMockSDK(response))

const result = await client.createMessage({
model: 'MiniMax-M2.5',
model: 'MiniMax-M3',
max_tokens: 4096,
messages: [{ role: 'user', content: 'Categorize...' }],
})
Expand Down
6 changes: 3 additions & 3 deletions app/api/settings/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ const ALLOWED_OPENAI_MODELS = [
] as const

const ALLOWED_MINIMAX_MODELS = [
'MiniMax-M3',
'MiniMax-M2.7',
'MiniMax-M2.5',
'MiniMax-M2.5-highspeed',
'MiniMax-M2.7-highspeed',
] as const

export async function GET(): Promise<NextResponse> {
Expand Down Expand Up @@ -54,7 +54,7 @@ export async function GET(): Promise<NextResponse> {
openaiModel: openaiModel?.value ?? 'gpt-4.1-mini',
minimaxApiKey: maskKey(minimax?.value ?? null),
hasMinimaxKey: minimax !== null,
minimaxModel: minimaxModel?.value ?? 'MiniMax-M2.7',
minimaxModel: minimaxModel?.value ?? 'MiniMax-M3',
xOAuthClientId: maskKey(xClientId?.value ?? null),
xOAuthClientSecret: maskKey(xClientSecret?.value ?? null),
hasXOAuth: !!xClientId?.value,
Expand Down
2 changes: 1 addition & 1 deletion app/api/settings/test/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export async function POST(request: NextRequest): Promise<NextResponse> {

try {
await client.chat.completions.create({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
max_tokens: 5,
messages: [{ role: 'user', content: 'hi' }],
})
Expand Down
10 changes: 5 additions & 5 deletions app/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ const OPENAI_MODELS = [
]

const MINIMAX_MODELS = [
{ value: 'MiniMax-M2.7', label: 'M2.7', description: '1M Context, Latest' },
{ value: 'MiniMax-M2.5', label: 'M2.5', description: '204K Context' },
{ value: 'MiniMax-M2.5-highspeed', label: 'M2.5 Highspeed', description: '204K, Fastest' },
{ value: 'MiniMax-M3', label: 'M3', description: '512K Context, Latest' },
{ value: 'MiniMax-M2.7', label: 'M2.7', description: '192K Context' },
{ value: 'MiniMax-M2.7-highspeed', label: 'M2.7 Highspeed', description: 'Fast M2.7 Variant' },
]


Expand Down Expand Up @@ -678,10 +678,10 @@ function ApiKeySection({ onToast }: { onToast: (t: Toast) => void }) {
<ModelSelector
models={MINIMAX_MODELS}
settingKey="minimaxModel"
defaultValue="MiniMax-M2.7"
defaultValue="MiniMax-M3"
onToast={onToast}
/>
<p className="text-xs text-zinc-500 mt-1.5">MiniMax M2.7 supports 1M context window — great for large batch categorization</p>
<p className="text-xs text-zinc-500 mt-1.5">MiniMax M3 is the latest flagship with 512K context — M2.7 (1M context) remains available</p>
</div>
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion lib/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export async function getOpenAIModel(): Promise<string> {
export async function getMiniMaxModel(): Promise<string> {
if (_cachedMiniMaxModel && Date.now() < _miniMaxModelCacheExpiry) return _cachedMiniMaxModel
const setting = await prisma.setting.findUnique({ where: { key: 'minimaxModel' } })
_cachedMiniMaxModel = setting?.value ?? 'MiniMax-M2.7'
_cachedMiniMaxModel = setting?.value ?? 'MiniMax-M3'
_miniMaxModelCacheExpiry = Date.now() + CACHE_TTL
return _cachedMiniMaxModel
}
Expand Down
Loading