docs: document openlama launcher and NO_PROXY requirement

- openlama wrapper at ~/.local/bin/openlama sets NO_PROXY and execs opencode
- Documents that opencode does not auto-fetch /v1/models (models must be listed)
- Documents the NO_PROXY fix for Bun runtime + HTTP_PROXY conflict
This commit is contained in:
Atte149 2026-06-19 14:08:28 +03:00
parent 3963eede70
commit c8974d9998
2 changed files with 12 additions and 1 deletions

View file

@ -44,7 +44,9 @@ systemd/ollama-proxy.service — systemd unit
- **Перезапустить после правки аккаунтов:** `sudo systemctl restart ollama-proxy` (прокси читает accounts.json при старте; runtime-обновления не поддерживаются) - **Перезапустить после правки аккаунтов:** `sudo systemctl restart ollama-proxy` (прокси читает accounts.json при старте; runtime-обновления не поддерживаются)
- **Посмотреть логи:** `journalctl -u ollama-proxy -f` — JSON-структурированные (account, account_id, path, status, latency_ms, stream) - **Посмотреть логи:** `journalctl -u ollama-proxy -f` — JSON-структурированные (account, account_id, path, status, latency_ms, stream)
- **Проверить, что прокси жив:** `curl http://127.0.0.1:11435/api/version` → должен вернуть JSON от ollama.com - **Проверить, что прокси жив:** `curl http://127.0.0.1:11435/api/version` → должен вернуть JSON от ollama.com
- **Проверить список моделей:** `curl http://127.0.0.1:11435/v1/models | jq '.data | length'` (~36 моделей) - **Проверить список моделей:** `curl http://127.0.0.1:11435/v1/models | jq '.data | length'` (~35 моделей)
- **Запустить opencode с пулом:** `openlama` (обёртка в `~/.local/bin/openlama`, выставляет NO_PROXY и запускает opencode)
- **Обновить список моделей в opencode-конфиге:** `curl -sS http://127.0.0.1:11435/v1/models | jq -r '.data[].id'` → обновить `models` блок в `~/.config/opencode/opencode.json`
## Интеграция с opencode ## Интеграция с opencode

View file

@ -99,6 +99,15 @@ no_proxy=127.0.0.1,localhost,::1
Or launch opencode with `NO_PROXY=127.0.0.1,localhost opencode`. Or launch opencode with `NO_PROXY=127.0.0.1,localhost opencode`.
### `openlama` launcher
A convenience wrapper is installed at `~/.local/bin/openlama`. It sets `NO_PROXY`/`no_proxy` for localhost, tries to start `ollama-proxy` if it's down, and execs `opencode` with all forwarded args:
```sh
openlama # TUI with ocp available as a provider
openlama run -m ocp/gpt-oss:120b "hello" # non-interactive, specific model
```
Run `/models` in the OpenCode TUI to pick a model from the pool, then chat as usual. Run `/models` in the OpenCode TUI to pick a model from the pool, then chat as usual.
## Use with the `ollama` CLI ## Use with the `ollama` CLI