Skip to content

Add OpenWebUI + LMStudio integration (CORS, docker compose, env-var host)#10

Draft
offbyonebit wants to merge 1 commit into
mainfrom
claude/arc-optimized-openwebui-lmstudio-gwbpfd
Draft

Add OpenWebUI + LMStudio integration (CORS, docker compose, env-var host)#10
offbyonebit wants to merge 1 commit into
mainfrom
claude/arc-optimized-openwebui-lmstudio-gwbpfd

Conversation

@offbyonebit

Copy link
Copy Markdown
Owner

Summary

  • CORS middleware added to server.py — without it, OpenWebUI (running in a browser) gets blocked by same-origin policy when calling arc-llama from a different port
  • created field in /v1/models now uses the GGUF file's mtime instead of 0 — model pickers in OpenWebUI sort and display timestamps correctly
  • ARC_LLAMA_HOST / ARC_LLAMA_PORT env vars on arc-llama serve — the container needs to bind to 0.0.0.0, now possible without editing config.toml
  • docker-compose.yml — new file; docker compose up brings up arc-llama + Open WebUI together, with GPU device passthrough and a shared network; chat UI at http://localhost:3000
  • README — new Open WebUI and LMStudio sections covering both the compose path and bare-metal configuration

Test plan

  • docker compose up starts both services; Open WebUI at :3000 shows arc-llama models in the model picker
  • Bare-metal: arc-llama serve, configure Open WebUI with base URL http://127.0.0.1:11437/v1, models appear
  • GET /v1/models returns created as a non-zero Unix timestamp for registered GGUFs
  • Browser fetch to http://127.0.0.1:11437/v1/models from a different origin succeeds (CORS headers present)
  • ARC_LLAMA_HOST=0.0.0.0 arc-llama serve binds to all interfaces
  • arc-llama upstream add lmstudio http://127.0.0.1:1234 merges LMStudio models into the model list

https://claude.ai/code/session_016pwPb8iA8Ch62118zCNfyS


Generated by Claude Code

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants