A direct connection writes the connection’s settings to the selected AI tool, and the tool calls that provider without passing through the OcHub gateway. It is the best way to get started.
Use this path when
- You are configuring OcHub for the first time.
- One tool should call one provider endpoint directly.
- You want to keep using the tool’s official account login.
If several tools should share routing, model aliases, or a backup upstream, use a model provider instead.
Add a connection
-
Choose an app. Open the tool you want to configure under Apps in the sidebar.
-
Open the editor. Select Add connection. If OcHub already discovered local configuration, edit the discovered entry instead of creating a duplicate.
-
Choose a starting point. Use a preset when one fits, or start blank. Give the connection a descriptive name such as “Work account” or “Backup endpoint.”
-
Enter connection details. Use the endpoint and key documented by the provider. The model provider editor handles
/v1itself; for a direct connection, rely on the generated file preview shown by the page. -
Check configuration. The footer action checks syntax and required fields. Supported network checks are in Advanced; a URL test does not verify account permission or a working model request.
-
Review candidate configuration. Open Config files and inspect the paths and fields. Final files are merged in the target environment.
-
Save a draft or apply. Save to OcHub retains a separate editing draft, including unfinished content. Choose Apply to app or Write to app when ready; saving alone changes neither the connection record nor the target files.
Add versus switch
| Action | Meaning |
|---|---|
| Add to tool | Add the connection to the tool configuration without necessarily making it current |
| Switch | Write or select the connection and make it current |
| Import | Open the target app and ask it to confirm an import, as with Cherry Studio |
| Remove from tool | Remove the live tool entry while keeping the connection in OcHub |
| Delete | Permanently remove the connection from OcHub |
After a successful switch, Current connection at the top of the page shows the new connection and its card is marked Current.
Verify the change
- Quit and reopen the target CLI so an existing process does not keep cached configuration.
- Send a short request.
- If it succeeds, refresh Usage in OcHub and look for the session or request record.
- If the tool still uses the old configuration, check whether its configured directory matches the actual installation.
Handle external edits
If another program changes the active connection files, OcHub shows a side-by-side diff during the next switch:
- Save as new version stores the current files in the active connection, then switches. Returning to it later restores this version.
- Revert to saved discards the current file edits, restores the saved version, then switches.
- Cancel changes neither the live files nor the saved connection.
For Codex, the dialog compares auth.json and config.toml separately and also
includes malformed auth.json text.
Roll back
The editor offers Undo this application only with a complete write receipt. It checks for later changes before restoring anything and refuses to overwrite conflicts. See edit, save, and apply.
- To use another connection, select Switch on its card.
- To restore the tool’s own account state, switch to an Official login provider.
- To stop OcHub from managing the tool, select Disable management in Settings → Apps and plugins. Disabling does not modify the tool’s current live configuration.

