← Back to Pull requests

feat(rhaii): decouple llm-d activation from the KServe frontend #10867

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Nov 25, 2026 20:09 UTC
Author

Fixes: RHOAIENG-96078

Problem

RHAII registers the KServe frontend and advertises llm-d before checking whether the cluster serves LLMInferenceService. Users can see deployment actions that their cluster or project permissions do not support. A user with read-only access still needs to see existing deployments.

Solution

  • Remove the KServe frontend dependency. RHAII uses the deployment-only extension entry points from #10754 and no longer bundles or registers the KServe frontend. The LLMD package metadata and lockfile reflect the dependency removal. The production audit checks both the RHAII host and the Model Serving remote for KServe frontend code.

  • Gate each operation on the required capability and access. LLMD activation requires the Model Serving hub, enabled LLMD configuration, and discovery of serving.kserve.io/v1alpha2/llminferenceservices. Project-level list and watch checks govern visibility. Separate checks govern create, update, patch, and delete, so read-only users can still see deployments.

  • Make discovery failures diagnosable and recoverable. The Models page shows discovery failures inline and offers Retry discovery. RHAII owns the HTTP watch transport so it can surface a rejected watch, stop retrying on terminal errors, and start a fresh list/watch on retry. Regression tests cover asynchronous discovery, rejection, cancellation, and recovery.

  • Expose only supported deployment methods and optional capabilities. RHAII exposes the LLMD deployment methods supported by its profile. Config and Pod access are checked independently. A failed optional check leaves the deployment visible. Pod-derived stop status and controls appear once Pod discovery succeeds.

  • Preserve independent RHOAI composition. RHOAI can still load both spokes or LLMD on its own. The baseRefs change preserves existing configuration references during RHOAI edits and has regression coverage.

  • Reuse the upstream feature-flag change. This PR consumes #10688 for feature-flag independence and adds the RHAII host discovery and permission integration. The Evidence section records the RHOAI coverage, production bundle audit, and local Tilt results. Live xKS validation remains pending.
  • Evidence

  • After rebasing onto main, all 582 llm-d tests and 27 focused Model Serving tests passed. The wizard tests verify that denied access disables submission and displays the reason in the form, YAML preview, and YAML editor. Both affected packages passed type checking, and the resolved files passed lint.

  • Production bundles. pnpm --dir distributions/rhaii run check:runtime-boundary reported zero violations in both the RHAII host and its Model Serving remote.

  • Browser coverage before the rebase. All 49 RHOAI Cypress tests across modelServingLlmd.cy.ts and modelServingGlobal.cy.ts passed, including configurations with both serving plugins enabled and with llm-d enabled on its own.

  • Review follow-up. All 587 LLMD and 954 Model Serving unit tests passed. Regression tests cover pending, denied, and failed Pod discovery, plus successful Pod lists with and without a workload. Type checks and lint on changed files passed. The RHAII production runtime audit reported zero violations. Local Tilt browser verification used an API fixture and covered inline discovery retry, terminal watch recovery, and the stopped-state behavior. Live xKS validation is pending.
  • A discovery 404 shows the inline warning and Retry discovery below the Models title.
  • <img width="1440" height="913" alt="01-discovery-warning-inside-models" src="https://github.com/user-attachments/assets/e373c4cc-1f5e-4275-8ebb-66da97dffd10" />

  • With Pod access denied, the deployment stays visible and Start/Stop controls are withheld.
  • <img width="1800" height="950" alt="05-stop-requested-pod-access-denied" src="https://github.com/user-attachments/assets/3951b1e3-159c-4ad0-926d-26900ee2f503" />

  • A successful empty Pod list confirms Stopped and exposes Start for an authorized user.
  • <img width="1800" height="950" alt="06-stopped-after-empty-pod-list" src="https://github.com/user-attachments/assets/3ca6cdf6-708d-440b-97e4-92f9560b6f39" />

  • OpenShift verification. The demo reached Ready using the cluster’s existing MaaS gateway, and a completion through a private port-forward returned generated text. The browser recording and screenshots show read-only access, discovery retry, and watch recovery
  • RHAII on OpenShift. Discovery retry restores access to deployments, read-only permissions block mutations, and a stopped watch recovers without a page reload.
  • https://github.com/user-attachments/assets/88c0413a-00d4-4fd2-9e4e-70dfa274713c

  • Retrying loads the existing OpenShift deployment. Deploy model stays disabled for the read-only user.
  • <img width="1440" height="1000" alt="02-read-only-deployments" src="https://github.com/user-attachments/assets/79431cc2-c40a-4e78-9e6a-28e52112ce50" />

  • Opening the row menu triggers permission checks. OpenShift denies Edit and Delete.
  • <img width="1440" height="1000" alt="03-read-only-actions" src="https://github.com/user-attachments/assets/8a58d48f-c281-46ef-8100-d63e19bed95b" />

  • All projects shows the accessible deployment and quietly skips projects that deny access.
  • <img width="1440" height="1000" alt="04-all-projects" src="https://github.com/user-attachments/assets/fd65904c-c8d5-4336-b9d5-70cdd55741a1" />

  • An injected watch 403 stops the watch and displays Retry discovery.
  • <img width="1440" height="1000" alt="05-watch-forbidden" src="https://github.com/user-attachments/assets/5ac1d04c-5b1c-49d0-a832-ec86bee4e06f" />

  • Retry discovery starts a new OpenShift watch and restores the deployment row without a page reload.
  • <img width="1440" height="1000" alt="06-watch-recovered" src="https://github.com/user-attachments/assets/ab942b4e-f6f6-40a3-a2ee-8c64f4b36bf4" />

  • The deployment wizard shows the create-permission denial returned by OpenShift.
  • <img width="1440" height="1000" alt="07-wizard-create-denied" src="https://github.com/user-attachments/assets/09be6d13-9e9b-42c7-9846-52753a77a5f7" />

  • Facebook OPT 125M reaches Ready on OpenShift and shows its internal and external endpoints.
  • <img width="1440" height="1000" alt="08-model-ready" src="https://github.com/user-attachments/assets/8a4411fd-d0b7-4b52-a5b2-76068c4ecf0a" />

    <!-- OPTIONAL — uncomment when needed: -->
    <!-- ## Justifications -->

    <!-- Instructions

    This description is the sole source of truth for review of this PR.
    Review and lander gates read only this description — not chat or comment threads.
    A linked Jira ticket may still be checked for product-ask alignment.

    Source of truth — this PR description

  • Restate what matters for this head here. If you depart from the ticket ask, say

  • so in this description and why.
  • If a thread changes the ask or a rebuttal, fold that change into this description

  • (do not leave the durable claim only in a comment).
  • Tracker (optional): uncomment the Fixes: line at the top; do not bury the ticket

  • only in Problem/Solution.

    Hygiene

  • Present-tense, current with the head. No TBD/placeholders.

  • PR title = user-visible change (unless a workflow requires a specific title format — that format wins).

  • Allow maintainer edits: on.
  • Problem (required)


  • Broken workflow or gap — not the code-level cause.

  • Enough to check against the diff and any linked ticket ACs.
  • Solution (required)


  • What changed and why. Skip file lists.

  • Note security/RBAC, API/contract, migrations, breaking changes when relevant.
  • Evidence (required)


  • What CI cannot show: commands, cluster or manual checks, suites outside required CI; steps, not only outcome.

  • When new tests aren't appropriate — the constraint, why automation is inappropriate

  • or impossible, and the alternative verification.
  • When required CI supplies all applicable proof, a brief statement that automated coverage is the evidence is sufficient.

  • Screenshots, GIFs, and/or video for UI or flow changes; logs when useful.

  • Redact tokens, passwords, and cluster credentials.

  • Cluster check with the PR image when permission/backend/hard-to-mock matters.

  • Long output: short summary up top; fold details:
  • <details>
    <summary>build log output</summary>

    ...

    </details>

    Justifications (optional)


  • Only if the approach fights repo guidance/norms and review would keep flagging it.

  • Which norm, why this PR is still correct, what proof. Update this description when

  • that rationale changes; comment threads alone are not enough.
    -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: lucferbux Review duration: 14563m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.57) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.344
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #10867"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57% (MEDIUM) · Higher = larger blast radius
    57%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.4% · Safe to merge
    30.4%