Skip to content

Conversation

meirk-brd
Copy link
Collaborator

Fix: Enforce fixed parameter values for high-token response tools

Problem

Default values in tool parameters can be overridden when users explicitly request different values (e.g., "search 3 pages"). For tools like amazon_product_search that return large amounts of tokens, allowing pagination beyond page 1 can cause response size issues.

Solution

Added fixed_values mechanism to enforce unchangeable parameter values at execution time, regardless of user input. This ensures certain parameters always use specified values even when explicitly overridden.

Changes

  • Added fixed_values property support to dataset definitions
  • Applied fixed_values: {pages_to_search: '1'} to amazon_product_search
  • Values in fixed_values override any user-provided values at execution time

Impact

  • amazon_product_search now always uses 1 page regardless of user requests
  • Framework is extensible for other high-token endpoints that need similar restrictions
  • No breaking changes for tools without fixed_values

@fahimanwer
Copy link

I am eagerly waiting for this to merge as it will save alot of time for me, AI keeps on waiting for as long as 10 minutes that maybe it will return output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants