Skip to content

[Bug]: 在 OpenCLI 中调用豆包时触发人机校验,导致工具执行失败 #909

@wchaws

Description

@wchaws

Description

Image

问题描述

在使用 OpenCLI 调用豆包(Doubao)工具时,请求会触发豆包的人机校验(如 CAPTCHA 或风控校验),从而中断正常的工具执行流程,导致调用失败。

使用命令

opencli doubao ask 伊朗局势对各种金融资产的影响有哪些? --timeout 720 -f md

复现步骤

  1. 使用上述命令通过 OpenCLI 调用豆包
  2. 等待返回结果
  3. 观察到返回内容并非正常回答,而是触发了人机校验

期望行为

命令应正常返回 Markdown 格式的内容,对“伊朗局势对金融资产的影响”进行分析。

实际行为

  • 豆包触发人机校验机制
  • 返回内容不可用(如校验页面或被拦截响应)
  • OpenCLI 无法解析或返回有效结果

影响范围

  • 中断基于 CLI 的自动化流程
  • 降低 OpenCLI 调用豆包的可靠性
  • 需要人工介入,失去自动化意义

可能原因

  • 请求模式被识别为自动化/机器人行为
  • 缺少浏览器环境相关的 headers 或 session 信息
  • 触发了频率限制或风控策略

建议修复方向

  • 支持注入 cookies / session 以通过校验(如合规允许)
  • 优化请求 headers,使其更接近真实浏览器行为
  • 增加重试或 fallback 机制
  • 在触发校验时提供更清晰的错误提示

环境信息

  • OpenCLI 版本:1.6.9
  • 操作系统:macOS

补充说明

该问题在通过 OpenCLI 调用豆包时稳定复现,严重影响其在自动化工作流中的可用性,希望能提供解决方案或官方建议。


Bug: Doubao human verification blocks tool execution in OpenCLI

Description

When using OpenCLI to invoke Doubao tools, the request triggers Doubao's human verification (e.g., CAPTCHA or bot detection), causing the tool execution to fail.

Command Used

opencli doubao ask 伊朗局势对各种金融资产的影响有哪些? --timeout 720 -f md

Steps to Reproduce

  1. Run the above OpenCLI command
  2. Wait for the response from Doubao
  3. Observe that instead of returning a normal answer, a human verification challenge is triggered

Expected Behavior

The command should return a normal response in Markdown format analyzing the impact of the Iran situation on financial assets.

Actual Behavior

  • Doubao triggers a human verification mechanism
  • The response is unusable (e.g., verification page or blocked content)
  • OpenCLI fails to parse or return a valid result

Impact

  • Breaks CLI-based automation workflows
  • Makes OpenCLI + Doubao integration unreliable
  • Requires manual intervention, defeating automation purposes

Possible Causes

  • Request pattern flagged as bot activity
  • Missing browser-like headers or session context
  • Rate limiting or anti-abuse mechanisms triggered

Suggested Fixes

  • Allow passing cookies/session tokens into OpenCLI
  • Improve request headers to better mimic browser behavior
  • Add retry or fallback logic
  • Provide clearer error handling when verification is triggered

Environment

  • OpenCLI version: 1.6.9
  • OS: macOS

Additional Context

This issue consistently occurs when querying Doubao via OpenCLI, making it difficult to use Doubao as a reliable backend for automated CLI workflows.

Steps to Reproduce

$ opencli doubao ask 伊朗局势对各种金融资产的影响有哪些? --timeout 720 -f md

Role Text
User 伊朗局势对各种金融资产的影响有哪些?
Assistant 下载电脑版

Expected Behavior

命令应正常返回 Markdown 格式的内容,对“伊朗局势对金融资产的影响”进行分析。

OpenCLI Version

1.6.9

Node.js Version

20.x

Operating System

macOS

Logs / Screenshots

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions