feat(ai): add Together AI provider

This commit is contained in:
Mario Zechner
2026-05-08 16:44:18 +02:00
parent 9751057be9
commit 7adb8e7634
30 changed files with 714 additions and 56 deletions

View File

@@ -374,6 +374,28 @@ describe("totalTokens field", () => {
});
});
// =========================================================================
// Together AI
// =========================================================================
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI", () => {
it("Kimi-K2.6 - should return totalTokens equal to sum of components", { retry: 3, timeout: 60000 }, async () => {
const llm = getModel("together", "moonshotai/Kimi-K2.6");
console.log(`\nTogether AI / ${llm.id}:`);
const { first, second } = await testTotalTokensWithCache(llm, {
apiKey: process.env.TOGETHER_API_KEY,
reasoningEffort: "high",
});
logUsage("First request", first);
logUsage("Second request", second);
assertTotalTokensEqualsComponents(first);
assertTotalTokensEqualsComponents(second);
});
});
// =========================================================================
// z.ai
// =========================================================================