mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-22 05:00:41 +00:00
Add OpenCode Zen provider support
This commit is contained in:
parent
98b25baf4d
commit
97d0189eae
8 changed files with 529 additions and 1 deletions
19
packages/ai/test/zen.test.ts
Normal file
19
packages/ai/test/zen.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { MODELS } from "../src/models.generated.js";
|
||||
import { complete } from "../src/stream.js";
|
||||
import type { Model } from "../src/types.js";
|
||||
|
||||
describe("OpenCode Zen Models Smoke Test", () => {
|
||||
const zenModels = Object.values(MODELS.opencode);
|
||||
|
||||
zenModels.forEach((model) => {
|
||||
it(`${model.id}`, async () => {
|
||||
const response = await complete(model as Model<any>, {
|
||||
messages: [{ role: "user", content: "Say hello.", timestamp: Date.now() }],
|
||||
});
|
||||
|
||||
expect(response.content).toBeTruthy();
|
||||
expect(response.stopReason).toBe("stop");
|
||||
}, 60000);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue