url-change

A maintenance guide for changing the URLs used by a command-line application, including API endpoints, documentation sites, console pages, upload services, regions, and tracking parameters.

In plain words
What is it for?
Use it when moving a console or documentation site, migrating an API endpoint, changing upload destinations, adding regions, or changing channel-tracking parameters.
Why use it?
It keeps URL definitions in their designated source files and helps ensure regional endpoints and user-facing links stay aligned. This reduces broken links and requests sent to the wrong service.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/modelstudioai/cli/url-change
Clone the repo
git clone --depth 1 https://github.com/modelstudioai/cli
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,015 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01015
Opus 5 $0.00000 $0.00508
Sonnet 5 $0.00000 $0.00203
Haiku 4.5 $0.00000 $0.00102

Measured yesterday against content hash 9e4310116742, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

url-change scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/url-change.md · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

URL / 渠道变更

触发条件

  • 控制台域名变更(如 bailian.console.aliyun.com → 新域名)
  • API endpoint 迁移
  • 文档站迁移
  • 调整 / 删除 / 新增渠道追踪参数(source_channel 等)

URL 的分层架构

core/config/schema.ts                   ← API endpoint / 文档站(region-aware)
  REGIONS{cn, us, intl}     dashscope.aliyuncs.com 等
  DOCS_HOSTS{cn, us, intl}  help.aliyun.com/zh/model-studio
  BAILIAN_HOST              bailian.cn-beijing.aliyuncs.com (OpenAPI)

runtime/src/urls.ts                      ← 用户面控制台 URL(cn-only)
  BAILIAN_CONSOLE_ROOT      bailian.console.aliyun.com
  BAILIAN_CONSOLE           BAILIAN_CONSOLE_ROOT/cn-beijing
  API_KEY_PAGE              BAILIAN_CONSOLE/?tab=app#/api-key
  TOKEN_PLAN_PAGE           BAILIAN_CONSOLE_ROOT/cn-beijing?tab=plan#/efm/subscription/overview
  MCP_WEBSEARCH_PAGE        mcpMarketplaceDetailPage("WebSearch")
  mcpMarketplaceDetailPage    BAILIAN_CONSOLE?tab=mcp#/mcp-market/detail/<serverCode>

core/files/upload.ts                     ← 文件上传 endpoint(cn-pinned)
  UPLOAD_API                ${REGIONS.cn}/api/v1/uploads

必查清单

A. TS 源码(必须 import,不准硬编码)

  • packages/core/src/config/schema.ts 是所有 API/docs 基址的源头
  • packages/runtime/src/urls.ts 是所有用户面控制台 URL 的源头
  • 改完后 grep 验证:
# 控制台 URL — 应只在 urls.ts 出现
grep -rnE "https://bailian\.console\.aliyun\.com" packages/ --include="*.ts" \
  | grep -v "node_modules" | grep -v "/dist/"
# 期望:匹配 packages/runtime/src/urls.ts;
# 当前遗留例外:packages/commands/src/commands/auth/login-console.ts(登录站点映射)、
# packages/core/src/advisor/recommend.ts(模型文档 deep link)。触碰时优先收敛到统一 URL 模块。

# API endpoint — 应只在 schema.ts 和 upload.ts 出现
grep -rnE "https://dashscope[a-z-]*\.aliyuncs\.com" packages/ --include="*.ts" \
  | grep -v "node_modules" | grep -v "/dist/"
# 期望:只匹配 schema.ts(REGIONS)、upload.ts(派生)、tests

B. 非 TS 文件(只能人工同步,无法 import)

  • skills/*/reference/<group>.md 中 API/控制台 URL(generate:reference 重建后核对并提交)
  • README.md / README.zh.md 中所有 URL

C. 渠道追踪参数

  • 当前现状:TS 源码不带 source_channel=...;README / package README 中保留 cli_github / key_github 等用户入口追踪参数
  • 如未来调整追踪参数,统一评估 README、packages/cli/README*packages/core/README* 与 package homepage,不要单点改造成不一致
  • grep source_channel=,确认每个残留都属于预期用户面文档或已批准的追踪入口

Read the full file on GitHub · 80 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 80 lines · 0 tokens per session scan A 9e4310116742

Subscribe to this mod's changes

url-change is an agent published in the GitHub repository modelstudioai/cli (320 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,015 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.