Skip to content

Conversation

@fbuechler
Copy link

@fbuechler fbuechler commented Sep 20, 2025

Related GitHub Issue

Closes: #6868

Description

Introduces a "Unverified Organization" checkbox for the OpenAI Native provider settings. This allows users who can't or prefer not to verify their identity to OpenAI to still use models like GPT-5 by disabling features that are only allowed for verified organizations, namely response streaming and reasoning summaries.

Test Procedure

  1. Create a new OpenAI account and API key
  2. Don't verify your account
  3. Configure Open AI provider for GPT-5 in Roo Code
  4. Enable "Unverified Organization" in Advanced Settings
  5. Successfully send requests to the OpenAI API and receive non-streamed responses

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

grafik

Documentation Updates

Does this PR necessitate updates to user-facing documentation?

  • No documentation updates are required.
  • Yes, documentation updates are required. (Please describe what needs to be updated or link to a PR in the docs repository).

Mention the checkbox in Tips and Notes section of the OpenAI documentation,


Important

Adds support for unverified organizations in OpenAI settings, including a new checkbox in the UI and handling logic in the backend.

  • Behavior:
    • Adds openAiNativeUnverifiedOrg boolean option to provider-settings.ts to disable features requiring identity verification.
    • Updates openai-native.ts to handle non-streaming responses and omit reasoning summaries for unverified organizations.
  • Tests:
    • Adds tests in openai-native.spec.ts to verify non-streaming response handling and retry logic for unverified organizations.
  • UI:
    • Adds "Unverified Organization" checkbox in ApiOptions.tsx for OpenAI Native provider settings.
    • Updates localization files (settings.json in multiple languages) to include descriptions for the new checkbox.

This description was created by Ellipsis for a552493. You can customize this summary. It will automatically update as commits are pushed.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. documentation Improvements or additions to documentation enhancement New feature or request labels Sep 20, 2025
Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

The implementation correctly addresses issue #6868 by allowing unverified organizations to use GPT-5 models without streaming. Found some areas for improvement.

"resetDefaults": "Reset to Defaults"
},
"unverifiedOrganization": "Unverified Organization",
"unverifiedOrganizationDescription": "Check this box if you encounter organization verification errors with models like GPT-5. This will disable streaming and reasoning summaries but allow the models to work.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing translations: This PR only adds English translations. All other language files (Spanish, French, German, etc.) are missing the 'unverifiedOrganization' and 'unverifiedOrganizationDescription' keys, which will cause the UI to show missing translation warnings for non-English users.

Consider adding at least placeholder translations or using the English text as a fallback for other languages.

}
}

private prepareRetryRequestBody(
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider extracting this duplicate retry logic. The prepareRetryRequestBody method appears in both streaming (line 381) and non-streaming (line 329) code paths with identical implementation. This could be refactored to reduce code duplication.

yield* this.executeRequest(requestBody, model, metadata, systemPrompt, messages)
}

private isStreamingAllowed(): boolean {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider more descriptive method names like isStreamingAllowedForOrganization() and isReasoningSummaryAllowedForOrganization() to clarify that these methods are specifically checking organization verification status, not general feature availability.

expect(body.stream).toBe(false)
// GPT-5 includes reasoning effort; summary must be omitted for unverified orgs
expect(body.reasoning?.effort).toBeDefined()
expect(body.reasoning?.summary).toBeUndefined()
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding a test that explicitly verifies reasoning summaries ARE included when openAiNativeUnverifiedOrg is false, to ensure the feature works both ways. Currently tests only verify the omission case.

// OpenAI Responses API service tier for openai-native provider only.
// UI should only expose this when the selected model supports flex/priority.
openAiNativeServiceTier: serviceTierSchema.optional(),
openAiNativeUnverifiedOrg: z.boolean().optional(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding JSDoc documentation for this new field explaining when and why users should enable this option.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 20, 2025
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Sep 21, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Sep 23, 2025
@hannesrudolph hannesrudolph reopened this Sep 23, 2025
@github-project-automation github-project-automation bot moved this from Done to Triage in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from Done to New in Roo Code Roadmap Sep 23, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Sep 23, 2025
"resetDefaults": "Reset ke Default"
},
"unverifiedOrganization": "Organisasi Tidak Terverifikasi",
"unverifiedOrganizationDescription": "Centang kotak ini jika Anda mengalami kesalahan verifikasi organisasi dengan model seperti GPT-5. Ini akan menonaktifkan streaming dan ringkasan reasoning tetapi memungkinkan model berfungsi.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo note: Consider translating 'ringkasan reasoning' entirely into Indonesian (e.g. 'ringkasan penalaran') for consistency with the rest of the text.

Suggested change
"unverifiedOrganizationDescription": "Centang kotak ini jika Anda mengalami kesalahan verifikasi organisasi dengan model seperti GPT-5. Ini akan menonaktifkan streaming dan ringkasan reasoning tetapi memungkinkan model berfungsi.",
"unverifiedOrganizationDescription": "Centang kotak ini jika Anda mengalami kesalahan verifikasi organisasi dengan model seperti GPT-5. Ini akan menonaktifkan streaming dan ringkasan penalaran tetapi memungkinkan model berfungsi.",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Sep 23, 2025
@daniel-lxs
Copy link
Member

Hey @fbuechler, I think we can rename this setting to show it to users as it is: a checkbox to control streaming. That way, if OpenAI decides to change the terms, we don't have to rename the checkbox, and we can keep it for users that wish to disable streaming for any reason.

Also, I think Roomote made a good point about the duplicated logic on prepareRetryRequestBody #8200 (comment), can you take a look?

@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Changes Requested] in Roo Code Roadmap Sep 25, 2025
@fbuechler
Copy link
Author

@daniel-lxs Thanks for your feedback. I've split the setting into two separate settings "Disable Streaming" and "Disable Reasoning Summaries" since I have to disable both to use GPT-5. I've also extracted the duplicated retry logic into a single method.

I'm not sure why the unit test job failed. They run successfully on my machine.

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

Labels

documentation Improvements or additions to documentation enhancement New feature or request PR - Changes Requested size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: PR [Changes Requested]

Development

Successfully merging this pull request may close these issues.

Option to disable streaming if using gpt-5: "Your organization must be verified to stream this model."

3 participants