# dsh-zai-coding-models — bundle patch layer.
#
# Declared by `dsh.bundle.patch` in package.json: `dsh plugin add
# dsh-zai-coding-models` reconciles `dsh.profile.bundles` automatically and
# this layer is applied after the in-box bundles.
#
# What it does: targets the stock `llm-pi-ai` row and supplies a composition
# *base* config for its zai-coding-cn route. A patch replaces the targeted
# row's whole config (there is none today — the stock row is config-less), and
# user settings still merge per-provider on top, so an apiKeyEnv stored via the
# Models page keeps working unchanged.
#
# The models list REPLACES the route's installed pi-ai catalog, so every model
# the route should serve is spelled out: the six bundled zai-coding-cn entries
# plus the newer glm-5.3. Entries that name a bundled model with only their id
# inherit every field from the installed catalog.
#
# glm-5.3 (per official docs.bigmodel.cn/cn/guide/models/text/glm-5.3):
#   - text-only, 1M context window, 128K max output
#   - thinking is always on and cannot be disabled; native effort levels are
#     low / high / max (medium maps to "high" so the picker keeps a sane scale)
#   - compat.supportsReasoningEffort must be set explicitly: pi-ai's URL
#     detection pins it to false for open.bigmodel.cn, which would silently
#     drop the reasoning_effort parameter.
#
# To disable without uninstalling, target this entry id in the profile's
# cordis.patch.yml:
#   - id: llm-pi-ai
#     config:
#       providers:
#         zai-coding-cn:
#           models:
#             - id: glm-4.5-air
#             ...  # restore whatever you want, see the note in README
- id: llm-pi-ai
  config:
    providers:
      zai-coding-cn:
        models:
          - id: glm-4.5-air
          - id: glm-4.7
          - id: glm-5-turbo
          - id: glm-5.1
          - id: glm-5.2
          - id: glm-5v-turbo
          - id: glm-5.3
            name: GLM-5.3
            contextWindow: 1000000
            maxTokens: 131072
            reasoningEfforts:
              low: low
              medium: high
              high: high
              max: max
            compat:
              thinkingFormat: zai
              supportsReasoningEffort: true
