# HyperTwist Phase 6R-AI first-party provider-neutral custom-endpoint runtime routing implementation packet

Created on `2026-05-26`

## Status

- first-party HyperTwist packet
- bounded `Phase 6R-AI` implementation slice

## Purpose

This packet lands the next bounded first-party slice above the landed speech
session, payload-custody, provider-profile/BYOK custody, provider-routing,
usage/cost governance, real device-permission workflow, native capture-route
workflow/control, and operator-facing native capture-route shell seams.

The landed slice is:

- first-party provider-neutral custom-endpoint runtime routing

It is not:

- a provider-specific overlay or settings-panel packet
- a managed gateway replacement packet
- an actual payment execution packet
- a provider-portal ownership packet
- an actual payload-shipping packet
- a broad assistant-platform packet

## Current authority basis

This implementation packet stands on:

- `docs/ops/HYPERTWIST_PROVIDER_NEUTRALITY_AND_BYOK_DOCTRINE_2026-05-21.md`
- `docs/arch/HYPERTWIST_PHASE6R_AI_FIRST_PARTY_PROVIDER_NEUTRAL_CUSTOM_ENDPOINT_RUNTIME_ROUTING_PREPARATION_PACKET_2026-05-26.md`
- `docs/arch/HYPERTWIST_PHASE6R_X_FIRST_PARTY_PROVIDER_PROFILE_AND_BYOK_CUSTODY_IMPLEMENTATION_PACKET_2026-05-24.md`
- `docs/arch/HYPERTWIST_PHASE6R_Y_FIRST_PARTY_PROVIDER_ROUTING_AND_POLICY_IMPLEMENTATION_PACKET_2026-05-24.md`
- `docs/arch/HYPERTWIST_PHASE6R_AH_FIRST_PARTY_OPERATOR_FACING_NATIVE_CAPTURE_ROUTE_WORKFLOW_SHELL_IMPLEMENTATION_PACKET_2026-05-26.md`

The preserved owners do not change:

- first-party HyperTwist remains the top-level provider/session owner
- first-party HyperTwist remains the provider-profile and BYOK custody owner
- first-party HyperTwist remains the provider routing/policy owner
- first-party HyperTwist remains the bounded custom-endpoint runtime routing
  owner for this slice
- `ggml-org/whisper.cpp` remains bounded to offline STT donor seams
- `SYSTRAN/faster-whisper` remains bounded to complementary Python
  orchestration/service-lane seams

## Landed scope

The current code now owns a bounded provider-neutral custom-endpoint runtime
routing seam through:

- retained speech-client state for:
  - `LastRequestedSessionConfig`
- provider-profile endpoint and label resolution in:
  - `UHyperTwistHttpSpeechClient`
- provider-profile endpoint-aware runtime routing for:
  - `OpenSpeechSession(...)`
  - `TranscribeSpeechUtterance(...)`
  - `CloseSpeechSession(...)`
  - `GetSpeechServiceHealth()`
- timeout/cancel completion safety in:
  - `HyperTwistHttpSpeechClientInternal::ExecuteJsonRequest(...)`
- focused automation coverage in:
  - `HyperTwistWhisperCppPhase6RAICustomEndpointRuntimeContractTest.cpp`
- retroactive bounded contract alignment in:
  - `HyperTwistWhisperCppPhase6RXProviderProfileByokContractTest.cpp`
  - `HyperTwistWhisperCppPhase6RYProviderRoutingPolicyContractTest.cpp`

## Why this is still intentionally bounded

This packet lands provider-neutral custom-endpoint runtime routing only.

Still deferred:

- provider-specific overlay or provider-settings ownership
- managed gateway replacement ownership
- actual payment execution or provider-portal ownership
- actual downloadable model/payload shipping
- actual OS permission-grant execution
- low-level native capture-route takeover
- broad assistant-platform scope

## Validation

Build validation:

- `UnrealHyperTwistEditor Win64 Development`

Focused automation validation:

- `HyperTwist.Permissive.WhisperCpp.Phase6R.AI` `3/3`

Regression automation validation:

- `HyperTwist.Permissive.WhisperCpp.Phase6R.X.ProviderProfileServiceHealth`
- `HyperTwist.Permissive.WhisperCpp.Phase6R.X.ProviderBackedByokFallback`
- `HyperTwist.Permissive.WhisperCpp.Phase6R.Y.ProviderRoutingPolicyServiceHealth`
- `HyperTwist.Permissive.WhisperCpp.Phase6R.Y.ProviderBackedRoutingFallback`
- `HyperTwist.Permissive.WhisperCpp.Phase6R.AG.NativeCaptureRouteWorkflowPreparationState`
- `HyperTwist.Permissive.WhisperCpp.Phase6R.AH.NativeCaptureRouteShellPreparationState`

Non-blocking warnings stayed limited to the existing Unreal headless/editor
noise, the pre-existing plugin dependency warning on `UnrealMCP`, the headless
CEF/web-browser warning, the known `http:/vision/health` plus `http:/speech/health`
hostname-resolution warnings from existing provider-backed automation posture,
and the expected connection-refused warnings against the local provider-backed
sidecar endpoint when no live sidecar was running.

## Queue effect

This packet consumes the current `Phase 6R-AI` implementation slice.

`ggml-org/whisper.cpp` remains only partially incorporated:

- landed now:
  - speech transcript session boundary
  - live microphone shell boundary
  - device-permission and capture-route readiness shell posture
  - first-party real device-permission workflow boundary
  - first-party native capture-route ownership assessment and workflow
    preparation/control boundary
  - first-party operator-facing native capture-route workflow shell boundary
  - downloadable model and payload custody boundary
  - first-party provider-profile and BYOK custody boundary
  - first-party provider routing and workflow-policy boundary
  - first-party provider-neutral custom-endpoint runtime routing boundary
  - first-party normalized usage/cost event-model boundary
  - first-party operator-facing provider usage/cost dashboard shell boundary
  - first-party provider usage/cost history/export shell boundary
  - first-party provider receipt review and posted-charge inspection shell
    boundary
  - first-party provider billing settlement and invoice reconciliation shell
    boundary
  - first-party provider settlement exception and external-portal handoff shell
    boundary
- still deferred:
  - provider-specific overlays or provider-settings ownership
  - actual payment execution or provider-portal ownership
  - actual OS permission-grant execution ownership
  - low-level native capture-route takeover
  - actual downloadable model/payload shipping
  - broad assistant-platform scope

The next clean move is not `Phase 6R-AJ` by default.

If a later speech/provider-adjacent packet is justified, keep these guards
visible:

- prove a narrower remaining downstream provider-neutral runtime or
  operator-facing consumer gap before widening
- keep actual payment execution and provider-portal ownership separate from
  any such packet
- keep actual payload shipping separate from runtime-routing and usage/cost
  governance unless a narrower first-party gap is proven first
