Expose MSR image analysis payload debug

This commit is contained in:
OpenClaw Agent
2026-07-10 11:40:10 +00:00
parent 2da1de2f6d
commit f372a2ed69
2 changed files with 63 additions and 11 deletions

View File

@@ -549,10 +549,11 @@ def _resolve_provider(data):
async def analyze_character_endpoint(request):
try:
import aiohttp
data = await request.json()
image_b64 = data.get("image_b64", "")
char_index = int(data.get("char_index", 0))
provider, base_url, model_name = _resolve_provider(data)
data = await request.json()
image_b64 = data.get("image_b64", "")
image_debug = data.get("image_debug") or []
char_index = int(data.get("char_index", 0))
provider, base_url, model_name = _resolve_provider(data)
if provider == "off":
return web.json_response({"status": "error", "message": "Analyze is set to Off / Manual."})
@@ -639,6 +640,8 @@ async def analyze_character_endpoint(request):
"status": "error",
"message": "Ollama returned only a truncated analysis response.",
"debug_candidates": debug_candidates,
"image_debug": image_debug,
"image_lengths": [len(b64) for b64 in cleaned_b64_list],
"description": generated_text,
})
else: