- Add detailed logging for streaming chunks, final objects, and validation errors
- Update schema to accept model's natural output formats:
- References as objects with table/column fields (not strings)
- Relationships as either arrays or objects (model is inconsistent)
- Remove strict max table limit from schema, handle truncation in code
- Simplify LIMITS constants to just MAX_PROMPT_LENGTH and MAX_TABLES
- Update system prompt to specify reference object format
- Gracefully handle validation failures by sending usable partial data