enh: apply admin default to builtin web search (#21373)

This commit is contained in:
Classic298
2026-02-13 13:32:48 -06:00
committed by GitHub
parent df6e38039f
commit d01b1d4880
+3
View File
@@ -167,6 +167,9 @@ async def search_web(
engine = __request__.app.state.config.WEB_SEARCH_ENGINE
user = UserModel(**__user__) if __user__ else None
# Use admin-configured result count if configured, falling back to model-provided count of provided, else default to 5
count = __request__.app.state.config.WEB_SEARCH_RESULT_COUNT or count
results = await asyncio.to_thread(_search_web, __request__, engine, query, user)
# Limit results