Skip to content

nginx.conf: /api/llm/ proxies to nonexistent service 'llm:8080' (should be orchestrator:8082); /api/orch/ proxy missing #2

Description

@agraham1975

Summary

frontend/nginx.conf contains two bugs affecting the LLM and command-center proxy routes in the production Docker setup.

Bug 1 — Wrong upstream for /api/llm/

# nginx.conf as-shipped
location /api/llm/ {
    proxy_pass http://llm:8080/;   # ← 'llm' service does not exist
}

There is no service named llm in docker-compose.yml, docker-compose.gpu-nvidia.yml, or docker-compose.gpu-amd.yml. The LLM proxy is the orchestrator, which runs on port 8082 under the service name orchestrator.

The Vite dev proxy already has this right:

// vite.config.js
'/api/llm': { target: 'http://localhost:8082' }  // orchestrator

Any user hitting localhost:3000 via the Docker nginx (not the Vite dev server) would get a 502 on every LLM request.

Bug 2 — /api/orch/ proxy block missing

The Vite dev proxy exposes /api/orch for the command-center dashboard (Plan #7):

'/api/orch': { target: 'http://localhost:8082' }

This route was never added to nginx.conf, so the dashboard cannot reach the orchestrator's /v1/catalog, /v1/state, and /v1/swap endpoints when running under Docker nginx.

Fix applied

frontend/nginx.conf updated:

# Fixed: correct service name and port
location /api/llm/ {
    proxy_pass http://orchestrator:8082/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_read_timeout 120s;
    proxy_buffering off;
    chunked_transfer_encoding on;
}

# Added: command-center dashboard routes
location /api/orch/ {
    proxy_pass http://orchestrator:8082/;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_read_timeout 120s;
    proxy_buffering off;
    chunked_transfer_encoding on;
}

The same fix is included in the new frontend/nginx.mac.conf (see issue #1).

Affected versions

All versions prior to this fix. The bug is present on Linux, WSL2, and macOS wherever the Docker nginx frontend is used.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions