Repository navigation
feat(workspaces): forward a server's tool filters and timeout to the pods - #1774
Merged
Merged
Conversation
…pods A Kubernetes workspace wrote each of its mcp_servers into the Orchestrator with only its name, URL and headers, so a server's include_tools, exclude_tools and timeout applied on this machine but not in the pod. Operator v0.34.0 takes them, and the workspace now forwards them as includeTools, excludeTools and timeoutSeconds. A timeout of 0 or less stays unset, and a server without any of them is written as before. Each entry is built from the operator's OrchestratorMCPServer type, so its field names come from the operator. The upgrade error of a workspace with mcp_servers names v0.34.0.
3 tasks
Contributor
|
🎉 This PR is included in version 0.250.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Kubernetes workspace wrote each of its
mcp_serversinto the session's Orchestrator with only its name, URL and headers. A server'sinclude_tools,exclude_toolsandtimeoutapplied on this machine but not in the pod, so a server narrowed to two tools exposed every tool once a session moved to the cluster. Operator v0.34.0 takes them (inference-gateway/operator#332), and the workspace now forwards them:include_toolsandexclude_toolsgo into the Orchestrator asincludeToolsandexcludeTools, as written.timeoutgoes in astimeoutSecondswhen it is above 0. The CLI treats 0 or less as unset, and the operator refuses anything below 1, so those stay unset.Each entry is built from the operator's
OrchestratorMCPServertype and converted withDefaultUnstructuredConverter, so its field names come from the operator's API instead of copied strings.go.modmoves the operator module from v0.33.0 to v0.34.0 for the new fields.The "may predate ..., upgrade it" error of a workspace with
mcp_serversnames v0.34.0, andbinding_servicealone still names v0.33.0. This is simpler than the issue's split by whether a server sets a filter: a workspace whose servers set none still runs on v0.33.0, since its Orchestrator carries no new field, and the version only shows in the error of a create the operator already refused.docs/daemon.mdsays the pods get a server's tool filters and timeout and that they need operator v0.34.0, with v0.33.0 still enough for a server without them.examples/session-teleportgives thek8s-mcpworkspace's demo serverinclude_tools: [get_time, calculate], so the pod gets none of its file and environment tools, and its walkthrough installs operator v0.34.0.Closes #1773
Verification
task testpasses, with a case that forwards a server's tool filters and a 10s timeout and drops a negative timeout.BadRequest, whichcreatereports as the upgrade error.task precommit:runpasses.task test:e2epasses.Cross-repo impact