Skip to content

feat(openai-codex): add 1.5x Fast mode - #1038

Closed
WebMad wants to merge 6 commits into
Zoo-Code-Org:mainfrom
WebMad:issue-1037-openai-codex-fast-mode
Closed

feat(openai-codex): add 1.5x Fast mode#1038
WebMad wants to merge 6 commits into
Zoo-Code-Org:mainfrom
WebMad:issue-1037-openai-codex-fast-mode

Conversation

@WebMad

@WebMad WebMad commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add Standard and Fast speed options for the OpenAI ChatGPT subscription provider
  • default existing profiles to Standard while persisting explicit Standard and Fast selections
  • map Fast to service_tier: "priority" for SDK streaming, manual SSE fallback, and non-streaming Codex requests
  • omit service_tier for Standard requests
  • explain the approximately 1.5x speed and increased subscription-usage tradeoff in the UI
  • localize the selector copy across all 18 supported frontend locales

Test coverage

  • provider schema validation and provider-specific profile filtering
  • profile persistence for Standard and Fast
  • streaming SDK request mapping
  • manual streaming fallback mapping
  • non-streaming request mapping
  • Standard omission for both missing and explicitly stored defaults
  • UI default state, saved state, option labels, tooltip copy, and selection persistence

Validation

  • 115 focused Vitest tests passed across packages/types, src, and webview-ui
  • repository lint passed
  • repository type checking passed
  • translation completeness validation passed
  • git diff --check passed

Closes #1037

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: fadaa5ac-6938-4f24-bdaa-d10e40e9f8c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread src/api/providers/openai-codex.ts Outdated
Comment thread src/core/config/__tests__/ProviderSettingsManager.spec.ts Outdated
Comment thread src/core/config/__tests__/ProviderSettingsManager.spec.ts Outdated
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 74.28571% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/api/providers/openai-native.ts 33.33% 4 Missing and 2 partials ⚠️
...bview-ui/src/components/settings/ModelInfoView.tsx 75.00% 0 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

Comment thread webview-ui/src/components/settings/providers/OpenAICodex.tsx Outdated
Comment thread webview-ui/src/components/settings/providers/OpenAICodex.tsx Outdated
Comment thread packages/types/src/__tests__/provider-settings.test.ts Outdated
Comment thread packages/types/src/__tests__/provider-settings.test.ts Outdated
Comment thread packages/types/src/__tests__/provider-settings.test.ts Outdated
Comment thread packages/types/src/provider-settings.ts Outdated
@WebMad

WebMad commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Addressed all review comments in 42de997a4:

  • converted getOpenAiCodexServiceTier to a const arrow function
  • added the shared OpenAiServiceTier enum and used it across Codex schema/request/UI/test paths and existing OpenAI service-tier consumers
  • replaced new literal OpenAI Codex provider values with providerIdentifiers.openaiCodex
  • introduced a constant for the openAiCodexServiceTier settings key and reused it for indexed access and updates

Validation after the changes:

  • repository lint passed
  • repository type checks passed
  • 20 provider-settings tests passed
  • 186 focused backend tests passed
  • 5 focused webview tests passed
  • formatting and git diff --check passed

Comment thread src/api/providers/__tests__/openai-native.spec.ts
Comment thread packages/types/src/model.ts
Comment thread src/api/providers/__tests__/openai-codex.spec.ts Outdated
Comment thread src/api/providers/__tests__/openai-codex.spec.ts Outdated
Comment thread webview-ui/src/components/settings/providers/OpenAICodex.tsx Outdated

@WebMad WebMad left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the current head. I found no actionable or blocking issues.

The provider schema and persistence path preserve both Standard and Fast preferences, Standard is omitted from outgoing Codex requests, and Fast is consistently mapped to service_tier: "priority" for SDK streaming, manual SSE fallback, and non-streaming requests. The settings UI uses the supplied configuration buffer/callback and clearly communicates the quota trade-off.

I also ran the focused type/schema, provider/persistence, and WebView tests locally: 105 tests passed across 6 test files. git diff --check also passed.

@WebMad

WebMad commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

This combined draft has been superseded by a three-PR stack split by responsibility:

  1. Zoo-Code-Org/Zoo-Code#1040 — shared service-tier primitives
  2. WebMad/Zoo-Code#2 — OpenAI Codex Fast backend persistence and request behavior
  3. WebMad/Zoo-Code#3 — webview selector, component tests, and translations

Tests travel with the behavior in each layer. The unrelated Task.throttle.test.ts fix from this archived branch is intentionally excluded from all three replacement PRs and will not receive a separate PR here. This original branch remains untouched as an archive.

@WebMad WebMad closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add 1.5x Fast mode for the OpenAI ChatGPT subscription provider

1 participant