import {
  resolveStageModelFromEnv,
  resolveStageProviderFromEnv,
} from "../core/llm-env.js";

export function resolveSearchVisionModel(env = process.env) {
  return resolveStageModelFromEnv("search_vision", env);
}

export function getSearchVisionPromptRuntimeScope(model = resolveSearchVisionModel(), env = process.env) {
  return {
    provider: env.PROMPT_PROVIDER || resolveStageProviderFromEnv("search_vision", env) || env.LLM_PROVIDER || "*",
    model: resolveStageModelFromEnv("search_vision", { ...env, SEARCH_VISION_LLM_MODEL: model }) || "*",
  };
}
