← Back to Pull requests

chore(docs): model registry (hub) client support for kubeflow-mcp-server (kep#181) #264

Open
unknown opened this pull request with 351 lines diff across 4 files
View on GitHub
unknown unknown commented on Sep 18, 2026 21:54 UTC
Author

Summary

This KEP proposes implementing the Hub client module for kubeflow-mcp-server,
wrapping kubeflow.hub.ModelRegistryClient as 7 MCP tools: 5 read-only discovery
tools and 2 mutating tools behind the standard confirm gate.

It fills the Phase 3 hub node already present in CLIENT_MODULES (stub module
kubeflow_mcp.hub) and closes the dead end after "job complete": an agent can
register the trained model, then look it up again with the artifact URI, format and
storage fields a serving layer needs.

Note on the SDK client

The issue references kubeflow.hub.ModelRegistryClient, and that is what this KEP
targets. Verified against kubeflow==0.5.0 on PyPI and kubeflow/sdk main:
kubeflow.hub exports ModelRegistryClient, StorageConfig, S3UploadParams,
OCIUploadParams and upload_artifact. There is no HubClient. #201 also keeps
sdk_client: kubeflow.hub.ModelRegistryClient.

0.5.0 still matters: it adds storage_config to register_model(), without which
the tool cannot record how KServe should fetch the artifact. Implementation therefore
waits for #195 / #201.

Tools

  • Discovery: list_models, get_model, list_model_versions, get_model_version, compare_models

  • Registration: register_model

  • Lifecycle: update_model_metadata
  • Key decisions

  • promote_model dropped from scope (agreed on #181), since the registry has no

  • stage/environment concept and a custom_properties["stage"] convention would
    become de facto API on merge.
  • update_model_metadata targets the model or a specific version via an optional

  • version param; get-mutate-update, with the confirm gate wrapping the final write
    and an optional stale-write check.
  • Artifact lookup folded into get_model_version rather than a separate

  • get_model_artifact tool, keeping the count at the 7 agreed in the issue.
  • The registry is a REST service, not a K8s API, so the module adds a HubConfig

  • (URL/port/author/CA/token) instead of using kubeconfig. No tool accepts credentials.
  • MCP ownership marker stored as a custom property, since registry objects have no labels.
  • Non-Goals

    promote_model, archiving/state changes, upload_artifact (needs raw storage keys),
    editing artifacts, serving, lineage tracking.

    Plan

    Two PRs: read-only half first (easier to review, unblocks the schema snapshot), then
    the mutating half, per @abhijeet-dhumal's suggestion on #181. #201 has landed, and PR 1
    also depends on kubeflow/sdk#862 for the async_runner passthrough.

    Status

    Open for review. Both review rounds are resolved and recorded in a Decision Log at the
    end of the KEP.

    Context

    #181, #195, #201, and #48 (KEP-34) for the format.

    cc: @abhijeet-dhumal @Krishna-kg732

    Diff: 351 lines (+263 / -88) across 4 files Reviewer: myselfkunal Review duration: 86010m
    All Vouch review confidence checks passed
    Residual risk 0.40 = Change Risk (0.73) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.73 · 351 lines diff across 4 files
    0.73
    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%
    44%
    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.351
    Shallow Review Depth shallow_review_depth
    0.344
    Sensitive Paths sensitive_paths
    0.073
    Real PR Conversation Timeline
    1 comments
    "Review active on #264"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 44.7% reviewed sensitive_module
    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: 72.7% (HIGH) · Higher = larger blast radius
    72.7%
    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: 44.7% · Lower = rushed or shallow review
    44.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: 40.2% · Moderate risk
    40.2%