Skip to content

[Platform] Validate empty input in OpenAI Responses normalizer#2303

Closed
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:openresponses-empty-input-validation
Closed

[Platform] Validate empty input in OpenAI Responses normalizer#2303
chr-hertel wants to merge 1 commit into
symfony:mainfrom
chr-hertel:openresponses-empty-input-validation

Conversation

@chr-hertel

Copy link
Copy Markdown
Member
Q A
Bug fix? no
New feature? yes
Docs? no
Issues -
License MIT

When a MessageBag produces no input for the OpenAI Responses API (e.g. only a system message, which maps to instructions), the request was sent anyway and rejected by the provider with an opaque 400 ("One of input / previous_response_id / prompt / conversation_id must be provided").

MessageBagNormalizer now fails fast with a clear InvalidArgumentException in that case, unless the caller supplies an alternative input via the previous_response_id, prompt or conversation_id option (so legitimate continuation calls still pass). Covered by unit tests for both the throwing case and the three alternative-input options.

@chr-hertel chr-hertel requested a review from OskarStark as a code owner July 11, 2026 20:11
@carsonbot carsonbot added Status: Needs Review Feature New feature Platform Issues & PRs about the AI Platform component labels Jul 11, 2026
@chr-hertel chr-hertel closed this Jul 11, 2026
@chr-hertel chr-hertel deleted the openresponses-empty-input-validation branch July 11, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature Platform Issues & PRs about the AI Platform component Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants