-
-
Notifications
You must be signed in to change notification settings - Fork 2
bug: fallback DM message leaks '[AI model not configured]' prefix to players #719
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workinggame-engineGame mechanics/rulesGame mechanics/rulespriority:highShould fix soonShould fix soon
Description
Summary
When Azure OpenAI is unavailable, the POST /game/input endpoint returns a message with a visible [AI model not configured] prefix directly to players:
{"message": "[AI model not configured] You continue your journey."}This technical error marker is never stripped before the response is returned to the frontend, and would be shown verbatim in the game chat interface. Players see the system's internal configuration state rather than a graceful 'service unavailable' message.
Expected Behaviour
Either:
- Return HTTP 503 with
{"detail": "AI service unavailable"}so the frontend can show a user-friendly error, OR - Return a clearly flagged fallback that the frontend suppresses and replaces with a toast/banner
Actual Behaviour
HTTP 200 with raw [AI model not configured] in the player-visible message field.
Files
backend/app/agents/dungeon_master_agent.py— fallback response generationfrontend/src/components/GameInterface.tsx— no filtering of fallback messages
Related
- bug: Azure OpenAI not configured — all AI agent features return stubs in dev environment #714 — Azure OpenAI unconfigured
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggame-engineGame mechanics/rulesGame mechanics/rulespriority:highShould fix soonShould fix soon