# dsh-vision-proxy bundle patch: one insert over the profile tree.
# The plugin row activates only when this package is installed as a profile
# dependency (e.g. `dsh plugin add dsh-vision-proxy`).
#
# 默认策略（v0.2.0）：
# - 有 key（apiKey 或 VISION_API_KEY / DASHSCOPE_API_KEY）→ 主模型走百炼 qwen3.7-flash（快、不限速）
# - 无 key 但本机装有 Ollama（http://localhost:11434）→ 自动探测并加入降级链，图片不出本机
# - 都没有 → 快速失败并给出明确指引（绝不卡死）
# 注意：不再内置任何第三方匿名免费端点（实测限速严重且可能无响应）。

- insert:
    - id: dsh-vision-proxy
      name: 'dsh-vision-proxy'
      config:
        baseURL: https://dashscope.aliyuncs.com/compatible-mode/v1
        apiKey: ''            # 留空则读环境变量；Windows 下环境变量变更可能不生效，直写这里最可靠
        model: qwen3.7-flash
        maxTokens: 4096
        timeoutMs: 120000     # 匿名端点实际被强制上限 20s，不会卡满
        maxImagePixels: 4000000
        marker: '[图片转译]'
        autoLocalOllama: true
        fallbackModels: []    # 可自行添加 {model, baseURL, apiKey?, anonymous?, timeoutMs?}
