fix: adjust vision capability check to not block when no model resolved

- Only block when a resolved model is explicitly not vision-capable
- Set up vision cache in model passthrough test for proper isolation
This commit is contained in:
YeonGyu-Kim
2026-03-11 21:56:19 +09:00
parent fee414fd61
commit ac0e14059d
2 changed files with 7 additions and 4 deletions
+3
View File
@@ -1,5 +1,6 @@
import { describe, expect, test, mock } from "bun:test"
import type { ToolContext } from "@opencode-ai/plugin/tool"
import { setVisionCapableModelsCache } from "../../shared/vision-capable-models-cache"
import { normalizeArgs, validateArgs, createLookAt } from "./tools"
describe("look-at tool", () => {
@@ -255,6 +256,8 @@ describe("look-at tool", () => {
// when LookAt tool executed
// then model info should be passed to sync prompt
test("passes multimodal-looker model to sync prompt when available", async () => {
setVisionCapableModelsCache(new Map([["google/gemini-3-flash", { providerID: "google", modelID: "gemini-3-flash" }]]))
let promptBody: any
const mockClient = {