Custom mcp servers in agentruntime, and model + provider persistence - #4050
Custom mcp servers in agentruntime, and model + provider persistence#4050michaeljguarino wants to merge 4 commits into
Conversation
Soffi AI SummaryThis PR delivers three distinct enhancements to the Plural Console platform:
Additionally, the ChangesDefault model and provider override for AgentRuntime
Knowledge loop in Workbench creation flow
Preview environment TTL and maximum limits
Cluster CRD mergeTags support
Updated: 2026-08-25 20:54 UTC |
Greptile SummaryThis PR adds custom remote MCP servers to agent runtimes and persists runtime model/provider attribution for downstream cost tracking.
Confidence Score: 4/5The PR should not merge until AgentRun secrets correctly refresh when MCP configuration or referenced credentials change. The new MCP payload is written into the run secret, but the reconciliation guard never compares it, allowing removed servers and rotated credentials to remain in durable execution configuration. Files Needing Attention: go/deployment-operator/internal/controller/agentrun_controller.go
|
| Filename | Overview |
|---|---|
| go/deployment-operator/internal/controller/agentrun_controller.go | Adds resolved MCP configuration to AgentRun secrets, but the existing-secret comparison ignores that payload and leaves changed configuration stale. |
| go/deployment-operator/internal/controller/mcp.go | Resolves configured MCP servers and secret-backed headers into the harness payload with contextual error handling. |
| go/deployment-operator/api/v1alpha1/agentruntime_types.go | Adds the MCP server CRD contract and propagates inferred runtime model attributes. |
| go/deployment-operator/api/v1alpha1/agentruntime_model.go | Infers persisted provider/model attribution from AI-proxied runtime configuration with tested provider mappings. |
| go/deployment-operator/pkg/agentrun-harness/mcp/servers.go | Loads and validates serialized external MCP server configuration for harness integrations. |
| lib/console/schema/agent_runtime.ex | Persists the runtime model as a validated embedded provider/model pair. |
| priv/repo/migrations/20260824150329_add_runtime_model.exs | Adds the nullable map column required for runtime model persistence. |
Reviews (1): Last reviewed commit: "Custom mcp servers in agentruntime, and ..." | Re-trigger Greptile
| if !r.hasSecretData(secret.Data, run) { | ||
| logger.V(2).Info("updating secret", "namespace", secret.Namespace, "name", secret.Name) | ||
| secret.StringData = r.getSecretData(run, config, runtime.Spec.Type, signingKey, exaConnection) | ||
| secret.StringData = r.getSecretData(run, config, runtime.Spec.Type, signingKey, exaConnection, mcpServers) |
There was a problem hiding this comment.
When an MCP server is removed, its configuration changes, or a referenced header credential rotates, hasSecretData still returns true because it compares only the deploy token, Console URL, and run ID. The reconciliation therefore leaves the existing PLRL_MCP_SERVERS value unchanged, causing recreated agent containers to reuse stale endpoints, permissions, or credentials.
Knowledge Base Used: Deployment operator
401d1c6 to
83e5e78
Compare
|
plural deploy this |
|
Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2696 Console is pinned to |
83e5e78 to
eabcc2c
Compare
|
plural deploy this |
|
GitOps deployment PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2697 It pins the console image tag |
eabcc2c to
0d326fe
Compare
|
plural deploy this |
|
Deployment PR created: https://github.com/pluralsh/plrl-up-demos/pull/2698 — it pins the demo Console image to sha-0d326fe (PR #4050 head 0d326fe). |
173795f to
ce68c15
Compare
|
plural deploy this |
There was a problem hiding this comment.
Deployment requested — the GitOps deployment PR has been created: https://github.com/pluralsh/plrl-up-demos/pull/2699
It deploys console image tag sha-ce68c15 from head SHA ce68c1568a0d24896157cb97bad50a9a87f43830 and is annotated for Plural Service: mgmt/apps.
ce68c15 to
ff95b34
Compare
|
plural deploy this |
|
Deployment GitOps PR: https://github.com/pluralsh/plrl-up-demos/pull/2701 |
this will allow users to more easily extend their runtimes, and the model/provider persistence should improve cost tracking e2e.
ff95b34 to
2b83d06
Compare
|
plural deploy this |
|
Deployed via GitOps: https://github.com/pluralsh/plrl-up-demos/pull/2702 — pins the demo console deployment to |
this will allow users to more easily extend their runtimes, and the model/provider persistence should improve cost tracking e2e.
Test Plan
Test environment: https://console.plrldemo.onplural.sh/cd/clusters/a1748282-ce8b-48ab-ae7e-326e74fce04e/services/f3f89a54-d1a7-4bc8-9152-daa07ede918d/settings/helm
Checklist
Plural Flow: console