Skip to content

Fix: sanitize LLM configuration errors in chat responses - #111

Open
vaishali824 wants to merge 1 commit into
INCF:mainfrom
vaishali824:fix/sanitize-llm-config-errors
Open

vaishali824 wants to merge 1 commit into
INCF:mainfrom
vaishali824:fix/sanitize-llm-config-errors

Conversation

@vaishali824

Copy link
Copy Markdown

Fixes #95

Summary

  • Add a dedicated LLMConfigurationError for missing LLM provider configuration.
  • Keep detailed configuration failures in server logs.
  • Return a generic administrator-facing message to chat users instead of exposing environment variable names or configuration details.
  • Add focused tests for Vertex project and API-key configuration failures.

Testing

  • uv run python -m unittest tests/test_llm_config_errors.py
  • 3 tests passed.

Add a dedicated configuration exception and return a generic administrator message for chat users while preserving server-side details in logs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug/Enhancement] Sensitive backend configuration errors are exposed directly to the end-user in the chat UI

1 participant