Add OpenWebUI + LMStudio integration (CORS, docker compose, env-var host)#10
Open
offbyonebit wants to merge 2 commits into
Open
Add OpenWebUI + LMStudio integration (CORS, docker compose, env-var host)#10offbyonebit wants to merge 2 commits into
offbyonebit wants to merge 2 commits into
Conversation
…ding - server.py: add CORSMiddleware (allow_origins=["*"]) so browser-based clients like Open WebUI can call arc-llama from any origin - server.py: populate `created` from file mtime instead of hard-coded 0, so model pickers sort and display timestamps correctly - cli.py: `arc-llama serve` now reads ARC_LLAMA_HOST / ARC_LLAMA_PORT env vars, making it container-friendly without editing config.toml - docker-compose.yml: new file wiring arc-llama + Open WebUI together; `docker compose up` gives a working chat UI on http://localhost:3000 - README: add Open WebUI and LMStudio sections with bare-metal and compose quick-starts, including LMStudio upstream pattern https://claude.ai/code/session_016pwPb8iA8Ch62118zCNfyS
The runtime image installs python3 but not curl, so the compose healthcheck (and open-webui depends_on: service_healthy) would never pass. Switch to a python3 urllib probe. Also pin down CORS, GGUF mtime `created`, serve env vars, upstream add, and compose structure with unit tests.
offbyonebit
marked this pull request as ready for review
July 10, 2026 13:26
offbyonebit
force-pushed
the
claude/arc-optimized-openwebui-lmstudio-gwbpfd
branch
from
July 10, 2026 13:26
d197345 to
b1b891f
Compare
Owner
Author
|
Rebased onto current Conflicts: only Extra fix: compose healthcheck was Verified (automated + live local bind):
Not verified on this host: full |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server.py— without it, OpenWebUI (running in a browser) gets blocked by same-origin policy when calling arc-llama from a different portcreatedfield in/v1/modelsnow uses the GGUF file's mtime instead of0— model pickers in OpenWebUI sort and display timestamps correctlyARC_LLAMA_HOST/ARC_LLAMA_PORTenv vars onarc-llama serve— the container needs to bind to0.0.0.0, now possible without editingconfig.tomldocker-compose.yml— new file;docker compose upbrings up arc-llama + Open WebUI together, with GPU device passthrough and a shared network; chat UI athttp://localhost:3000Rebase note (2026-07-10)
Rebased onto current
main(9ebb2b8) and resolved theserver.pyimport conflict (kept agent/UploadFile/FileResponse imports from main; addedos+CORSMiddleware). Follow-up commit: compose healthcheck usespython3urllib instead ofcurl(runtime image has no curl —depends_on: service_healthywould otherwise hang forever). Unit tests intests/test_openwebui_integration.py.Test plan
docker compose upstarts both services; Open WebUI at:3000shows arc-llama models in the model pickerdocker composeplugin; GPU image build not exercised.arc-llama serve, configure Open WebUI with base URLhttp://127.0.0.1:11437/v1, models appearGET /v1/modelsreturnscreatedas a non-zero Unix timestamp for registered GGUFshttp://127.0.0.1:11437/v1/modelsfrom a different origin succeeds (CORS headers present)Origin: http://localhost:3000returnAccess-Control-Allow-Origin: *.ARC_LLAMA_HOST=0.0.0.0 arc-llama servebinds to all interfaces0.0.0.0:18765(LISTEN00000000:…in/proc/net/tcp).arc-llama upstream add lmstudio http://127.0.0.1:1234merges LMStudio models into the model list/v1/modelsmergesowned_by: upstream:lmstudiowhen upstream is configured (mocked LMStudio list).https://claude.ai/code/session_016pwPb8iA8Ch62118zCNfyS
Generated by Claude Code; rebased/verified by Grok