OSIS API returns 404 through hero_proxy/hero_router (port 6666) #111

Open
opened 2026-04-12 15:23:24 +00:00 by mik-tf · 0 comments
Owner

Problem

The OSIS API is unreachable through the proxy layer at http://127.0.0.1:6666/hero_osis/ui/. Direct socket access works fine (hero_osis/ui.sock), but requests through hero_proxy on port 6666 return 404.

Impact

hero_agent uses OSIS_URL = http://127.0.0.1:6666/hero_osis/ui for conversation persistence. When OSIS returns 404:

  • User messages are not saved to conversation history
  • Conversation history loads as empty
  • The agent's LLM request has no user message (only system prompt)
  • Agent responds with a generic capability listing instead of executing tools

This was the root cause of #109.

Workaround Applied

Added a safety check in hero_agent/crates/hero_agent/src/agent.rs that ensures the current user message is always present in the messages vector, even when OSIS is unavailable. This makes the agent resilient to OSIS outages.

Root Fix Needed

hero_proxy/hero_router must correctly route /hero_osis/ui/* requests to the OSIS UI socket. The routing configuration or socket discovery for OSIS needs investigation.

Reproduction

# Direct socket works:
curl --unix-socket /root/hero/var/sockets/hero_osis/ui.sock http://localhost/
# Returns HTML ✓

# Proxy returns nothing/404:
curl http://127.0.0.1:6666/hero_osis/ui/
# Empty or 404 ✗

Signed-off-by: mik-tf

## Problem The OSIS API is unreachable through the proxy layer at `http://127.0.0.1:6666/hero_osis/ui/`. Direct socket access works fine (`hero_osis/ui.sock`), but requests through hero_proxy on port 6666 return 404. ## Impact hero_agent uses `OSIS_URL = http://127.0.0.1:6666/hero_osis/ui` for conversation persistence. When OSIS returns 404: - User messages are not saved to conversation history - Conversation history loads as empty - The agent's LLM request has no user message (only system prompt) - Agent responds with a generic capability listing instead of executing tools This was the root cause of https://forge.ourworld.tf/lhumina_code/home/issues/109. ## Workaround Applied Added a safety check in `hero_agent/crates/hero_agent/src/agent.rs` that ensures the current user message is always present in the messages vector, even when OSIS is unavailable. This makes the agent resilient to OSIS outages. ## Root Fix Needed hero_proxy/hero_router must correctly route `/hero_osis/ui/*` requests to the OSIS UI socket. The routing configuration or socket discovery for OSIS needs investigation. ## Reproduction ```bash # Direct socket works: curl --unix-socket /root/hero/var/sockets/hero_osis/ui.sock http://localhost/ # Returns HTML ✓ # Proxy returns nothing/404: curl http://127.0.0.1:6666/hero_osis/ui/ # Empty or 404 ✗ ``` Signed-off-by: mik-tf
Sign in to join this conversation.
No labels
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/home#111
No description provided.