This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-26 18:02:10 -04:00
1 parent 43380c229b
commit 86350f8a73
2 files changed
+44 -2

No files matched your search

+8
View File
@@ -174,6 +174,14 @@ The default image includes Git and GitHub CLI (`gh`). Use `ghcr.io/open-webui/co
If you bind-mount a host directory to `/data`, make sure that directory is writable by the container user. SQLite needs to create and update `/data/app.db`, and host directory permissions take precedence over the image's built-in `/data` ownership.
To connect a host-running OpenCode server from Docker, start OpenCode on a host-reachable interface and set the OpenCode agent Server URL to the Docker host address:
```bash
opencode serve --hostname 0.0.0.0 --port 4096
```
Use `http://host.docker.internal:4096` on Docker Desktop. On Linux, add `--add-host=host.docker.internal:host-gateway` to `docker run` if that hostname is not already available.
The `:dev` image is also available and tracks the `main` branch.
## Air-gapped installation
+36 -2
View File
@@ -117,16 +117,49 @@ async def _run_probe(
async def detect_profile(profile: dict[str, Any]) -> AgentDetection:
raw_command = str(profile.get("command") or "").strip()
command = _resolve_command(raw_command)
if command is None and profile.get("agent") == "claude_code" and raw_command == "claude":
default_claude_command = profile.get("agent") == "claude_code" and raw_command == "claude"
if profile.get("agent") == "opencode" and str(profile.get("server_url") or "").strip():
version = None
if command is not None:
code, version_text = await _run_probe([command, "--version"])
version = version_text.splitlines()[0] if code == 0 and version_text else None
models = await _probe_opencode_models(command or raw_command or "opencode", profile)
if not models:
return AgentDetection(
"auth_unknown",
command,
version,
"Could not discover OpenCode models. Check connected OpenCode providers.",
[],
)
return AgentDetection("ready", command, version, None, models)
if command is None and default_claude_command:
command = _find_claude_desktop_command()
if command is None:
return AgentDetection("not_found", None, None, "Command not found")
code, version_text = await _run_probe([command, "--version"])
if code != 0 and default_claude_command:
desktop_command = _find_claude_desktop_command()
if desktop_command and desktop_command != command:
desktop_code, desktop_version_text = await _run_probe([desktop_command, "--version"])
if desktop_code == 0:
command = desktop_command
code = desktop_code
version_text = desktop_version_text
version = version_text.splitlines()[0] if code == 0 and version_text else None
if profile.get("agent") == "claude_code":
models = _claude_models_for_version(version)
if code != 0:
return AgentDetection(
"error",
command,
version,
version_text or "Failed to run Claude Code health check.",
models,
)
if importlib.util.find_spec("claude_agent_sdk") is None:
return AgentDetection(
"missing_dependency",
@@ -585,10 +618,11 @@ async def get_agent_status(app_state=None, refresh: bool = False) -> dict[str, A
and (mode != "auto" or detected.status == "ready")
)
effective_profile = dict(profile)
resolved_profile_command = _resolve_command(str(profile.get("command") or ""))
if (
detected.command
and profile.get("agent") == "claude_code"
and _resolve_command(str(profile.get("command") or "")) is None
and detected.command != resolved_profile_command
):
effective_profile["command"] = detected.command
effective_profile["models"] = models