-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.env.example
More file actions
93 lines (81 loc) · 3.99 KB
/
Copy pathcustom.env.example
File metadata and controls
93 lines (81 loc) · 3.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# zcode-cli custom-provider configuration template
#
# Copy this file to ~/.zcode/cli/custom.env and fill in your values:
#
# mkdir -p ~/.zcode/cli && cp custom.env.example ~/.zcode/cli/custom.env
#
# This file serves the signed-out state: it is how you use zcode without
# logging in to bigmodel.cn / z.ai, with any Anthropic/OpenAI-compatible
# endpoint and API key of your choice. While you are not logged in, every
# start syncs the settings below into ~/.zcode/cli/config.json (the
# provider's own `env-<provider-id>` slot and the `model` block; all other
# config.json content is left untouched). `/login` takes over automatically
# while signed in, and `/logout` returns to this file — no need to remove or
# restore it by hand. The identity line shows "Not signed in" while this
# file provides the access.
#
# A legacy ~/.zcode/cli/custom-provider.env (or the even older .env) is
# renamed to custom.env automatically on the first start.
#
# The file lives outside any repository on purpose — it holds your API key.
# Keep it mode 600 and never commit it anywhere.
# ---------------------------------------------------------------------------
# Provider identity
# ---------------------------------------------------------------------------
# Provider ID used as the key in config.json's `provider` map.
# Default: zai
#
# The value is also what the UI displays as the provider (`<provider-id>/<model>`),
# e.g. `bigmodel` shows as bigmodel/glm-5.2.
#
# Examples:
# zai Z.AI Coding Plan endpoint (default)
# bigmodel BigModel (Zhipu) Coding Plan endpoint
#ZCODE_PROVIDER_ID=zai
# Display name shown in the TUI model picker. Default: derived from the
# provider ID (zai -> "Zai", bigmodel -> "Bigmodel").
#ZCODE_PROVIDER_NAME=Z.AI Coding Plan
# Wire protocol of the endpoint. Default: anthropic
# anthropic Anthropic Messages API format (Z.AI / BigModel coding plans)
# openai-compatible OpenAI-compatible endpoints (baseURL usually ends in /v1)
# openai Official OpenAI API
#ZCODE_PROVIDER_KIND=anthropic
# API root of the endpoint. Use the root, NOT a final /messages or
# /chat/completions path. Default depends on the provider ID:
# zai https://api.z.ai/api/anthropic
# bigmodel https://open.bigmodel.cn/api/anthropic
# Required for any other provider ID.
#ZCODE_BASE_URL=https://api.z.ai/api/anthropic
# ---------------------------------------------------------------------------
# Credentials (required)
# ---------------------------------------------------------------------------
# API key issued by the provider. Required — a file without it is ignored.
# For Z.AI / BigModel coding plans this is the API key from the console
# (bigmodel.cn / z.ai), not an OAuth token.
#
# Multiple keys for automatic failover: uncomment and fill the numbered
# backup variables below (one key per variable). With more than one key
# zcode starts a loopback proxy (127.0.0.1, first free port from 7849) and
# retries each request with the next key on 401/403/429, 5xx or a
# connection failure. Keys themselves never leave this file / proxy
# memory (config.json stores only a "zcode-failover" placeholder). Switch
# events are logged to ~/.zcode/cli/key-failover.log. A single key keeps
# the direct connection.
ZCODE_API_KEY=
# Backup keys for automatic failover (optional, one key per variable):
#ZCODE_API_KEY_2=
#ZCODE_API_KEY_3=
# ---------------------------------------------------------------------------
# Models
# ---------------------------------------------------------------------------
# Main conversation model ID sent to the endpoint. Required.
# IDs are case-sensitive and must match what the endpoint expects
# (Z.AI / BigModel IDs are lowercase, e.g. glm-5.2).
ZCODE_MAIN_MODEL=glm-5.2
# Lightweight model used for titles, summaries and subagent work.
# Default: same as ZCODE_MAIN_MODEL.
ZCODE_LITE_MODEL=glm-5-turbo
# Extra models to declare in the picker, comma-separated. Optional.
# Each entry is a model ID, optionally `id:Display Name`:
# glm-5.2,glm-5-turbo:Turbo
#ZCODE_EXTRA_MODELS=