Description
Every time cptr run is restarted, all previously configured Connections (including their encrypted API keys) become permanently unusable. Attempting to view, edit, verify, or even delete the affected connections triggers a 500 Internal Server Error, and the model list becomes empty ("沒有可用模型" / "No available models").
Steps to Reproduce
- Run
cptr run and complete initial setup.
- Go to Settings → Connections, add a new connection (e.g. Ollama,
http://<host>:11434), fill in API key, verify successfully, save.
- Confirm the model list populates correctly and the connection works as expected.
- Stop the process (Ctrl+C) and run
cptr run again.
- Open the same workspace. The model list is now empty.
- Open the previously working connection under Settings → Connections and click "Verify" or just reload the Connections page.
Expected Behavior
Connections and their encrypted credentials should persist across restarts, as long as the workspace directory (and its .cptr/ folder) has not been deleted.
Actual Behavior
- Model dropdown shows "No available models".
- Opening the connections list triggers backend errors.
- Server-side log shows:
Description
Every time
cptr runis restarted, all previously configured Connections (including their encrypted API keys) become permanently unusable. Attempting to view, edit, verify, or even delete the affected connections triggers a500 Internal Server Error, and the model list becomes empty ("沒有可用模型" / "No available models").Steps to Reproduce
cptr runand complete initial setup.http://<host>:11434), fill in API key, verify successfully, save.cptr runagain.Expected Behavior
Connections and their encrypted credentials should persist across restarts, as long as the workspace directory (and its
.cptr/folder) has not been deleted.Actual Behavior