Skip to content

fix: enable native fast service tier for API-key auth#1089

Open
moooyy wants to merge 6 commits into
BigPizzaV3:mainfrom
moooyy:fix/api-key-native-fast-service-tier-v2
Open

fix: enable native fast service tier for API-key auth#1089
moooyy wants to merge 6 commits into
BigPizzaV3:mainfrom
moooyy:fix/api-key-native-fast-service-tier-v2

Conversation

@moooyy

@moooyy moooyy commented Jun 18, 2026

Copy link
Copy Markdown

Summary

This PR restores Codex native Fast service tier support for API-key auth.

The goal is not to add a fake Fast UI layer, but to make API-key users go through the same native speed selection flow that Codex already uses for logged-in users.

What changed

  • add a startup preload (service_tier_preload.rs) that patches native app://-/assets/... service-tier bundles before the renderer uses them
  • allow API-key auth through the native Fast eligibility checks
  • make native service-tier reads honor explicit service_tier config for API-key sessions
  • keep the existing Codex++ service-tier controls visible by default
  • ensure Fast request overrides write both:
    • serviceTier
    • service_tier

Why this approach

The previous workaround only forced request parameters. That made Fast requests work at the transport layer, but it did not restore Codex's native UI behavior for API-key users.

This change patches the native service-tier assets directly, so API-key sessions can use the original Codex speed option and related indicators instead of an after-the-fact imitation.

Compatibility notes

  • Fast is still limited to supported models such as gpt-5.4 and gpt-5.5
  • actual Fast availability still depends on the upstream / relay side supporting the priority tier
  • this PR is focused on API-key auth and native Fast behavior, not broader launcher/backend recovery logic

Testing

  • cargo test -p codex-plus-core --test cdp_bridge service_tier -- --nocapture

This includes:

  • native Fast service-tier control exposure
  • request contract validation for Fast service-tier overrides
  • updated harness coverage after rebasing onto newer upstream changes

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.

1 participant