fix(pydantic): skip non-dict models in list_models - #2522
Conversation
Guard wren_list_models against non-list models, non-dict entries, and missing names so partial MDL manifests cannot crash the tool.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThe model-listing runtime path now validates manifest structure, skips invalid or nameless entries, normalizes field types, and safely derives descriptions. A unit test covers malformed entries and default values. ChangesModel manifest parsing
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Motivation
Malformed MDL fragments should not AttributeError wren_list_models mid-comprehension. Apache-2.0: sdk/**.
Verification
Logic exercised with an in-process fixture reproducing non-dict/name-less rows (ok model kept with column_count 0). Full pydantic-ai env not on this host; unit test added for CI:
Test plan
Summary by CodeRabbit
Bug Fixes
Tests