Skip to content

Fix OpenAI optional header casing in locale-sensitive environments#12578

Open
william-xue wants to merge 1 commit into
continuedev:mainfrom
william-xue:fix-openai-locale-headers
Open

Fix OpenAI optional header casing in locale-sensitive environments#12578
william-xue wants to merge 1 commit into
continuedev:mainfrom
william-xue:fix-openai-locale-headers

Conversation

@william-xue

@william-xue william-xue commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • explicitly disables optional OpenAI organization/project headers with lowercase keys
  • adds a regression test for the OpenAI adapter client options

Context

Fixes #12568. In Turkish locales, the OpenAI SDK's normalization of OpenAI-Organization/OpenAI-Project can produce dotless-i header names. Passing lowercase keys with undefined prevents the optional SDK headers from being injected/normalized for users who have not configured them.

Validation

  • npm test -- src/test/main.test.ts
  • npm run build

Summary by cubic

Explicitly disable optional OpenAI org/project headers to prevent locale-sensitive casing issues (e.g., Turkish dotless-i) that broke requests when those headers weren’t configured. This stabilizes OpenAI request handling in openai-adapters.

  • Bug Fixes
    • Set defaultHeaders with lowercase "openai-organization" and "openai-project" to undefined in OpenAIApi.
    • Added a regression test to ensure these headers stay disabled.

Written for commit 5ebdb79. Summary will update on new commits.

Review in cubic

@william-xue william-xue requested a review from a team as a code owner June 8, 2026 10:14
@william-xue william-xue requested review from sestinj and removed request for a team June 8, 2026 10:14
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 2 files

Re-trigger cubic

@william-xue

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

recheck

@william-xue william-xue force-pushed the fix-openai-locale-headers branch from 4d3cf9c to 5ebdb79 Compare June 11, 2026 02:28
@william-xue

Copy link
Copy Markdown
Author

Updated the commit author/committer to my GitHub noreply address so the CLA check can associate the commit with my GitHub account.

recheck

@william-xue

Copy link
Copy Markdown
Author

@continuedev maintainers: I updated the only PR commit so both author and committer now resolve to my GitHub account william-xue using the GitHub noreply email (20151622+william-xue@users.noreply.github.com). The CLA action still fails with the generic message "Committers ... have to sign the CLA" even after I posted the required CLA signature comment and recheck.

Could you please re-run/refresh the CLA assistant or advise if there is another required signature format?

@william-xue

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Turkish Locale Crash - Header name must be a valid HTTP token ["openaı-organization"]

1 participant