Add MiniMax provider support (#656 by @dannote)
- Add minimax to KnownProvider and Api types - Add MINIMAX_API_KEY to getEnvApiKey() - Generate MiniMax-M2 and MiniMax-M2.1 models - Add context overflow detection pattern - Add tests to all required test files - Update README and CHANGELOG with attribution Also fixes: - Bedrock duplicate toolResult ID when content has multiple blocks - Sandbox extension unused parameter lint warning
This commit is contained in:
@@ -325,6 +325,29 @@ describe("totalTokens field", () => {
|
||||
);
|
||||
});
|
||||
|
||||
// =========================================================================
|
||||
// MiniMax
|
||||
// =========================================================================
|
||||
|
||||
describe.skipIf(!process.env.MINIMAX_API_KEY)("MiniMax", () => {
|
||||
it(
|
||||
"MiniMax-M2.1 - should return totalTokens equal to sum of components",
|
||||
{ retry: 3, timeout: 60000 },
|
||||
async () => {
|
||||
const llm = getModel("minimax", "MiniMax-M2.1");
|
||||
|
||||
console.log(`\nMiniMax / ${llm.id}:`);
|
||||
const { first, second } = await testTotalTokensWithCache(llm, { apiKey: process.env.MINIMAX_API_KEY });
|
||||
|
||||
logUsage("First request", first);
|
||||
logUsage("Second request", second);
|
||||
|
||||
assertTotalTokensEqualsComponents(first);
|
||||
assertTotalTokensEqualsComponents(second);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
// =========================================================================
|
||||
// OpenRouter - Multiple backend providers
|
||||
// =========================================================================
|
||||
|
||||
Reference in New Issue
Block a user