Convert-stats on a stat-less entry shows a scary "LLM failed" error #233
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Running stat conversion (#145) on a lore entry whose prose contains no mappable stats — e.g. an NPC like Ravenshade ("Owner of a small tea shop and bookstore") — surfaces a red "The LLM failed to produce a draft" banner with "The source material did not contain any stats that map to this game system's schema." The LLM did not fail: it ran correctly and found nothing to convert.
Root cause (confirmed, working-as-designed)
convert_lore_entry_statsdeliberately never invents — it maps ONLY what's in the source. When the model returns a well-formed but emptyvaluesobject, audio_service.py:1821 raisesValueError, which the draft-review UI renders with its generic failure chrome.Reproduced live on Dev against
qwen3.5:{size: "Medium"}inference on some rolls) → the error.So the pipeline is correct; convert-stats simply has nothing to map for a pure-flavor NPC.
Desired behavior
Distinguish "nothing to convert" from a genuine failure:
ValueError.Backend + frontend; no contract bump. Target v3.10.0.
🤖 Generated with Claude Code
Done — shipped in v3.10.0 (merged via #225). Converting an entry whose text has no mappable stats now shows a gentle amber "Nothing to convert" state that steers the GM to generate a stat block from scratch, instead of the red "The LLM failed to produce a draft" banner. Implemented as frontend-only detection of the empty-mapping case in the draft-review banner (the message is unique to
convert_lore_entry_stats), so no schema change.