Model info and res preset fix

This commit is contained in:
2026-07-26 22:42:20 -07:00
parent e9ee89f8a3
commit aa59df60d9
3 changed files with 27 additions and 8 deletions
+12 -1
View File
@@ -26,7 +26,18 @@ async def handle(args: Dict[str, Any]) -> Dict[str, Any]:
}
if model_name not in models:
raise ToolError(f"Model '{model_name}' not found in presets. Available models: {', '.join(models.keys())}")
# Return the full catalog if the specific model isn't found
catalog = []
for name, data in models.items():
catalog.append({
"name": name,
"description": data.get("description", "No description provided.")
})
return {
"text": f"Model '{model_name}' not found.\n\nAvailable models:\n\n" +
"\n".join([f"- {m['name']}: {m['description']}" for m in catalog]) +
"\n\nTo get a detailed prompting guide and available resolutions for a specific model, call this tool again with the 'model_name' argument."
}
model_data = models[model_name]
res_set_name = model_data.get("Resolution Set")