fix: strip opencode image reasoning none

This commit is contained in:
Peter Steinberger
2026-04-25 04:35:00 +01:00
parent 96515891a2
commit 6f72b74cec
8 changed files with 203 additions and 5 deletions

View File

@@ -1,8 +1,29 @@
import { describe, it } from "vitest";
import { describe, expect, it } from "vitest";
import { registerProviderPlugin } from "../../test/helpers/plugins/provider-registration.js";
import { expectPassthroughReplayPolicy } from "../../test/helpers/provider-replay-policy.ts";
import plugin from "./index.js";
describe("opencode provider plugin", () => {
it("registers image media understanding through the OpenCode plugin", async () => {
const { mediaProviders } = await registerProviderPlugin({
plugin,
id: "opencode",
name: "OpenCode Zen Provider",
});
expect(mediaProviders).toEqual(
expect.arrayContaining([
expect.objectContaining({
id: "opencode",
capabilities: ["image"],
defaultModels: { image: "gpt-5-nano" },
describeImage: expect.any(Function),
describeImages: expect.any(Function),
}),
]),
);
});
it("owns passthrough-gemini replay policy for Gemini-backed models", async () => {
await expectPassthroughReplayPolicy({
plugin,