[PR #13107] [MERGED] fix: max_results in Tavily search handler #23103

Closed
opened 2026-04-20 04:37:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/13107
Author: @tth37
Created: 4/21/2025
Status: Merged
Merged: 4/23/2025
Merged by: @tjbck

Base: devHead: fix_tavily_max_results


📝 Commits (1)

  • bc315bd fix: max_results in Tavily search api

📊 Changes

1 file changed (+12 additions, -5 deletions)

View changed files

📝 backend/open_webui/retrieval/web/tavily.py (+12 -5)

📄 Description

Changelog Entry

Description

Related: #13075
Fixed some small bugs when calling Tavily search API.

  1. API Key Handling
    • Previously, the API key was passed in the request body, which is not documented in Tavily's official API reference.
    • Updated to pass the api_key in the Authorization header, following the recommended practice.
  2. max_results Parameter
    • The Tavily API natively supports max_results (default: 5) parameter, facing issues when count is greater than 5.
    • Pass the count parameter as max_results to get the correct number of search results.
  3. Domain Filter Fix
    • The Tavily search handler previously ignored the domain filter list.

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/13107 **Author:** [@tth37](https://github.com/tth37) **Created:** 4/21/2025 **Status:** ✅ Merged **Merged:** 4/23/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix_tavily_max_results` --- ### 📝 Commits (1) - [`bc315bd`](https://github.com/open-webui/open-webui/commit/bc315bd53000108796763814ef55895c68c8682e) fix: `max_results` in Tavily search api ### 📊 Changes **1 file changed** (+12 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/retrieval/web/tavily.py` (+12 -5) </details> ### 📄 Description # Changelog Entry ### Description Related: #13075 Fixed some small bugs when calling Tavily search API. 1. API Key Handling - Previously, the API key was passed in the request body, which is not documented in Tavily's [official API reference](https://docs.tavily.com/documentation/api-reference/endpoint/search). - Updated to pass the `api_key` in the `Authorization` header, following the recommended practice. 2. `max_results` Parameter - The Tavily API natively supports `max_results` (default: 5) parameter, facing issues when `count` is greater than 5. - Pass the `count` parameter as `max_results` to get the correct number of search results. 3. Domain Filter Fix - The Tavily search handler previously ignored the domain filter list. --- ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [CONTRIBUTOR_LICENSE_AGREEMENT](CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 04:37:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#23103