|
|
@@ -297,6 +297,28 @@ describe("ChutesHandler", () => {
|
|
|
)
|
|
|
})
|
|
|
|
|
|
+ it("should return moonshotai/Kimi-K2-Instruct-0905 model with correct configuration", () => {
|
|
|
+ const testModelId: ChutesModelId = "moonshotai/Kimi-K2-Instruct-0905"
|
|
|
+ const handlerWithModel = new ChutesHandler({
|
|
|
+ apiModelId: testModelId,
|
|
|
+ chutesApiKey: "test-chutes-api-key",
|
|
|
+ })
|
|
|
+ const model = handlerWithModel.getModel()
|
|
|
+ expect(model.id).toBe(testModelId)
|
|
|
+ expect(model.info).toEqual(
|
|
|
+ expect.objectContaining({
|
|
|
+ maxTokens: 32768,
|
|
|
+ contextWindow: 262144,
|
|
|
+ supportsImages: false,
|
|
|
+ supportsPromptCache: false,
|
|
|
+ inputPrice: 0.1999,
|
|
|
+ outputPrice: 0.8001,
|
|
|
+ description: "Moonshot AI Kimi K2 Instruct 0905 model with 256k context window.",
|
|
|
+ temperature: 0.5, // Default temperature for non-DeepSeek models
|
|
|
+ }),
|
|
|
+ )
|
|
|
+ })
|
|
|
+
|
|
|
it("completePrompt method should return text from Chutes API", async () => {
|
|
|
const expectedResponse = "This is a test response from Chutes"
|
|
|
mockCreate.mockResolvedValueOnce({ choices: [{ message: { content: expectedResponse } }] })
|