aminghadersohi commented on PR #39898:
URL: https://github.com/apache/superset/pull/39898#issuecomment-4390156981

   Closing — re-scoping to a proper fix. The original approach (lean defaults + 
select_columns/column_fields) was a workaround for the deeper issue: the 
char-based token estimator in `superset/mcp_service/utils/token_utils.py` (3.5 
chars/token) under-counts JSON-heavy MCP responses vs. Claude's actual 
tokenizer, so payloads slip under our token cap while exceeding Claude Agent 
SDK's effective threshold.
   
   Replacing this PR with one that fixes the estimator itself (Claude-aligned 
tokenization with tiktoken + heuristic fallback) so the existing 5-phase 
truncation in `ResponseSizeGuardMiddleware` actually fires when it should. New 
PR coming next.


-- 
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]

Reply via email to