Skip to content

Commit ad3b150

Browse files
committed
refactor: improve OpenAI Native streaming toggle UX
- Moved streaming toggle to Advanced Settings section - Changed from "Enable Streaming" to "Disable Streaming" checkbox - Updated all translation files with new keys - Makes the setting more intuitive for users experiencing verification errors
1 parent 5604dc5 commit ad3b150

File tree

20 files changed

+52
-45
lines changed

20 files changed

+52
-45
lines changed

webview-ui/src/components/settings/ApiOptions.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { convertHeadersToObject } from "./utils/headers"
33
import { useDebounce } from "react-use"
44
import { VSCodeLink } from "@vscode/webview-ui-toolkit/react"
55
import { ExternalLinkIcon } from "@radix-ui/react-icons"
6+
import { Checkbox } from "vscrui"
67

78
import {
89
type ProviderName,
@@ -677,6 +678,20 @@ const ApiOptions = ({
677678
}
678679
onChange={(value) => setApiConfigurationField("consecutiveMistakeLimit", value)}
679680
/>
681+
{selectedProvider === "openai-native" && (
682+
<div>
683+
<Checkbox
684+
checked={!(apiConfiguration?.openAiNativeStreamingEnabled ?? true)}
685+
onChange={(checked: boolean) => {
686+
setApiConfigurationField("openAiNativeStreamingEnabled", !checked)
687+
}}>
688+
{t("settings:modelInfo.disableStreaming")}
689+
</Checkbox>
690+
<div className="text-sm text-vscode-descriptionForeground ml-6 -mt-2">
691+
{t("settings:modelInfo.disableStreamingDescription")}
692+
</div>
693+
</div>
694+
)}
680695
{selectedProvider === "openrouter" &&
681696
openRouterModelProviders &&
682697
Object.keys(openRouterModelProviders).length > 0 && (

webview-ui/src/components/settings/providers/OpenAI.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ProviderSettings } from "@roo-code/types"
77
import { useAppTranslation } from "@src/i18n/TranslationContext"
88
import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink"
99

10-
import { inputEventTransform, noTransform } from "../transforms"
10+
import { inputEventTransform } from "../transforms"
1111

1212
type OpenAIProps = {
1313
apiConfiguration: ProviderSettings
@@ -72,14 +72,6 @@ export const OpenAI = ({ apiConfiguration, setApiConfigurationField }: OpenAIPro
7272
{t("settings:providers.getOpenAiApiKey")}
7373
</VSCodeButtonLink>
7474
)}
75-
<Checkbox
76-
checked={apiConfiguration?.openAiNativeStreamingEnabled ?? true}
77-
onChange={handleInputChange("openAiNativeStreamingEnabled", noTransform)}>
78-
{t("settings:modelInfo.enableStreaming")}
79-
</Checkbox>
80-
<div className="text-sm text-vscode-descriptionForeground ml-6 -mt-2">
81-
{t("settings:modelInfo.enableStreamingDescription")}
82-
</div>
8375
</>
8476
)
8577
}

webview-ui/src/i18n/locales/ca/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/de/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/en/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,8 @@
736736
"outputPrice": "Output price",
737737
"cacheReadsPrice": "Cache reads price",
738738
"cacheWritesPrice": "Cache writes price",
739-
"enableStreaming": "Enable streaming",
740-
"enableStreamingDescription": "Disable streaming if you encounter organization verification errors with advanced models. Non-streaming requests may work without verification.",
739+
"disableStreaming": "Disable streaming",
740+
"disableStreamingDescription": "Check this if you encounter organization verification errors with advanced models like GPT-5. Non-streaming requests may work without verification.",
741741
"enableR1Format": "Enable R1 model parameters",
742742
"enableR1FormatTips": "Must be enabled when using R1 models such as QWQ to prevent 400 errors",
743743
"useAzure": "Use Azure",

webview-ui/src/i18n/locales/es/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/fr/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/hi/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/id/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

webview-ui/src/i18n/locales/it/settings.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)