Skip to content

Support provider-defined service tiers per model - #4689

Merged
SawyerHood merged 2 commits into
mainfrom
bb/make-the-bb-service-tier-list-configurable-thr_ure849regt
Oct 2, 2026
Merged

SawyerHood merged 2 commits into
mainfrom
bb/make-the-bb-service-tier-list-configurable-thr_ure849regt

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Service tiers were restricted to default and fast, and the picker showed a Fast switch without considering the selected model's supported tiers. Providers could declare other tiers, but those declarations could not flow through execution options. This addresses the tier selection portion of #4558 (Ultrafast for individual Codex threads).

What changed

  • Accept non-empty service tier ids across the domain, CLI, SDK, automations, and task presets; migrate the Tasks preset constraint.
  • Use provider declarations and optional per-model supportedServiceTiers to show a switch for one tier, a choice for multiple tiers, or no picker for models with none. Reset unsupported selections to default.
  • Reconcile service tiers before the controlled plugin picker emits a provider change, so consumers receive one coherent selection.
  • Add --clear-service-tier for Automations and Tasks presets; --service-tier none now selects the literal tier id. Reject combining the two flags. Document ModelServiceTier and per-model tier behavior in the canonical Plugin Guide.
  • Preserve Codex's priority/fast mapping and read its model catalog's additional tiers. Reject explicit tiers a provider does not declare; let the provider handle model/account eligibility at execution time.
  • Bump the host-daemon protocol from 225 to 226 and the Plugin SDK to 0.6.14; update CLI guides, configuration documentation, and verification recipes. Keep allowFastServiceTier as the setting key, applying it to every non-default tier.

Related to #4558. Routing an Ultrafast turn to an eligible account in a mixed Account Pool remains outside this change.

How you verified

  • Repository-wide Turbo lint and typecheck passed, including a fresh run after rebasing onto main.
  • Turbo tests covered the affected app, server, CLI, domain, SDK, daemon contracts, providers, Tasks, Automations, and templates. Two server tests timed out during the combined run; both files passed when rerun separately (51 tests).
  • Additional Turbo tests passed for provider protocol/parity, SDK, test helpers, thread view, Pi, and workflows.
  • In an isolated dev app with Codex 0.159.3, browser checks covered multiple tiers, a single-tier switch, no-tier models, and selection reset. Real CLI turns at fast and ultrafast replied successfully. The Ultrafast catalog entry was injected for UI verification; Codex omitted that unsupported tier on this account. Execution at Ultrafast on an eligible account remains unverified, and the Fast turn confirms BB's recorded tier rather than Codex-side speed.
  • After the rebase, reran domain, host-daemon contract, SDK, and template tests, plus focused picker, composer selection, plugin picker, and CLI spawn tests.
  • Review follow-up: 63 picker tests passed; Automations, Tasks, and Plugin Guide suites passed, including regression checks for the first provider-change emission and literal none tiers. Affected-package lint/typechecks and the Plugin Guide build passed. Updated and reran template documentation tests for --clear-service-tier.
  • git diff --check passed.

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T05:06:22.354586Z bcf3047 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bcf3047958

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

onFastModeChange={handleFastModeChange}
showFastModeToggle={controller.supportsServiceTier}
serviceTierValue={controller.serviceTier}
serviceTierOptions={controller.serviceTierOptions}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reconcile the tier before emitting provider changes

When a controlled plugin picker switches from a provider/model using a provider-specific tier such as ultrafast to one that only offers fast, handleProviderPreviewResolved copies the old value.serviceTier into the first onChange call without consulting these model-specific options. The hook subsequently emits a corrected default value, so consumers receive two changes and the first violates the documented coherent-value contract and cannot safely be forwarded verbatim to threads.spawn; include the resolved tier options in the preview result and reconcile before emitting.

Useful? React with 👍 / 👎.

Comment thread plugins/automations/src/cli.ts Outdated
Comment on lines +132 to +136
"service-tier": {
type: "enum",
values: [...serviceTierSchema.options, "none"],
description: "Service tier; none leaves the automation without one",
type: "string",
placeholder: "tier",
description:
"Service tier id the provider lists for the model, such as default or fast; none leaves the automation without one",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve provider tier IDs named none

The new open string option permits providers to declare any non-empty tier ID, including none, but Automations still interprets that exact accepted value as absence in buildCreateInput and as clearing in buildAgentExecutionUpdate; Tasks does the same in presetServiceTier. Consequently these CLI surfaces cannot select a valid provider tier named none and silently discard it, so clearing needs a separate flag/sentinel outside the tier-ID namespace.

AGENTS.md reference: AGENTS.md:L16-L16

Useful? React with 👍 / 👎.

JsonObject,
JsonValue,
ModelReasoningEffort,
ModelServiceTier,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add the service-tier contract to the canonical Plugin Guide

Exporting ModelServiceTier and adding AvailableModel.supportedServiceTiers creates a public provider-bridge API surface, but this commit leaves plugins/plugin-api-docs/src/surfaces.ts unchanged. Add the symbol and model-tier behavior to the existing provider surface there so the canonical Plugin Guide exposes the new contract rather than documenting it only in secondary references.

AGENTS.md reference: AGENTS.md:L29-L29

Useful? React with 👍 / 👎.

@SawyerHood
SawyerHood merged commit 7e13928 into main Oct 2, 2026
27 checks passed
@SawyerHood
SawyerHood deleted the bb/make-the-bb-service-tier-list-configurable-thr_ure849regt branch October 2, 2026 05:24
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