Skip to content

Add hard row limits for AI metrics and SQL queries#8808

Merged
begelundmuller merged 7 commits intomainfrom
benjaminegelundmuller/plat-374-reduce-size-of-tool-call-results
Feb 11, 2026
Merged

Add hard row limits for AI metrics and SQL queries#8808
begelundmuller merged 7 commits intomainfrom
benjaminegelundmuller/plat-374-reduce-size-of-tool-call-results

Conversation

@begelundmuller
Copy link
Contributor

@begelundmuller begelundmuller commented Feb 10, 2026

This PR reduces the default and max row limits per query_sql and query_metrics_view tool call. It also updates the tool descriptions and agent prompts to discourage loading large datasets.

The row limits are configurable with the following config environment variables:

  • rill.ai.default_query_limit (default: 25)
  • rill.ai.max_query_limit (default: 250)

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@begelundmuller begelundmuller self-assigned this Feb 10, 2026
@begelundmuller begelundmuller merged commit 61ba0f8 into main Feb 11, 2026
10 checks passed
@begelundmuller begelundmuller deleted the benjaminegelundmuller/plat-374-reduce-size-of-tool-call-results branch February 11, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants