fix(validation): respect settings-bound provider and correct multimodal heuristic
This commit is contained in:
@@ -51,30 +51,11 @@
|
||||
validatingIds = new Set(validatingIds);
|
||||
|
||||
try {
|
||||
// TODO: Get provider_id from settings or prompt user
|
||||
// For now, we assume a default provider or let the backend handle it if possible,
|
||||
// but the plugin requires provider_id.
|
||||
// In a real implementation, we might open a modal to select provider if not configured globally.
|
||||
// Or we pick the first active one.
|
||||
|
||||
// Fetch active provider first
|
||||
const providers = await api.fetchApi("/llm/providers");
|
||||
const activeProvider = providers.find((p: any) => p.is_active);
|
||||
|
||||
if (!activeProvider) {
|
||||
toast(
|
||||
"No active LLM provider found. Please configure one in settings.",
|
||||
"error",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
await api.postApi("/tasks", {
|
||||
plugin_id: "llm_dashboard_validation",
|
||||
params: {
|
||||
dashboard_id: dashboard.id.toString(),
|
||||
environment_id: environmentId,
|
||||
provider_id: activeProvider.id,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user