Repository navigation
Support provider-defined service tiers per model - #4689
SawyerHood merged 2 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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} |
There was a problem hiding this comment.
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 👍 / 👎.
| "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", |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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 👍 / 👎.
Human comments
What was wrong
Service tiers were restricted to
defaultandfast, 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
supportedServiceTiersto show a switch for one tier, a choice for multiple tiers, or no picker for models with none. Reset unsupported selections todefault.--clear-service-tierfor Automations and Tasks presets;--service-tier nonenow selects the literal tier id. Reject combining the two flags. DocumentModelServiceTierand per-model tier behavior in the canonical Plugin Guide.priority/fastmapping 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.allowFastServiceTieras 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
fastandultrafastreplied 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.nonetiers. Affected-package lint/typechecks and the Plugin Guide build passed. Updated and reran template documentation tests for--clear-service-tier.git diff --checkpassed.