AI broker dashboard: /rpc 404 on every JSON-RPC call #129

Closed
opened 2026-05-13 05:19:44 +00:00 by zaelgohary · 2 comments
Member

Opening the AI broker dashboard (/hero_aibroker/ui/) produces a console wave of 11+ HTTP 404 errors:

Failed to load resource: 404 Not Found  http://127.0.0.1:9988/hero_aibroker/ui/rpc
Failed to load models: Error: Socket 'rpc.sock' not found for 'hero_aibroker' — daemon not running

Root cause

hero_router has a sibling-shortcut that rewrites POST /<svc>/ui/rpc into a call to <svc>/rpc.sock. The aibroker server stopped binding a top-level rpc.sock after the per-domain split — it now binds admin/rpc.sock, chat/rpc.sock, models/rpc.sock, etc. Hero_router can't find the top-level socket and 404s.

The dashboard's single rpc() JS helper calls methods spanning multiple namespaces (admin, models, chat, embedder, ai.*), so a flat alias to one sub-socket isn't enough.

Repro

  1. Open /hero_aibroker/ui/ in any browser.
  2. Open devtools → Console.
  3. Every pane (Models, Mothers, MCP, Logs, Activity, Catalog) emits 404 errors against /hero_aibroker/ui/rpc.

Expected

JSON-RPC calls reach the matching per-domain sub-socket and return a real result (or a clean JSON-RPC error envelope for unimplemented methods).

Opening the AI broker dashboard (`/hero_aibroker/ui/`) produces a console wave of 11+ HTTP 404 errors: ``` Failed to load resource: 404 Not Found http://127.0.0.1:9988/hero_aibroker/ui/rpc Failed to load models: Error: Socket 'rpc.sock' not found for 'hero_aibroker' — daemon not running ``` ## Root cause hero_router has a sibling-shortcut that rewrites `POST /<svc>/ui/rpc` into a call to `<svc>/rpc.sock`. The aibroker server stopped binding a top-level `rpc.sock` after the per-domain split — it now binds `admin/rpc.sock`, `chat/rpc.sock`, `models/rpc.sock`, etc. Hero_router can't find the top-level socket and 404s. The dashboard's single `rpc()` JS helper calls methods spanning multiple namespaces (admin, models, chat, embedder, ai.*), so a flat alias to one sub-socket isn't enough. ## Repro 1. Open `/hero_aibroker/ui/` in any browser. 2. Open devtools → Console. 3. Every pane (Models, Mothers, MCP, Logs, Activity, Catalog) emits 404 errors against `/hero_aibroker/ui/rpc`. ## Expected JSON-RPC calls reach the matching per-domain sub-socket and return a real result (or a clean JSON-RPC error envelope for unimplemented methods).
Author
Member

Fixed in 0d90081a27. Awaiting CI before closing.

Fixed in 0d90081a27. Awaiting CI before closing.
Author
Member

CI green on 0d90081a27 — closing.

CI green on 0d90081a27 — closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_aibroker#129
No description provided.