Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long queries cause an uncaught Tavily bug #1263

Open
ldorigo opened this issue Mar 14, 2025 · 1 comment
Open

Long queries cause an uncaught Tavily bug #1263

ldorigo opened this issue Mar 14, 2025 · 1 comment

Comments

@ldorigo
Copy link
Contributor

ldorigo commented Mar 14, 2025

Describe the bug
I tried running a deep research with a lot of context describing exactly what I want to search for and how to format it as well as some background information (similar to the kind of input I would give to deep research on chatgpt); but I get multiple errors from tavily saying "Error: 400 Client Error: Bad Request for url: https://api.tavily.com/search. Failed fetching sources. Resulting in empty response.". I printed the full message of the exception and it's because "'{"detail":{"error":"Query is too long. Max query length is 400 characters."}}'".

To Reproduce
Steps to reproduce the behavior:

  1. Set search engine to tavily
  2. Run deep research (probably also other kinds of research) with a long prompt (seemingly >400 characters).
  3. Observe

Expected behavior
I suppose in case of long queries; first there should be a "planning step" or "query rewriting" step; and only after it should proceed to do the actual search?

@ElishaKay
Copy link
Collaborator

Interesting

Thanks for the heads up @ldorigo

Green light for the PR for whoever finds the root cause

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

No branches or pull requests

2 participants