Skip to content

fix: keep Python SDK diagnostics metadata-only - #3685

Merged
apcha-oai merged 3 commits into
mainfrom
apcha/sdk-log-metadata
Aug 19, 2026
Merged

fix: keep Python SDK diagnostics metadata-only#3685
apcha-oai merged 3 commits into
mainfrom
apcha/sdk-log-metadata

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Troubleshooting logs should help identify request failures without retaining the data applications send or receive. This change keeps request, retry, status, and WebSocket size information while limiting SDK diagnostics to metadata. Request delivery, response parsing, and error handling are unchanged.

The SDK logging setting now controls SDK logs without changing application-configured HTTP transport logging.

@apcha-oai
apcha-oai requested a review from a team as a code owner August 19, 2026 20:28
@openai-sdks

openai-sdks Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 10.7s for Python SDK PR #3685.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 181ms
tests/chat-completions-create.test.ts ✅ Passed 227ms
tests/chat-completions-stream.test.ts ✅ Passed 124ms
tests/files-content-binary.test.ts ✅ Passed 181ms
tests/files-create-multipart.test.ts ✅ Passed 191ms
tests/files-list-pagination.test.ts ✅ Passed 150ms
tests/initialize-config.test.ts ✅ Passed 153ms
tests/instance-isolation.test.ts ✅ Passed 167ms
tests/models-list.test.ts ✅ Passed 122ms
tests/responses-background-lifecycle.test.ts ✅ Passed 199ms
tests/responses-body-method-errors.test.ts ✅ Passed 305ms
tests/responses-cancel-timeout.test.ts ✅ Passed 188ms
tests/responses-cancel.test.ts ✅ Passed 207ms
tests/responses-compact-retries.test.ts ✅ Passed 253ms
tests/responses-compact.test.ts ✅ Passed 321ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 127ms
tests/responses-create-advanced.test.ts ✅ Passed 233ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.211s
tests/responses-create-errors.test.ts ✅ Passed 193ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 227ms
tests/responses-create-retries.test.ts ✅ Passed 262ms
tests/responses-create-stream-failures.test.ts ✅ Passed 125ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 242ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.61s
tests/responses-create-stream.test.ts ✅ Passed 76ms
tests/responses-create-terminal-states.test.ts ✅ Passed 212ms
tests/responses-create-timeout.test.ts ✅ Passed 193ms
tests/responses-create.test.ts ✅ Passed 226ms
tests/responses-delete.test.ts ✅ Passed 242ms
tests/responses-input-items-errors.test.ts ✅ Passed 376ms
tests/responses-input-items-list.test.ts ✅ Passed 312ms
tests/responses-input-items-options.test.ts ✅ Passed 347ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 230ms
tests/responses-input-tokens-count.test.ts ✅ Passed 337ms
tests/responses-malformed-inputs.test.ts ✅ Passed 2.7s
tests/responses-not-found-errors.test.ts ✅ Passed 265ms
tests/responses-parse.test.ts ✅ Passed 361ms
tests/responses-retrieve-retries.test.ts ✅ Passed 375ms
tests/responses-retrieve.test.ts ✅ Passed 307ms
tests/responses-stored-method-errors.test.ts ✅ Passed 517ms
tests/retry-behavior.test.ts ✅ Passed 3.02s
tests/sdk-error-shape.test.ts ✅ Passed 249ms

View OkTest run #32299825646

SDK merge (158a91686155) · head (cf244da51203) · base (1fc0a217047c) · OkTest (2b1bdfd25e98)

Comment thread tests/test_debug_logging.py Fixed
@apcha-oai
apcha-oai enabled auto-merge August 19, 2026 20:33

@jbeckwith-oai jbeckwith-oai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent two-pass security review confirms HTTP, response, retry, streaming, and realtime diagnostics are metadata-only across sync and async clients. Sensitive payloads stay out of SDK and transport logs while public exception-body access, request identifiers, status metadata, and application-controlled logging remain intact. The matching private generator coordination has also been independently reviewed and approved. CI is green and previous test feedback is fixed.

@apcha-oai
apcha-oai added this pull request to the merge queue Aug 19, 2026
Merged via the queue into main with commit 600aa8d Aug 19, 2026
21 checks passed
@apcha-oai
apcha-oai deleted the apcha/sdk-log-metadata branch August 19, 2026 20:58
@openai-sdks openai-sdks Bot mentioned this pull request Aug 19, 2026
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.

2 participants