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

@@ -325,6 +325,22 @@ describe("Context overflow error handling", () => {
}, 120000);
});
// =============================================================================
// Together AI
// Uses OpenAI-compatible Chat Completions API
// =============================================================================
describe.skipIf(!process.env.TOGETHER_API_KEY)("Together AI", () => {
it("Kimi-K2.6 - should detect overflow via isContextOverflow", async () => {
const model = getModel("together", "moonshotai/Kimi-K2.6");
const result = await testContextOverflow(model, process.env.TOGETHER_API_KEY!);
logResult(result);
expect(result.stopReason).toBe("error");
expect(isContextOverflow(result.response, model.contextWindow)).toBe(true);
}, 120000);
});
// =============================================================================
// z.ai
// Special case: may return explicit overflow error text, may accept overflow silently,