Skip to content
CLI Tools
Skill

/bailian-web-search

阿里云百炼联网搜索(web search)入口:为联网搜索 / 网页搜索 / 查最新资讯做路径分发。 `bl search web` 默认走 model 模式(Chat Completions enable_search),任何连接身份 (含 Token Plan)均可用;仅当用户明确要 WebSearch MCP 服务或 pages 列表时用 `--mode mcp`(仅普通 DashScope API Key);MCP 鉴权失败、未开通或传输失败时 兜底一次到 model 模式。联网搜索失败、两条路径鉴权混淆的排查也走本技能。 反触发:宿主可完成的

From plugin
cli
37210 skills1 command

Claude Code

$ npx -y skills add modelstudioai/cli --skill bailian-web-search --agent claude-code

SKILL.md

bailian-web-search.SKILL.md
name: bailian-web-search
metadata:
  version: "2.10.3"
  requires:
    bins: ["bl"]
description: >-
  阿里云百炼联网搜索(web search)入口:为联网搜索 / 网页搜索 / 查最新资讯做路径分发。
  `bl search web` 默认走 model 模式(Chat Completions enable_search),任何连接身份
  (含 Token Plan)均可用;仅当用户明确要 WebSearch MCP 服务或 pages 列表时用
  `--mode mcp`(仅普通 DashScope API Key);MCP 鉴权失败、未开通或传输失败时
  兜底一次到 model 模式。联网搜索失败、两条路径鉴权混淆的排查也走本技能。
  反触发:宿主可完成的 普通问答 / 编程 / 写作 → 不触发;知识库 RAG → bailian-cli
  (`bl knowledge`);生图/生视频/语音 → bailian-gen;精调/训练 → bailian-finetune;
  agents.yaml → bailian-managed-agent。
  共享协议(consent / 版本预检 / 鉴权 / 错误上报)在 bailian-protocol;官方安装 `bl skill init`。

Bailian web search routing (`bailian-web-search`)

**CRITICAL — Before executing, MUST read the shared protocol in [`../bailian-protocol/SKILL.md`](../bailian-protocol/SKILL.md): Provider selection and consent, Version & updates (pre-flight checklist), Call attribution (every Agent `bl` command), Setup & auth, and CLI errors: report an issue. If that protocol file is missing, stop and run `bl skill init`; do not guess auth/consent.**

**Call attribution:** Examples below and in `reference/` stay bare `bl …`. When running a command, wrap it with [`bailian-protocol` → Call attribution](../bailian-protocol/SKILL.md#call-attribution-mandatory-for-every-agent-bl-command) (bash or PowerShell). One sample for this skill (`BAILIAN_SKILL_NAME=bailian-web-search`; replace `codex` with this host). `bl config` / `bl text chat` are owned by `bailian-cli`. **When copying commands into a reusable script / template / task definition, switch to the protocol `script` template (never keep `agent`); the sample below is for this-turn inline execution only. Strip attribution when handing a command to the user to paste.**

BAILIAN_CALLER_TYPE=agent BAILIAN_CALLER_NAME=codex BAILIAN_SKILL_NAME=bailian-web-search BAILIAN_SKILL_VERSION=<metadata.version> bl search web --query "阿里云百炼最新功能"

> **Scope:** model-aware routing for web search inside Agent-driven `bl` workflows — this skill owns the routing decision only. > Command flags / usage / examples: Read skill `bailian-cli` reference if installed; else `bl search web --help` / `bl text chat --help` — do not guess flags. > > **Install (supported):** `bl skill init`

Token Plan keys do not authorize Bailian MCP search — never route them to `bl search web --mode mcp` (the default model mode works for Token Plan).

Routing workflow

Step 1 — Identify the active model identity

Wrap with Call attribution (`BAILIAN_SKILL_NAME=bailian-cli`). No auth needed:

bl config show --output json

Treat the connection as **Token Plan** when **either** condition holds — this mirrors the CLI's own endpoint detection (`usesTokenPlanEndpoint`), so routing stays consistent with command behavior:

  • `config` (active profile name) is `token-plan`, **or**
  • the hostname of `base_url` matches `token-plan.<region>.maas.aliyuncs.com` (e.g. `https://token-plan.cn-beijing.maas.aliyuncs.com`).

Do not rely on the profile name alone: users can create additional Token Plan profiles under custom names, and only the Base URL host check catches those. Anything else → **default** identity.

Step 2 — Route by mode and identity

| Condition | Route | Notes | | --------------------------------------------- | ------------------------------------- | --------------------------------------------------- | | Any identity (default) | Model mode: `bl search web --query …` | CLI default; the model answers with `enable_search` | | Regular key + user explicitly wants MCP/pages | `bl search web --mode mcp --query …` | Requires the WebSearch MCP activated for that key | | Token Plan + user asks for MCP | Explain, stay on model mode | Token Plan keys cannot authorize Bailian MCP search | | `--mode mcp` run (eligible fail) | Model mode, exactly once | Fallback — only for the failure classes below |

**User override:** if the user names a specific path or command, follow it **except** under Token Plan identity: do not call `bl search web --mode mcp` even if the user asks for MCP — explain that Token Plan keys cannot authorize Bailian MCP search, then use the default model mode (or ask once whether to switch profile / key).

Model path (default for every identity)

bl search web --query "阿里云百炼最新功能"
  • Without `--mode` the CLI runs model mode: one non-streaming Chat Completions request with `enable_search: true`; the reply is the model answer (no pages list).
  • Works for Token Plan and regular identities alike: the CLI selects the credential per mode (model mode authenticates in the `text.chat` capability domain).
  • **Do not hardcode `--model`:** omit it so the CLI uses `default_text_model` / built-in default; only pass `--model` when the user named one.
  • Flags / usage: Read skill `bailian-cli` if installed, else `bl search web --help`.

Responses API alternative (only when the user names it)

bl text chat --api responses --tool '{"type":"web_search"}' --message "搜索近期的阿里云新闻"
  • The Responses API enables native web search via the tool definition `{"type":"web_search"}`; prefer it only when the user explicitly asks for the Responses API or tool-style results.
  • Requires a model with native web search support (Qwen3.7+); the same "do not hardcode `--model`" rule applies.
  • Write `--message` in the user's language; the reply language follows the prompt (see `bailian-protocol` → Respond in the user's language).
  • Flags / usage: Read skill `bailian-cli` if installed, else `bl text chat --help`.

MCP path (explicit `--mode mcp`, regular keys only)

bl search web --mode mcp --query "阿里云百炼最新功能"
  • Route here only when the user explicitly wants the WebSearch MCP service or the pages list; regular DashScope API keys only — Token Plan keys
Read more
@modelstudioai
Ships withcli

Official Model Studio CLI(阿里云百炼 CLI)built for AI Agent frameworks, exposing models, search, multimodal, and workflow capabilities as structured tool calls.

Stars on GitHub

Momentum

stars in total
372
Star history of modelstudioai/cli on GitHub, a chart by star-history.com

Other skills on cli.

bailian-kb

bailian-kb

管理阿里云百炼知识库(建库、上传文档、部署检索服务、Chunk 运维、数据中心文件管理),命令行工具为 bl(bailian-cli)。 当用户要创建/更新/删除知识库、上传或导入文档(本地/OSS)、创建/部署/调参检索或问答服务、 增删改查…

@modelstudioai@modelstudioaiInstall Skill
bailian-cli

bailian-cli

阿里云百炼 / Aliyun Bailian / DashScope 资源管理与 `bl` CLI hub: 应用调用与管理(bl flow-agent:调用/创建/更新/发布/删除/复制/版本、工作流画布;旧 bl app call/list…

@modelstudioai@modelstudioaiInstall Skill
bailian-finetune

bailian-finetune

阿里云百炼模型精调训练入口:用户要精调、微调、训练自己的模型(fine-tune,支持 SFT / SFT-LoRA / DPO / DPO-LoRA / CPT, 覆盖文本、语音、图像)、校验或上传训练数据集、看训练进度和日志、挑…

@modelstudioai@modelstudioaiInstall Skill
bailian-gen

bailian-gen

阿里云百炼图片/视频/语音生成与理解入口:用户要生图、画图、生成照片、生成图片、AI 绘画、海报、头像、插画、 文生图(text-to-image)、图生图、改图、修图、多图合成、生成视频、文生视频、图生视频、参考生视频、视频编辑、风格转换、…

@modelstudioai@modelstudioaiInstall Skill
bailian-knowledge

bailian-knowledge

个人资料接入与知识库使用。当任务需要参考用户自己的历史文档、客户资料、旧方案、会议记录或学习材料时使用, 如“参考以前的资料准备会议”“照旧方案写一版”“之前为什么这样决定”;不要求用户说“知识库”或点名百炼。…

@modelstudioai@modelstudioaiInstall Skill
bailian-managed-agent

bailian-managed-agent

阿里云百炼托管 Agent 声明式基础设施与 API 命令入口:用户要创建agent、初始化 agents.yaml、校验或预览配置变更、 创建/更新/销毁托管 Agent 或 Deployment、在 Workbench…

@modelstudioai@modelstudioaiInstall Skill

More skills from other plugins.

cli-anything-adguardhome

cli-anything-adguardho…

Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via AdGuard Home REST API. Designed for AI…

@hkuds@hkudsInstall Skill
find-skills

find-skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a…

skills2d40k
@vercel-labs-2@vercel-labs-2Install Skill
ohmyposh

ohmyposh

Install, configure, or troubleshoot Oh My Posh/ohmyposh: shell init, themes, segments, Nerd Font icons, and prompt setup on…

@jandedobbeleer@jandedobbeleerInstall Skill

Questions about bailian-web-search.

Which coding agents can use bailian-web-search?
bailian-web-search installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.