Skip to content

tests: generate JSON request body in capture-raw-stream-sample.sh and use --data-binary#206

Merged
CJackHwang merged 1 commit intodevfrom
codex/fix-issues-from-pull-request-review
Apr 3, 2026
Merged

tests: generate JSON request body in capture-raw-stream-sample.sh and use --data-binary#206
CJackHwang merged 1 commit intodevfrom
codex/fix-issues-from-pull-request-review

Conversation

@CJackHwang
Copy link
Copy Markdown
Owner

Motivation

  • Avoid brittle shell JSON quoting when posting streaming chat requests and ensure the raw request body is sent exactly as generated to the local test server.

Description

  • Create REQUEST_BODY via an inline python3 helper that JSON-encodes the model, stream, and messages payload to avoid shell escaping issues.
  • Replace the inline -d JSON curl payload with --data-binary "${REQUEST_BODY}" so the request body is sent verbatim to the capture server.
  • Remove the previous curl || true fallback and rely on the direct curl invocation to produce the streamed output file for capture processing.

Testing

  • Ran the script tests/scripts/capture-raw-stream-sample.sh against the local test server and verified it produced openai.stream.sse, captures.json, and upstream.stream.sse files; the run completed successfully.

Codex Task

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Apr 3, 2026 5:07am

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@CJackHwang CJackHwang merged commit 6b32d84 into dev Apr 3, 2026
2 of 3 checks passed
@CJackHwang CJackHwang deleted the codex/fix-issues-from-pull-request-review branch April 3, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant