Skip to content

fix: validate agent request messages - #1

Merged
LobsterQBA merged 2 commits into
mainfrom
fix/validate-agent-request-message
Aug 25, 2026
Merged

fix: validate agent request messages#1
LobsterQBA merged 2 commits into
mainfrom
fix/validate-agent-request-message

Conversation

@LobsterQBA

Copy link
Copy Markdown
Owner

What changed

  • reject empty and oversized messages before they reach the agent loop
  • reject non-string message payloads instead of coercing them
  • add HTTP-level coverage for all invalid request cases

Why

The local API already limits body size, but an empty or malformed message could still create a meaningless agent turn. Validating the field keeps live-model calls and persisted traces useful.

Validation

  • uv run pytest -q (14 passed)
  • uv run ruff check .
  • git diff --check

@LobsterQBA
LobsterQBA marked this pull request as ready for review August 25, 2026 20:49
@LobsterQBA
LobsterQBA merged commit 352157c into main Aug 25, 2026
2 checks passed
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