1---
2name: updating-llm-client-model-lists
3description: Synchronizes model configurations across Zed, Crush, Octofriend, and Pi from Plexus' /v1/models endpoint. Use when the user asks to update model lists, sync models, refresh available models, or mentions Plexus model availability.
4---
5
6Updates four LLM client configs from the Plexus proxy's available models.
7
8## max_completion_tokens
9
10Always use `floor(context_length * 0.2)` as the max_completion_tokens value for all clients. Do NOT use the `top_provider.max_completion_tokens` field from the API — some models report their entire context window as max completion tokens, which is not a sensible default. 20% of context length is a more practical cap.
11
12## Network reachability
13
141. Ping `harp-willow.snowy-egret.ts.net` once
152. If unreachable and Tailscale DNS is disabled, enable it:
16 ```bash
17 tailscale set --accept-dns=true
18 ```
193. Test ping again. If still unreachable, STOP and inform the user
20
21Remember to disable after finishing the whole process if it was previously disabled.
22
23```bash
24tailscale set --accept-dns=false
25```
26
27## Fetch Plexus models
28
29```bash
30curl -s http://harp-willow.snowy-egret.ts.net:4000/v1/models | \
31 jq -r '.data[]
32 | select(.id | IN("nomic-embed-text-v1.5", "diff-apply", "fix-json") | not)
33 | [.id, (.name // .id), (.context_length | tostring),
34 ((.context_length * 0.2 | floor | tostring)),
35 (if (.supported_parameters | index("tools")) then "tools" else "" end),
36 (if (.supported_parameters | index("reasoning")) then "reasoning" else "" end),
37 (if (.architecture.input_modalities | index("image")) then "image" else "" end)]
38 | @tsv' | column -t -s $'\t'
39```
40
41This should provide all the info you need in a table. The data in this table is the same as what you'd get directly querying Plexus. The display names are the same. You do not need to query Plexus any other way. Review the display names in the table, and if they need modification, make the modification while editing the configs.
42
43## Rules
44
45- Always exclude `nomic-embed-text-v1.5` (embedding model, not supported by any client)
46- Exclude `diff-apply` and `fix-json` from Zed, Crush, and Pi because it's only supported by Octofriend
47- Exclude models with no `context_length` field (e.g. voxtral-small, mistral-ocr) unless the user provides values manually
48- Omit special characters from display names. For example, "MiniMax-M2.7" should become "MiniMax M2.7". "nemotron-3-super" becomes "Nemotron 3 Super".
49
50## Update Zed config
51
52File: `~/.config/zed/settings.json`
53
54Update `language_models.Plexus.available_models[]`. Each entry:
55
56```json
57{
58 "name": "<id>",
59 "display_name": "<name>",
60 "max_tokens": <context_length>,
61 "max_completion_tokens": <max_completion_tokens>,
62 "capabilities": {
63 "chat_completions": true,
64 "prompt_cache_key": false,
65 "tools": <true if "tools">,
66 "parallel_tool_calls": true,
67 "images": <true if "image">
68 }
69}
70```
71
72## Update Crush config
73
74File: `~/.local/share/chezmoi/dot_config/crush/crush.json`
75
76Update `providers.plexus.models[]`. Each entry:
77
78```json
79{
80 "id": "<id>",
81 "name": "<name>",
82 "context_window": <context_length>,
83 "default_max_tokens": <max_completion_tokens>,
84 "can_reason": <true if "reasoning">,
85 "supports_attachments": <true if "image">
86}
87```
88
89After editing: `chezmoi apply ~/.config/crush/crush.json`
90STOP if chezmoi has any output other than success.
91
92## Update Octofriend config
93
94File: `~/.local/share/chezmoi/dot_config/octofriend/octofriend.json5`
95
96Update `models[]`. Each entry:
97
98```json
99{
100 "nickname": "<name>",
101 "baseUrl": "http://100.77.116.78:4000/v1",
102 "model": "<id>",
103 "context": <context_length>,
104 "apiEnvVar": "PLEXUS_API_KEY"
105}
106```
107
108Leave `diffApply` and `fixJson` objects unchanged.
109
110After editing: `chezmoi apply ~/.config/octofriend/octofriend.json5`
111STOP if chezmoi has any output other than success.
112
113## Update Pi config
114
115File: `~/.local/share/chezmoi/dot_config/pi/models.json`
116
117Update `providers.plexus.models[]`. Each entry:
118
119```json
120{
121 "id": "<id>",
122 "name": "<name>",
123 "reasoning": <true if "reasoning">,
124 "input": <["text"] or ["text", "image"]>,
125 "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
126 "contextWindow": <context_length>,
127 "maxTokens": <max_completion_tokens>,
128 "compat": {
129 "supportsReasoningEffort": <true if "reasoning">,
130 "supportsDeveloperRole": false
131 }
132}
133```
134
135After editing: `chezmoi apply ~/.config/pi/models.json`
136NEVER use `--force` with chezmoi apply. If it reports the file has changed since last write, STOP and inform the user — they may have local changes not yet added to chezmoi.