Skip to content

fix(openai): extract nested Responses message text - #571

Merged
Seth Juarez (sethjuarez) merged 3 commits into
mainfrom
sethjuarez/fix-python-release-shell
Oct 16, 2026
Merged

Seth Juarez (sethjuarez) merged 3 commits into
mainfrom
sethjuarez/fix-python-release-shell

Conversation

@sethjuarez

@sethjuarez Seth Juarez (sethjuarez) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add shared conformance vectors for completed OpenAI Responses payloads where top-level output_text is missing or empty
  • update OpenAI Responses processors to fall back to nested response.output[].content[].text output_text parts across affected runtimes
  • keep portable assistant-message reconstruction aligned in Rust and Java
  • include the Python release-script shell hardening from blocked fix: avoid shell interpretation in release tooling #502 in this same PR

Validation

  • cargo test -p prompty-openai responses_empty_output_text_message_content_fallback
  • cargo test -p prompty-openai responses_portable_assistant_messages_use_message_content_fallback
  • cargo test -p prompty test_processor_process_responses_empty_output_text_message_content_fallback
  • go test ./model -run 'Test(OpenAIResponsesEmptyOutputTextFallsBackToMessageContent|ProcessorProcessResponsesEmptyOutputTextMessageContentFallback)'
  • npm test --workspace @prompty/openai -- -t 'falls back to message content'
  • npm test --workspace @prompty/core -- -t responses_empty_output_text_message_content_fallback
  • uv run pytest tests\model\test_processor_conformance.py -k 'responses_empty_output_text_message_content_fallback or responses_message_content_fallback' -q
  • dotnet test Prompty.Core.Tests\Prompty.Core.Tests.csproj --filter "FullyQualifiedName~ResponsesEmptyOutputTextMessageContentFallback" --no-restore
  • runtime\java\gradlew.bat :prompty-openai:test --tests "com.microsoft.prompty.openai.ProcessVectorsTest" --no-daemon
  • swift test --filter PipelineRuntimeTests/testOpenAIResponsesEmptyOutputTextFallsBackToMessageContent
  • swift test --filter ProcessorConformanceTests/testVector19ProcessorProcessResponsesEmptyOutputTextMessageContentFallback
  • python -m py_compile runtime\python\prompty\scripts\release.py
  • $env:PYTHONIOENCODING='utf-8'; python runtime\python\prompty\scripts\release.py --dry-run
  • git diff --check

Live OpenAI RAPI testing reproduced the missing top-level output_text shape and confirmed the fixed processor extracts nested final assistant text.

Replaces #502.

Run release git commands with argv lists so tag/version values are not interpreted by a shell.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 497512b4-8e78-461b-9e96-8e9af3fdb03c
Fall back to completed Responses message content when the top-level output_text convenience field is missing or empty.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 497512b4-8e78-461b-9e96-8e9af3fdb03c
@sethjuarez
Seth Juarez (sethjuarez) force-pushed the sethjuarez/fix-python-release-shell branch from 7b69b30 to 8ddc2b5 Compare October 16, 2026 04:47
@sethjuarez Seth Juarez (sethjuarez) changed the title fix(python): avoid shell release commands fix(openai): extract nested Responses message text Oct 16, 2026
Format the generated Responses fallback conformance assertion so CI ruff format passes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 497512b4-8e78-461b-9e96-8e9af3fdb03c
@sethjuarez
Seth Juarez (sethjuarez) merged commit 9369929 into main Oct 16, 2026
35 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