|
|
@@ -82,7 +82,25 @@ describe("MiniMaxHandler", () => {
|
|
|
expect(model.info).toEqual(minimaxModels[testModelId])
|
|
|
expect(model.info.contextWindow).toBe(192_000)
|
|
|
expect(model.info.maxTokens).toBe(16_384)
|
|
|
- expect(model.info.supportsPromptCache).toBe(false)
|
|
|
+ expect(model.info.supportsPromptCache).toBe(true)
|
|
|
+ expect(model.info.cacheWritesPrice).toBe(0.375)
|
|
|
+ expect(model.info.cacheReadsPrice).toBe(0.03)
|
|
|
+ })
|
|
|
+
|
|
|
+ it("should return MiniMax-M2-Stable model with correct configuration", () => {
|
|
|
+ const testModelId: MinimaxModelId = "MiniMax-M2-Stable"
|
|
|
+ const handlerWithModel = new MiniMaxHandler({
|
|
|
+ apiModelId: testModelId,
|
|
|
+ minimaxApiKey: "test-minimax-api-key",
|
|
|
+ })
|
|
|
+ const model = handlerWithModel.getModel()
|
|
|
+ expect(model.id).toBe(testModelId)
|
|
|
+ expect(model.info).toEqual(minimaxModels[testModelId])
|
|
|
+ expect(model.info.contextWindow).toBe(192_000)
|
|
|
+ expect(model.info.maxTokens).toBe(16_384)
|
|
|
+ expect(model.info.supportsPromptCache).toBe(true)
|
|
|
+ expect(model.info.cacheWritesPrice).toBe(0.375)
|
|
|
+ expect(model.info.cacheReadsPrice).toBe(0.03)
|
|
|
})
|
|
|
})
|
|
|
|
|
|
@@ -269,9 +287,23 @@ describe("MiniMaxHandler", () => {
|
|
|
expect(model.maxTokens).toBe(16_384)
|
|
|
expect(model.contextWindow).toBe(192_000)
|
|
|
expect(model.supportsImages).toBe(false)
|
|
|
- expect(model.supportsPromptCache).toBe(false)
|
|
|
+ expect(model.supportsPromptCache).toBe(true)
|
|
|
+ expect(model.inputPrice).toBe(0.3)
|
|
|
+ expect(model.outputPrice).toBe(1.2)
|
|
|
+ expect(model.cacheWritesPrice).toBe(0.375)
|
|
|
+ expect(model.cacheReadsPrice).toBe(0.03)
|
|
|
+ })
|
|
|
+
|
|
|
+ it("should correctly configure MiniMax-M2-Stable model properties", () => {
|
|
|
+ const model = minimaxModels["MiniMax-M2-Stable"]
|
|
|
+ expect(model.maxTokens).toBe(16_384)
|
|
|
+ expect(model.contextWindow).toBe(192_000)
|
|
|
+ expect(model.supportsImages).toBe(false)
|
|
|
+ expect(model.supportsPromptCache).toBe(true)
|
|
|
expect(model.inputPrice).toBe(0.3)
|
|
|
expect(model.outputPrice).toBe(1.2)
|
|
|
+ expect(model.cacheWritesPrice).toBe(0.375)
|
|
|
+ expect(model.cacheReadsPrice).toBe(0.03)
|
|
|
})
|
|
|
})
|
|
|
})
|