Repository navigation
fix(openai): close privacy and SDK lifecycle release blockers - #571
Merged
Merged
Conversation
Project legacy transport data, mask opaque privacy copies, preserve stream cleanup and cancellation, and track TypeScript SDK patch ownership by class. Require the repaired core candidate and pin regressions across supported SDK floors and latest versions. Co-Authored-By: Claude Code <[email protected]>
Keep structured-message privacy with native processors while masking opaque copies. Validate cancellation on Python 3.10, update dependent privacy assertions, install the candidate core in distribution jobs, and keep its version markers consistent. Co-Authored-By: Claude Code <[email protected]>
Emit typed vLLM multimodal attributes without mutating requests and accept validated legacy stream usage mappings. Share TypeScript patch ownership across public CJS/ESM entry points. Verify HTTP exporter timeouts at the requests send boundary instead of private OTel fields. Add SDK floor/latest privacy and accounting regressions, mixed public-import packed-consumer ownership tests, and timeout environment-precedence coverage. Co-Authored-By: Claude Code <[email protected]>
No source changes. Refresh the stale pull request ref so current-head checks cover the already reviewed branch. Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
Retain fail-closed opaque and lazy input guards while core validates and masks passive multimodal chat data. Route Fireworks granular input through the supported FI span setter and preserve permitted text/image modalities. Add malformed, forged, serializer, OTLP and compatibility regressions. Co-Authored-By: Claude Code <[email protected]>
Expose ChatInput through config without eagerly importing a new module when pytest collects the repository package alongside an older installed core. Preserve the core masking contract and add a mixed-package import regression; unchanged published recipe contracts also pass. Co-Authored-By: Claude Code <[email protected]>
Redact validated string leaves before raw and flattened projections, retain independently permitted invocation metadata, normalize exact SDK omissions lazily, accept case-insensitive image schemes, and enforce shared text-list copy limits. Co-Authored-By: Claude Code <[email protected]>
Keep both timeout test sets in test_batch_span_processor_tuning.py. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… PII/base64 gaps - Convert OpenAI SDK message models to the plain JSON the SDK sends before core projection, so tool-loop conversations keep permitted telemetry. - PII-only capture falls back to the established redacted-copy path when core cannot project the input, instead of erasing it. - Keep independently permitted invocation parameters whenever message projection fails, not only under hide_input_messages. - Redact PII in dict keys before JSON escaping. - Match the data URL base64 marker case-insensitively. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…daction Drop the legacy-copy fallback for pii_redaction-only input that core cannot project: it evaluated hostile and lazy values. SDK message models are already converted to plain JSON first, so the tool-loop case still projects; anything core rejects stays redacted, with typed invocation parameters kept independently. Convert only genuine openai.* SDK models, using pydantic's own model_dump rather than any override. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Classify SDK models by type MRO only, so no isinstance, metaclass or instance hooks run on caller objects under any privacy flag. - Skip conversion when inputs (or messages) are hidden, call pydantic's model_dump with warnings off, and stop at the same 10000-node budget as core, returning the original value so it fails closed. - Convert exact-int dict keys to strings, as the SDK does on the wire, so int-keyed logit_bias keeps pii_redaction telemetry. - DeepSeek CI: ubuntu-26.04 sudo ignores -E; pass the needed variables explicitly with --preserve-env. Known limitation (fail-closed, no leak): under pii_redaction alone, a str-Enum role, float-subclass parameter or OrderedDict message still makes core reject the input projection. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Classify canonical OpenAI models by raw type dictionaries and identity-only MRO scans; accept only the exact class exported by its already-loaded openai.* module. Copy only exact str/int keys and fail closed for other key types, avoiding caller hashing/equality hooks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ation Replace remaining tuple membership checks on caller-derived types with identity comparisons in ChatInput and the Fireworks wrapper. This keeps metaclass __eq__ hooks from running before core's passive validation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Read type MRO, namespace, and name through native type descriptors; compare MRO entries by identity and require the class exported by its already-loaded OpenAI module. This avoids custom metaclass equality, descriptors, and class attribute hooks. Copy only exact string/integer dict keys; reject other keys without rehashing them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ParsedChatCompletionMessage[T] is a runtime pydantic parametrization that its module does not export, so the exported-class check rejected it and the input failed closed. Also accept a parametrization whose recorded generic origin is an exported OpenAI class in its own MRO, using identity checks only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
nik13
added a commit
that referenced
this pull request
Nov 5, 2026
Keep #571's openai pyproject.toml/poetry.lock (fi-instrumentation-otel >=1.2.3). The resulting tree equals the combined #571+#562 integration tree that qualified in E2B (4,740 passed, 0 failed). Co-Authored-By: Claude Opus 5.5 <[email protected]>
nik13
added a commit
that referenced
this pull request
Nov 5, 2026
) OpenAI Responses: preserve MCP results in mixed text+MCP outputs (streaming and non-streaming), with the Parallel framework repair. Independently verified earlier; combined #571+#562 integration proof QUALIFIED at this exact tree (6503256, 4,740 passed, 0 failed, source core 1.2.3). Missing GitHub approval overridden by the repository admin's authorization; current-head CI and source gates enforced. No package publication implied. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 5, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Python modality correction (2026-11-05)
Final correction head
4aebaaad2a823c2404d3d51ea4a5ee073a332346, tree919f4247d185fccdc0bd78f83221f328009f1366. The normal push follows this metadata update so the resulting head receives one uninterrupted CI cycle. The existing branch now includes a normal merge of currentdev, followed by the scoped Python core/Fireworks correction. Exact-head CI is being observed; no merge or release was performed. The older qualification details below are historical, not the current gate.Privacy contract
ChatInputrepresentation (imported fromfi_instrumentation.instrumentation.config) is accepted only at the exact input keys. Core validates and copies passive built-in data, applies modality policy, then serializes. It never accepts a boolean/trusted-string bypass, parses opaque JSON, or invokes custom mappings, serializers, iterators or callable values.Fresh cloud evidence
All installation/build/test execution used four serial disposable E2B sandboxes, synthetic provider HTTP and actual protobuf OTLP. All were killed and verified absent; no local tests or real-provider certification.
The first pushed head exposed a new mixed-package import regression: pytest collecting the repository's
pythonpackage alongside installed older core tried to eagerly import the new module from that older core. The final follow-up removes that eager top-level export (the API remains in core config), adds a collection regression, and repeats the full candidate matrix. The exact import failure was reproduced with published core 1.1.0; the corrected import and all 111 unchanged Lepton published-recipe tests pass with OpenAI 3.24.0 / traceAI-openai 0.1.10. One external recipe replay initially omitted its explicit httpx harness dependency; that collection error and the corrected pass are both retained. No test assertions or dependency floors were weakened.The earlier PR body edit automatically restarted its Python workflow because this repository listens for
pull_request.edited; that cancelled old run is not a product failure or a green gate. This final metadata update occurs before the final push to avoid repeating that interruption on the resulting head.All six original and four follow-up repairs remain intact. OpenAI/vLLM/TypeScript implementation trees were not changed by this correction. PR #562 response-accumulator work was neither edited nor merged here; combined-tree qualification remains separate.
Qualification status
Do not merge on the older green checks. The repaired branch tip is
d00a71f2786dd3c2b27ebabe582546f5f20a8c61, but GitHub currently reports PR #571 /refs/pull/571/headasfb04aede7c8cb7e4caea668e8d7f540fc78c8dc8. No workflow runs or check runs are registered ford00a71f2. The PR head must synchronize and CI must validate that exact head before merge. Nothing was merged or released.The existing branch and PR were reused. All six assigned findings were independently reproduced against the original implementations, and the existing repairs were requalified in fresh E2B sandboxes. No additional implementation change was needed in this pass.
What was wrong and the fixes
input.valueincluded arbitrary request kwargs, including Authorization headers. Telemetry now allowlists semantic request fields; headers, extra query/body fields and other transport options never enter it. The SDK receives the original request unchanged.Required release ordering
This includes the fi-instrumentation-otel 1.2.3 candidate. Both Python integrations require >=1.2.3 and Python >=3.10. The repaired core must be published before the integrations in the later authorized release process. Dev-only local core dependencies are excluded from installed wheel requirements. This qualification does not publish packages, change release workflows or merge dev to main.
Fresh E2B evidence for d00a71f
Every test ran in disposable cloud sandboxes with synthetic credentials, mock providers/loopback servers and in-memory/loopback exporters. No real provider certification is claimed.
rel-openai-fix-r1-recheck-baseline-1125: swapped the three original implementation files into the candidate test environment. Those implementations are unchanged on current dev. Original HTTP probes fail on both OpenAI 1.69.0 and 3.45.0: 5 failed / 2 passed, showing credential leakage, raw-content leakage, context-manager failure and a missing cancelled span. The committed legacy regressions on 1.0.0 fail 16 tests, including both streamed-usage tests. Packed mixed-import controls fail 2 tests / 2 pass at npm SDK 4.0.0 and 7.50.0; the ESM-only control passes.rel-openai-fix-r1-recheck-final-1125:pip check.rel-openai-fix-r1-recheck-core-py310-1125: isolated core with OTel 1.45.2 and normal pytest collection: 828 passed / 6 skipped. Python 3.10 / OpenAI 1.0.0: 117 legacy package tests + 6 HTTP probes passed, pluspip check.The prior private-OTel-
_timeoutassertions were replaced with requests send-boundary assertions in the existing repair commit; the current core suite passes. The fresh evidence also retains harness failures rather than hiding them:recheck-current-1125omitted the tests'httpxdependency;recheck-current-r2-1125omitted the cross-package Parallel README fixture. The final combined run passed every integration/consumer suite but failed core collection under forced--import-mode=importlib; isolated core with its normal collection passed all 828 tests. These were corrected in the external test staging, without modifying repository code.All five fresh E2B sandboxes were destroyed and their deletion verified. Current-head GitHub CI remains an external qualification gate; older-head successes are not counted for
d00a71f2.Competitor comparison
Reviewed public documentation/source, not live competitor benchmarks:
🤖 Generated with Claude Code