Fixes for RedisDb, MMRReranker, FieldLabeledCSVReader and AgentOSClient
October 27, 20261 min read
This Agno release fixes four small bugs in knowledge search, CSV reading and the AgentOS client. Each one ran without a model key, so the output below is real, from the earlier release and this one.
RedisDb keyword search honors the limit
RedisDb.keyword_search now passes limit to redisvl as num_results. Before this fix redisvl fell back to its default of 10, so asking for 3 or 50 results still got 10. A MagicMock stood in for the redisvl index here to capture the query it received:
db = RedisDb(index_name="recipes", redis_client=fakeredis.FakeRedis(), embedder=embedder, search_type=SearchType.keyword)
db.index = MagicMock(query=MagicMock(return_value=[])) # stand-in for redisvl's SearchIndex
db.keyword_search("curry", limit=3)
print(db.index.query.call_args[0][0]._num_results)# Before
10
# Now
3MMRReranker keeps nothing when the limit is zero
MMRReranker.rerank and arerank return an empty list for a limit of zero or less. The selection used to start with the closest match before it checked the limit, so a caller asking for nothing still got one document. These runs use the release's test stub embedder over three documents:
# Before
rerank(limit=0): ['a']
rerank(limit=-1): ['a']
arerank(limit=0): ['a']
# Now
rerank(limit=0): []
rerank(limit=-1): []
arerank(limit=0): []FieldLabeledCSVReader rejects page_size=0
FieldLabeledCSVReader.async_read raises a ValueError for page_size=0, as it already did for negative values. On a file with 12 data rows, earlier releases logged an error and returned nothing:
# Before
ERROR Error reading async: <_io.StringIO object>: range() arg 3 must not be zero
documents: 0
# Now
ValueError: page_size must be a positive value.AgentOSClient docstring drops stream
The AgentOSClient.continue_agent_run docstring no longer lists a stream argument. The method never had one. It returns one RunOutput, and a stream=True you pass lands in **kwargs without an error while the response still arrives in one piece. Use continue_agent_run_stream to stream. The method's code is unchanged.
See the MMR cookbook, and learn more about MMR reranking and the AgentOS Client in the documentation.
Frequently asked questions
RedisDb.keyword_search built its redisvl TextQuery without num_results, so redisvl used its default of 10 whatever limit you asked for. This release passes your limit through.
An empty list, from both rerank and arerank, and the same for any negative limit. No query embedding is computed for that call. A limit of None still returns the input documents.
async_read raises ValueError("page_size must be a positive value."). Earlier releases accepted it and returned no documents for files with more than 10 data rows.
Call continue_agent_run_stream. continue_agent_run has no stream argument and returns a single RunOutput.




