codeant-ai-for-open-source[bot] commented on PR #38725:
URL: https://github.com/apache/superset/pull/38725#issuecomment-4084275384
## **Sequence Diagram**
This PR adds a pre-validation step in XYChartConfig so LLM requests using
Superset-native field names are accepted instead of rejected by strict schema
rules. It preserves grouping behavior by mapping legacy groupby input and
silently dropping unsupported legacy fields.
```mermaid
sequenceDiagram
participant LLM
participant MCPService
participant XYChartConfig
LLM->>MCPService: Send generate chart request with native field names
MCPService->>XYChartConfig: Build and validate xy chart config
XYChartConfig->>XYChartConfig: Preprocess input before strict extra
field check
alt group_by missing and groupby provided
XYChartConfig->>XYChartConfig: Map first groupby value to group_by
else group_by already provided
XYChartConfig->>XYChartConfig: Keep explicit group_by value
end
XYChartConfig->>XYChartConfig: Remove adhoc_filters and order_desc
XYChartConfig-->>MCPService: Return normalized valid config
MCPService-->>LLM: Continue chart generation with intended grouping
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]