aminghadersohi commented on code in PR #44951:
URL: https://github.com/apache/superset/pull/44951#discussion_r4190540352
##########
superset/mcp_service/utils/response_size_utils.py:
##########
@@ -450,6 +460,27 @@ def _dashboard_layout_suggestions(
)
+def _dashboard_datasets_suggestions(query_params: Dict[str, Any]) -> List[str]:
+ """Suggest the per-dataset caps that remain, or a fallback when none do."""
+ remaining: List[str] = []
+ if query_params.get("max_columns") != 0:
Review Comment:
Thanks for catching this. Fixed in
https://github.com/apache/superset/commit/58417a7a6b7d45234203e2f3aabb2e94ff6d051a:
both caps use `_parse_page_size` before comparing with zero. The regression
covers string zeros and mixed string/integer zeros and checks that they produce
the same already-omitted fallback as integer zeros. All 425 focused unit tests
and pre-commit on the branch-touched files passed.
##########
superset/mcp_service/dashboard/schemas.py:
##########
@@ -417,16 +417,34 @@ def _require_identifier_or_permalink(self) ->
"GetDashboardLayoutRequest":
return self
+# Per-dataset caps keep responses small enough for LLM context: wide
+# datasets can have hundreds of columns, which would dwarf the fields an
+# agent actually needs to configure native filters.
+MAX_DASHBOARD_DATASET_COLUMNS: int = 100
+MAX_DASHBOARD_DATASET_METRICS: int = 50
+
+
class GetDashboardDatasetsRequest(BaseModel):
- """Request schema for get_dashboard_datasets."""
+ """Dataset detail caps."""
Review Comment:
Thanks for the suggestion. Fixed in
https://github.com/apache/superset/commit/58417a7a6b7d45234203e2f3aabb2e94ff6d051a:
the wrapper reads “Dashboard lookup plus per-dataset detail caps.” Redundant
per-dataset wording was removed from the cap fields to stay within the existing
inventory byte budget. The regression checks the served tools/list description
after middleware, required identifier, and both caps’ minimum, maximum and
default. All 425 focused unit tests and branch-touched pre-commit checks passed.
--
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]