Skip to content

fix: reject blank chat messages - #7

Open
attainWei wants to merge 1 commit into
congde:mainfrom
attainWei:codex/book-v1-empty-message
Open

fix: reject blank chat messages#7
attainWei wants to merge 1 commit into
congde:mainfrom
attainWei:codex/book-v1-empty-message

Conversation

@attainWei

Copy link
Copy Markdown

Summary

  • reject messages containing only whitespace at the active backend request model
  • add focused Pydantic validation tests
  • preserve surrounding whitespace for valid messages

Verification

  • .venv\Scripts\python.exe -m pytest backend\tests\unit\test_chat_request_validation.py -q: 4 passed
  • python -m py_compile backend/models.py
  • git diff --check

Scope

This is a companion example for the Codex book manuscript. Full application and integration regression suites were not run.

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.

1 participant