fix(look-at): respect configured multimodal-looker model instead of overriding via dynamic fallback
This commit is contained in:
@@ -4,7 +4,6 @@ import { tool, type PluginInput, type ToolDefinition } from "@opencode-ai/plugin
|
||||
import { LOOK_AT_DESCRIPTION, MULTIMODAL_LOOKER_AGENT } from "./constants"
|
||||
import type { LookAtArgs } from "./types"
|
||||
import { log, promptSyncWithModelSuggestionRetry } from "../../shared"
|
||||
import { readVisionCapableModelsCache } from "../../shared/vision-capable-models-cache"
|
||||
import { extractLatestAssistantText } from "./assistant-message-extractor"
|
||||
import type { LookAtArgsWithAlias } from "./look-at-arguments"
|
||||
import { normalizeArgs, validateArgs } from "./look-at-arguments"
|
||||
@@ -39,15 +38,6 @@ function getTemporaryConversionPath(error: unknown): string | null {
|
||||
return null
|
||||
}
|
||||
|
||||
function isVisionCapableResolvedModel(model: {
|
||||
providerID: string
|
||||
modelID: string
|
||||
}): boolean {
|
||||
return readVisionCapableModelsCache().some((visionCapableModel) =>
|
||||
visionCapableModel.providerID === model.providerID &&
|
||||
visionCapableModel.modelID === model.modelID,
|
||||
)
|
||||
}
|
||||
|
||||
export { normalizeArgs, validateArgs } from "./look-at-arguments"
|
||||
|
||||
@@ -148,12 +138,6 @@ Be thorough on what was requested, concise on everything else.
|
||||
If the requested information is not found, clearly state what is missing.`
|
||||
|
||||
const { agentModel, agentVariant } = await resolveMultimodalLookerAgentMetadata(ctx)
|
||||
if (agentModel && !isVisionCapableResolvedModel(agentModel)) {
|
||||
log("[look_at] Resolved model is not vision-capable, blocking", {
|
||||
resolvedModel: agentModel,
|
||||
})
|
||||
return "Error: Resolved multimodal-looker model is not vision-capable"
|
||||
}
|
||||
|
||||
log(`[look_at] Creating session with parent: ${toolContext.sessionID}`)
|
||||
const parentSession = await ctx.client.session.get({
|
||||
|
||||
Reference in New Issue
Block a user