Skip to content

feat: opt custom Responses models into Fast mode - #155667

Draft
PennyVibe wants to merge 7219 commits into
openclaw:mainfrom
PennyVibe:feat/custom-responses-fast-mode
Draft

PennyVibe wants to merge 7219 commits into
openclaw:mainfrom
PennyVibe:feat/custom-responses-fast-mode

Conversation

@PennyVibe

@PennyVibe PennyVibe commented Sep 22, 2026 •

Copy link
Copy Markdown

Related: #155582

What Problem This Solves

Custom OpenAI-compatible Responses models cannot enable Fast mode even when their endpoint accepts priority service tiers.

User Impact

Operators can opt a model into Fast mode with compat.supportsServiceTier: true. Custom routes remain opted out by default; an explicit false also disables service-tier use on native OpenAI routes. This declares protocol support, not upstream entitlement, latency, or pricing.

This remains a draft proposal pending the shared-config versus provider-plugin design decision in the linked issue.

Why This Change Was Made

The catalog and request path share the capability decision for HTTP(S) Responses endpoints. Fast on maps to priority, off adds no Fast-derived tier, and auto keeps the existing per-request cutoff. Transport-provided tiers and explicit serviceTier / service_tier parameters retain precedence; an explicit tier disables an ineffective Fast control.

Provider-owned Fast policies retain authority, including xAI and MiniMax. An unrelated stream wrapper does not suppress the generic fallback. Service-tier opt-in does not enable storage, prompt caching, compaction, or native Codex behavior.

Public model rows compute capabilities from the selected route's paired private runtime entry. This preserves explicit opt-out after logical catalog projection while keeping raw compat and params out of the public response.

Evidence

  • Migration validation: 220 tests across 10 files passed, including 16 cases using an isolated local HTTP/SSE server. These results preceded the final paired-projection repair.
  • Final projection repair: 71 tests across 6 related files passed. The new public models.list regression failed before the repair (supportsFastMode: true despite explicit opt-out) and passed afterward. It uses opposite capability flags on sibling routes and verifies that private fields are not published.
  • Changed-file checks completed: migration core/extension checks, followed by core and 27 test typecheck groups, formatting, lint, config documentation, plugin boundaries, unused exports, import cycles, and the remaining repository guards. The final run found a local variable-shadowing lint issue; the identifier was renamed, then lint and the unexecuted remaining guards passed. Previously passing checks were retained.
  • Independent source review found no unresolved actionable P0-P2 defects. The final subsequent edit only renamed that local callback variable.
  • pnpm build passed for the migrated implementation (11m42s), before the final projection repair. The affected source was subsequently compiled by the focused test runner; the full build was not repeated for that repair.
  • Implementation commit f5c33d7aa0a9cf1b5faf37596bbe561ec873e1f9 and the history-preserving merge commit 1aa70ab0c25899e5940da7f529c6e9ac78088ec1 have identical trees.

Current validation uses synthetic credentials and isolated state. No paid upstream, native Codex execution, or live Gateway/browser run was performed for this refresh. The full unscoped test suite and full pnpm check were not run. Hosted CI results are separate from these local results.

Measured test costs for this refresh

All commands used the repository pnpm test wrapper with --maxWorkers=1.

Selection Wall time
Initial 10-file migration selection, 220 tests 76.08 s
src/gateway/server-methods/models-list-result.service-tiers.test.ts, before repair 31.30 s (expected regression failure)
Same file after repair, 6 tests 29.65 s
Five related catalog/runtime files, 65 tests 42.98 s

The service-tier file spends most of its wall time preparing compiled dependencies; its six test bodies take about 2.5 seconds. Public catalog composition is required to catch the lost private capability that direct policy tests missed. Hosted CI timing is not available yet.

Historical UI evidence from the original implementation (6444363)

These inspected captures and the original isolated Gateway/browser run predate this refresh; they are retained as historical evidence, not current-head UI validation.

Before: undeclared capability keeps Fast disabled

Before: undeclared capability keeps Fast disabled

After: opted-in custom model exposes Fast

After: opted-in custom model exposes Fast

Fast on: actual request uses priority

Fast on: actual request uses priority

Fast off: actual request omits service tier

Fast off: actual request omits service tier

Explicit flex tier: Fast stays disabled

Explicit flex tier: Fast stays disabled

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.