Skip to content

Fix #579: Include language in single-message mode payload for correct LLM responses

David FORDEN requested to merge sprint-21-bug-fixes into main

When CONTEXT_OPTION=single-message, the frontend omitted the language from the payload and the backend stripped all context before forwarding to OPEA. This caused the ChatQnA service to lose the user's language preference, skip the English-only system prompt guard, and let the LLM respond in Spanish due to model bias.

Also fixes three crash points in genieai_chatqna.py where full_chat_history was assumed to be a list of dicts but is a plain string in single-message mode.

Closes #579 (closed)

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Merge request reports

Loading