-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update MiniMax provider defaults for MiniMax-M3 #1032
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,17 +12,25 @@ describe("MinimaxProvider — base URL resolution (#285)", () => { | |
| } | ||
| }); | ||
|
|
||
| it("defaults to https://api.minimax.io/anthropic (not the legacy minimaxi.com host)", () => { | ||
| it("defaults to MiniMax's Anthropic-compatible base URL", () => { | ||
| delete process.env["MINIMAX_BASE_URL"]; | ||
| const provider = new MinimaxProvider("test-key", "MiniMax-M2.7", 800); | ||
| const provider = new MinimaxProvider("test-key", "MiniMax-M3", 800); | ||
| expect((provider as unknown as { baseUrl: string }).baseUrl).toBe( | ||
| "https://api.minimax.io/anthropic", | ||
| ); | ||
| }); | ||
|
|
||
| it("appends /v1/messages to MINIMAX_BASE_URL", () => { | ||
| process.env["MINIMAX_BASE_URL"] = "https://custom.example.com/anthropic/"; | ||
| const provider = new MinimaxProvider("test-key", "MiniMax-M3", 800); | ||
| expect((provider as unknown as { messagesUrl: () => string }).messagesUrl()).toBe( | ||
| "https://custom.example.com/anthropic/v1/messages", | ||
| ); | ||
|
Comment on lines
+23
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== file list =="
git ls-files 'src/providers/minimax.ts' 'test/minimax-provider.test.ts' 'test/crystallize.test.ts'
echo
echo "== relevant source outline =="
ast-grep outline src/providers/minimax.ts --view expanded || true
echo
echo "== relevant test outline =="
ast-grep outline test/minimax-provider.test.ts --view expanded || true
echo
echo "== source excerpt =="
sed -n '1,220p' src/providers/minimax.ts | cat -n
echo
echo "== test excerpt =="
sed -n '1,220p' test/minimax-provider.test.ts | cat -n
echo
echo "== search for /v1/messages and base URL handling =="
rg -n 'v1/messages|BASE_URL|messagesUrl|MINIMAX_BASE_URL' src testRepository: rohitg00/agentmemory Length of output: 10942 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== MiniMax docs and references =="
rg -n -C 2 'MINIMAX_BASE_URL|MiniMax|minimax' README.md docs src test .github || true
echo
echo "== nearby provider normalization patterns =="
sed -n '1,220p' src/providers/openai.ts | cat -n
echo
sed -n '1,240p' src/providers/_openai-shared.ts | cat -nRepository: rohitg00/agentmemory Length of output: 27509 Handle 🤖 Prompt for AI Agents |
||
| }); | ||
|
|
||
| it("honors MINIMAX_BASE_URL via getEnvVar (merged ~/.agentmemory/.env + process.env)", () => { | ||
| process.env["MINIMAX_BASE_URL"] = "https://custom.example.com/anthropic"; | ||
| const provider = new MinimaxProvider("test-key", "MiniMax-M2.7", 800); | ||
| const provider = new MinimaxProvider("test-key", "MiniMax-M3", 800); | ||
| expect((provider as unknown as { baseUrl: string }).baseUrl).toBe( | ||
| "https://custom.example.com/anthropic", | ||
| ); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Restore
MINIMAX_BASE_URLafter each test.These tests mutate the process-wide environment without restoring its previous value, so later tests can become order-dependent or inherit the custom URL. Snapshot and restore the variable in
afterEach(including the originally-undefined case).Also applies to: 24-25, 32-33
🤖 Prompt for AI Agents