Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

providers-opencode.md

62 lines3.3 KB

1# OpenCode
2​
3T3 Code uses the OpenCode setup on the connected environment. With a remote environment, its
4OpenCode login and configuration apply, not the setup on your desktop or phone.
5​
6T3 Code requires OpenCode 1.14.19 or newer. It checks the server version before it loads models or
7starts work. If the check fails, update OpenCode or fix the server URL and password, then refresh
8the provider status. Reconnecting the client also runs the check again.
9​
10## Server authentication
11​
12Without a server URL, T3 Code starts a local OpenCode server. The process inherits
13`OPENCODE_SERVER_PASSWORD` from the environment. A password in the provider settings overrides
14that environment value for both the local process and T3 Code.
15​
16With a server URL, T3 Code connects to that external server and uses only the password in the
17provider settings. It does not send a local `OPENCODE_SERVER_PASSWORD` to an external server.
18OpenCode uses this password for HTTP Basic authentication.
19​
20## Stop a turn
21​
22When you select **Stop**, T3 Code stops the main OpenCode session and all nested child sessions.
23T3 Code waits for this cleanup before it marks the turn as stopped or sends the next prompt. It
24does not stop unrelated OpenCode sessions.
25​
26Stop reports an error if OpenCode cannot list or stop a child session. When T3 Code closes an
27OpenCode session, it also tries to stop the child sessions, but this teardown is best effort.
28​
29## Refresh the model list
30​
31T3 Code loads the model list when an enabled OpenCode provider starts and keeps the list in its
32cache. Reconnecting a client or using a refresh control asks OpenCode for the list again. The
33periodic provider health setting does not refresh OpenCode's catalog.
34​
35After changing an OpenCode login or configuration outside T3 Code, open **Settings > Providers**,
36select the environment, and choose **Refresh provider status**. Changing the provider's
37configuration in T3 Code also replaces that provider connection.
38​
39On mobile, open the thread settings and select **Refresh models**. The control stays disabled while
40the refresh runs and shows an error if the refresh fails.
41​
42OpenCode reads credential changes on each model-list request. Native OpenCode configuration files
43can stay cached while the local helper is running. The helper closes after 30 seconds with no
44model-list or text-generation work. Refresh after that idle period to start a new helper and read
45the file changes. Repeated refreshes or active helper work can extend this wait.
46​
47T3 Code does not own an external OpenCode server. Native configuration changes on that server can
48require its own reload or restart before a refresh returns the new list.
49​
50If a refresh fails, T3 Code keeps the last known models, slash commands, and skills. Fix the
51connection, then refresh again. A successful refresh can remove entries that OpenCode no longer
52offers.
53​
54## Continue an existing thread
55​
56An existing thread keeps its selected model and options when that model is temporarily absent
57from the catalog. The web picker shows an **Unavailable** row and keeps saved option values visible
58until the model metadata returns. T3 Code does not switch the thread to the first model in the
59list.
60​
61The stored selection does not guarantee that OpenCode can still run the model. If the provider
62rejects it, select an available model before trying again.