From c8974d9998487609301f13f85a19115c8ba17672 Mon Sep 17 00:00:00 2001 From: Atte149 Date: Fri, 19 Jun 2026 14:08:28 +0300 Subject: [PATCH] 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 --- AGENTS.md | 4 +++- README.md | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 6c36060..3abb624 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -44,7 +44,9 @@ systemd/ollama-proxy.service — systemd unit - **Перезапустить после правки аккаунтов:** `sudo systemctl restart ollama-proxy` (прокси читает accounts.json при старте; runtime-обновления не поддерживаются) - **Посмотреть логи:** `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/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 diff --git a/README.md b/README.md index 3b07927..1604045 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,15 @@ no_proxy=127.0.0.1,localhost,::1 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. ## Use with the `ollama` CLI