Files
deepseek-harness/apps/web/tests/expected/models-settings/empty.expected.md
T
Yichen Jiang 8a320a276b feat(settings-models): one add entry with third-party and custom-API modes
The Models page offered two side-by-side buttons, "Add provider" and
"Add a custom provider", which asked a new user to classify their
provider by an implementation fact — whether it is in the installed
pi-ai catalog — before seeing anything. One "Add model provider" button
now opens one card whose segmented mode switch chooses between a
third-party model provider (the catalog select over the provider
editor) and a custom model API (the create form for a relay, a
self-hosted server, or any other OpenAI- or Anthropic-compatible
endpoint), with a one-line purpose beneath the switch. A panel mounts
the first time its mode is shown and stays mounted, hidden, while the
card is open, so switching modes discards neither draft.

A mode is offered only while its namespace is mounted and disabled
while it has nothing to offer, which keeps the old per-button
availability; with one mode the card shows that form alone. The
protocol pickers name each protocol by its product name while the
stored value stays the schema identifier, and an unnamed protocol shows
that identifier. The Chinese copy of this page calls a provider 提供商
throughout.

The e2e scenarios drive the single entry and its custom-API mode, and
the ARIA goldens that carry the page copy are re-recorded. The user
guide describes the one entry with fresh screenshots in both languages.
2026-09-19 15:14:52 +08:00

2.0 KiB

  • dialog "设置":
    • navigation:
      • text: 设置
      • button "通用设置"
      • button "模型"
      • button "内置插件"
      • button "Agent 预设"
    • button "打开配置文件"
    • button "关闭"
    • heading "模型" [level=2]
    • paragraph: 填入各提供商的 API 密钥即可使用其模型。
    • list
    • tablist "添加方式":
      • tab "第三方模型提供商" [selected]
      • tab "自定义模型 API"
    • paragraph: 从内置目录中选择 OpenAI、Anthropic、Kimi 等提供商,填入其 API 密钥即可使用。
    • tabpanel "第三方模型提供商":
      • text: 提供商
      • combobox "提供商":
        • option "amazon-bedrock"
        • option "ant-ling"
        • option "anthropic"
        • option "azure-openai-responses"
        • option "baseten"
        • option "cerebras"
        • option "cloudflare-ai-gateway"
        • option "cloudflare-workers-ai"
        • option "deepseek"
        • option "fireworks"
        • option "github-copilot"
        • option "google"
        • option "google-vertex"
        • option "groq"
        • option "huggingface"
        • option "kimi-coding"
        • option "minimax"
        • option "minimax-cn" [selected]
        • option "mistral"
        • option "moonshotai"
        • option "moonshotai-cn"
        • option "nvidia"
        • option "openai"
        • option "openai-codex"
        • option "opencode"
        • option "opencode-go"
        • option "openrouter"
        • option "qwen-token-plan"
        • option "qwen-token-plan-cn"
        • option "qwen-token-plan-individual"
        • option "together"
        • option "vercel-ai-gateway"
        • option "xai"
        • option "xiaomi"
        • option "xiaomi-token-plan-ams"
        • option "xiaomi-token-plan-cn"
        • option "xiaomi-token-plan-sgp"
        • option "zai"
        • option "zai-coding-cn"
      • text: API 密钥
      • textbox "API 密钥":
        • /placeholder: 输入 API 密钥,或留空使用环境认证
      • group: 自定义设置
      • button "取消"
      • button "保存"