Skip to content

fix(openai): Fix wrapOpenAI breaking native private fields of client#1704

Merged
Luca Forstner (lforst) merged 4 commits intomainfrom
lforst/fix-build-request
Mar 31, 2026
Merged

fix(openai): Fix wrapOpenAI breaking native private fields of client#1704
Luca Forstner (lforst) merged 4 commits intomainfrom
lforst/fix-build-request

Conversation

@lforst
Copy link
Copy Markdown
Member

@lforst Luca Forstner (lforst) commented Mar 30, 2026

Aims to address #1693

  • Adds regression tests
  • Adds a more robust method of returning the accessed functions

Please see comments in code for further explanation.

We didn't chose the original approach the referenced issue takes (Reflect.get(..., target)) because it doesn't work since this is still the proxied instance.

@lforst Luca Forstner (lforst) marked this pull request as draft March 30, 2026 11:32

for (const scenario of openaiScenarios) {
const assertPrivateFieldMethodsOperation =
scenario.snapshotName === "openai-v6";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: we should probably check scenario.version instead, as v7 of openai will have the same issue.

@lforst Luca Forstner (lforst) merged commit bfebb26 into main Mar 31, 2026
45 checks passed
@lforst Luca Forstner (lforst) deleted the lforst/fix-build-request branch March 31, 2026 15:30
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