Skip to content

bug: fallback DM message leaks '[AI model not configured]' prefix to players #719

@Sealjay

Description

@Sealjay

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:

  1. Return HTTP 503 with {"detail": "AI service unavailable"} so the frontend can show a user-friendly error, OR
  2. 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 generation
  • frontend/src/components/GameInterface.tsx — no filtering of fallback messages

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggame-engineGame mechanics/rulespriority:highShould fix soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions