Skip to content

Conversation

@RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented Jan 28, 2026

Summary

This PR adds custom error handling for the OpenAI organization verification error that occurs when an organization hasn't been verified to use reasoning summaries.

Changes

  • Added new fields to interface: and to support custom error handling
  • Enhanced function: Detects OpenAI organization verification errors by checking for both "openai" and "organization must be verified to generate reasoning summaries" in the error message (case-insensitive)
  • Updated StreamError component:
    • When is provided, shows a "Get help with this error" section instead of "Report this error"
    • Displays a "View help documentation" button linking to OpenAI's organization verification guide
    • Conditionally hides the GitHub issue button when is true
  • Added comprehensive test coverage: Tests for the new error detection logic, including edge cases

Error Detection

The error is detected when the message contains both:

  • "openai" (case-insensitive)
  • "organization must be verified to generate reasoning summaries" (case-insensitive)

When detected, the error handler:

UI Changes

Instead of showing the "Open GitHub issue" button, users will see a "View help documentation" button that directs them to OpenAI's help article about organization verification.

Testing

Added unit tests covering:

  • Detection of the organization verification error
  • Case-insensitive matching
  • Prevention of false positives for partial matches

Continue Tasks: ▶️ 2 queued — View all


Summary by cubic

Handles OpenAI organization verification errors for reasoning summaries, and routes users to the correct help docs instead of opening GitHub issues. Updates error analysis and the StreamError UI to make this clearer.

  • Bug Fixes
    • Detects the error by matching "openai" and "organization must be verified to generate reasoning summaries" (case-insensitive).
    • Adds helpUrl and hideGithubIssue to ErrorAnalysis; StreamError shows a help link to OpenAI’s verification guide and hides the GitHub issue button for this case.
    • Adds tests for detection, case-insensitive matching, and avoiding partial-match false positives.

Written for commit c9f86e5. Summary will update on new commits.

- Detect OpenAI organization verification error in analyzeError
- Show help documentation link instead of GitHub issue for this error
- Hide GitHub issue button when helpUrl is provided
- Add comprehensive tests for the new error handling

Generated with [Continue](https://continue.dev)

Co-authored-by: dallin <[email protected]>
Co-Authored-By: Continue <[email protected]>
@RomneyDa RomneyDa requested a review from a team as a code owner January 28, 2026 06:30
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team January 28, 2026 06:30
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 28, 2026
@github-actions
Copy link

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

@github-actions
Copy link

github-actions bot commented Jan 28, 2026

✅ Review Complete

Code Review Summary

⚠️ Continue API authentication failed. Please check your CONTINUE_API_KEY.


Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 3 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="gui/src/util/errorAnalysis.test.ts">

<violation number="1" location="gui/src/util/errorAnalysis.test.ts:546">
P2: Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


it("should handle OpenAI organization verification error", () => {
const error = new Error(
'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}',
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Jan 28, 2026

Choose a reason for hiding this comment

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

P2: Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At gui/src/util/errorAnalysis.test.ts, line 546:

<comment>Test expects OpenAI verification handling even though the error message lacks "openai", which contradicts the detection logic requiring that substring and will fail.</comment>

<file context>
@@ -530,6 +540,47 @@ describe("errorAnalysis", () => {
+
+      it("should handle OpenAI organization verification error", () => {
+        const error = new Error(
+          'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}',
+        );
+        const selectedModel = {
</file context>
Suggested change
'HTTP 400 Bad Request\n\n{"message":"Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}',
'HTTP 400 Bad Request\n\n{"message":"OpenAI: Your organization must be verified to generate reasoning summaries. Please go to: https://platform.openai.com/settings/organization/general and click on Verify Organization. If you just verified, it can take up to 15 minutes for access to propagate.","type":"invalid_request_error","param":"reasoning.summary","code":"unsupported_value"}',
Fix with Cubic

@RomneyDa RomneyDa marked this pull request as draft January 29, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

continue-agent size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants