Repository navigation
Description
Before submitting your bug report
- I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows (with Turkish locale / tr-TR)
- Continue version: Latest
- IDE version: Android Studio Panda 1 / VS Code
- Model: OpenAI: gpt-oss-120b (free) via OpenRouter
- config:
models:
- name: "OpenAI: gpt-oss-120b (free)"
provider: openrouter
model: openai/gpt-oss-120b:free
apiKey: "sk-or-v1-..."Description
Bug Description
When using Continue on a Turkish Windows/OS environment with third-party OpenAI-compatible providers (like OpenRouter or SiliconFlow), the extension crashes instantly with the following error:
TypeError: Header name must be a valid HTTP token ["openaı-organization"]
Root Cause
The underlying openai-node SDK normalizes technical headers using a native .toLowerCase() call, which converts "OpenAI-Organization" to "openaı-organization" (with a dotless ı) under Turkish language rules.
Linked Upstream Bugs
This crash is caused by lack of locale-invariance in upstream OpenAI SDKs:
- OpenAI Node SDK Issue: Bug: TypeError: Header name must be a valid HTTP token ["openaı-organization"] on Turkish Windows/Locale openai/openai-node#1928
- OpenAI Java SDK Issue: Bug: Turkish Locale - Potential Header/Key resolution failure due to case-insensitive TreeMap serialization openai/openai-java#755
🛠️ Temporary Workaround for Affected Users
Until this is officially patched, you can fix it manually in your IDE.
For VS Code users:
- Open the Continue extension bundle file located at:
C:\Users\<YourUsername>\.vscode\extensions\continue.continue-<version>\dist\extension.js - Search for
"OpenAI-Organization"and"OpenAI-Project". - Replace them entirely with strict lowercase strings:
"openai-organization"and"openai-project". - Save the file and restart the IDE. This completely bypasses the runtime crash.
Note for Android Studio / JetBrains users: This manual source modification workaround is not applicable/effective for the .jar files in Android Studio (C:\Users\<YourUsername>\AppData\Roaming\Google\AndroidStudio<Version>\plugins\continue-intellij-extension\lib\) because the codebase is bundled in a binary compiled format.
Suggested Fix for Continue Team
Continue can insulate its environment from this upstream bug by ensuring that the Core Server node processes are explicitly spawned with a locale-invariant environment flag (e.g., forcing LANG=en_US.UTF-8 on process spawn) so third-party npm packages never fallback to Turkish casing rules.
Suggested Fixes for Continue Team
Continue can easily isolate and resolve this upstream serialization bug at the codebase level. Here are the two definitive methods to handle the fix within the repository:
Method 1: Intercept and Neutralize Headers in core/llm/llms/OpenAI.ts
The Continue team can directly inject a header-sanitization layer inside the _getHeaders() method around in core/llm/llms/OpenAI.ts (Line 378). By enforcing explicit lowercased fallback keys when using third-party proxies (like OpenRouter), we can stop the underlying SDK from runtime casing evaluations that trigger the Turkish locale crash.
protected _getHeaders() {
const headers: Record<string, string> = {
"Content-Type": "application/json",
...(this.apiKey && { Authorization: `Bearer ${this.apiKey}` }),
"api-key": this.apiKey ?? "", // For Azure
};
// Hotfix for Turkish Locale (Turkish I Problem): Prevent upstream camelCase
// properties from triggering native string transformations on non-OpenAI endpoints
if (this.apiBase && !this.apiBase.includes("://openai.com")) {
headers["openai-organization"] = "";
headers["openai-project"] = "";
}
return headers;
}Method 2: Global String Prototype Patch (Polyfill Entrypoint Hotfix)
Since Continue compiles its core server into a singular bundle file (extension.js), adding an environment-invariant polyfill at the absolute entrypoint of the application (main.ts or index.ts) will safely guard against the Turkish I-problem globally across all bundled third-party npm modules:
// Add at the very top of Continue Core Server entrypoint file
if ('I'.toLowerCase() === 'ı') {
const originalToLowerCase = String.prototype.toLowerCase;
String.prototype.toLowerCase = function() {
// If the target string contains technical OpenAI casing keys, enforce safe conversion
if (this.includes('OpenAI-')) {
return this.toLocaleLowerCase('en-US');
}
return originalToLowerCase.call(this);
};
}To reproduce
- To reproduce:
- Set the Windows OS language/locale to Turkish (tr-TR).
- Install the Continue extension in Android Studio or VS Code.
- Configure a model using
provider: openrouterinconfig.yaml. - Send any message in the chat panel.
- The model fails immediately, throwing the
TypeError: Header name must be a valid HTTP token ["openaı-organization"]exception in the panel/logs due to the dotless "ı" transformation.
Activity
github-actions commentedon Sep 5, 2026
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
github-actions commentedon Sep 15, 2026
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, you are welcome to leave a comment and this will keep the issue open. However please note that this repo is no longer being actively maintained.