Enforce Fast and Ultra Fast policies independently (#51253)

## Why

Fast mode previously gated both Fast and Ultra Fast, preventing policies from allowing one while disabling the other.

## What changed

- Add the default-enabled `features.ultrafast_mode` flag and enforce it independently of `features.fast_mode` in service-tier selection, requests, and agent prewarming.
- Filter TUI service-tier commands and selections by the corresponding policy and model catalog support.
- Report `supportsIndependentSpeedModes: true` from `configRequirements/read` and update the protocol schemas and generated bindings. Retain the shared Fast gate when connecting to older servers that omit this capability.
- Preserve legacy cloud speed denials by translating `rbac-fast-mode` fragments with `fast_mode = false` into a denial of both modes, while retaining higher-priority enterprise overrides.

## Testing

Add coverage for all four Fast/Ultra Fast policy combinations in requirements responses and request routing, agent prewarm inheritance, TUI command visibility and saved selections, and legacy cloud denial normalization and override precedence.

GitOrigin-RevId: 147e08524c4b228ea9d46b25a9f8aa64c359e169
This commit is contained in:
dpatel-oai
2026-10-06 03:35:55 +00:00
committed by copyberry
parent 989c01a41a
commit 7ac954ea24
43 changed files with 462 additions and 73 deletions
@@ -11840,6 +11840,13 @@ class ConfigRequirementsReadResponse(BaseModel):
description="Null if no requirements are configured (e.g. no requirements.toml/MDM entries)."
),
] = None
supports_independent_speed_modes: Annotated[
bool | None,
Field(
alias="supportsIndependentSpeedModes",
description="Whether Fast and Ultra Fast requirements are enforced independently. Older servers omit this field and use Fast mode as a shared speed gate.",
),
] = None
class ExternalAgentConfigDetectResponse(BaseModel):