Skip to content

AI continuously retries search after search function errors, consuming large amounts of tokens #10423

@yan2027

Description

@yan2027

📱 Client Type

Desktop App (Electron)

💻 Operating System

Windows

📦 Deployment Platform

No response

🔧 Deployment Mode

client db (lobe-chat image)

📌 Version

v2.0.0-next.115

🌐 Browser

Edge

🐛 Bug Description

I needed the model to search online for some prices. I didn't enable in-model search because it would produce no output, so I enabled smart networking instead. However, during those ten-plus minutes, it kept searching for gypsum ceiling prices, and after consuming 600,000 tokens I stopped it. Upon checking the search results, I found that errors occurred from the very first result. The model seemed unaware of the problem and continued calling the search tool repeatedly.

LobeHub.2025-11-25.22-48-54.mp4

📷 Recurrence Steps

No response

🚦 Expected Behavior

I hope there can be a setting in the client to configure which search method to use. For example, in the backend settings, you could configure the search service and API. The image shows what I think would be a good approach. Also, if there are issues with search results, the AI model should be able to detect them and stop subsequent calls.
Image

📝 Additional Information

No response

🛠️ Willing to Submit a PR?

No, but I am happy to help test the fix

✅ Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a LobeChat issue and not a third-party library or provider issue.
  • Check that this is a concrete bug. For Q&A, please use GitHub Discussions or join our Discord Server.

This issue was translated by Claude.

Original Content

📱 Client Type

Desktop App (Electron)

💻 Operating System

Windows

📦 Deployment Platform

No response

🔧 Deployment Mode

client db (lobe-chat image)

📌 Version

v2.0.0-next.115

🌐 Browser

Edge

🐛 Bug Description

我需要模型联网搜索一些价格,没有开启模型内搜索,因为会无输出,于是开启了智能联网,但是在这十多分钟的时间里,它一直在搜索石膏吊顶的价格,最后消耗六十万tokens后我停止了它,检查搜索结果发现从第一条开始就是报错的,模型似乎没有意识到问题还在持续调用搜索工具

LobeHub.2025-11-25.22-48-54.mp4

📷 Recurrence Steps

No response

🚦 Expected Behavior

希望在客户端有地方可以设置使用何种方法搜索,比如说在后台可以设置搜索服务以及api,图为我觉得挺好的方法,以及如果搜索结果有问题,能让ai模型知道并停止接下来的调用
Image

📝 Additional Information

No response

🛠️ Willing to Submit a PR?

No, but I am happy to help test the fix

✅ Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Make sure this is a LobeChat issue and not a third-party library or provider issue.
  • Check that this is a concrete bug. For Q&A, please use GitHub Discussions or join our Discord Server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions