Repository navigation
feat(integrations)!: send one API key to several endpoints in a chosen variable - #14506
Merged
Merged
Conversation
…n variable A kind: api integration, and openshell_api in HCL, now takes endpoints, a list of URLs, instead of endpoint, so one registration covers an API whose services sit on several hosts. sandboxEnv (sandbox_env in HCL) names the variable the sandbox sees the key in; without it the derived NEMOCLAW_API_<NAME>_KEY name stays. OpenShell owns the rule that two providers on one sandbox cannot put keys in the same variable and reports it during apply, so NemoClaw adds no check of its own. An MCP-policy API takes exactly one URL. The intent record moves to version 23. Signed-off-by: Carlos Villela <[email protected]>
Collaborator
Author
Authoring session — opening
|
Contributor
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.
A
kind: apiintegration, andopenshell_apiin HCL, now takesendpoints, a list of URLs, instead ofendpoint, and sends one gateway-held key to all of them; the newsandboxEnv(sandbox_env) names the variable the sandbox sees it in. Tools that read a fixed variable, such as clients of NVIDIA's hosted APIs readingNVIDIA_API_KEYacrossintegrate.api.nvidia.comandai.api.nvidia.com, can now use an API integration. Documents that setendpointmust move toendpoints.Problem
A
kind: apiintegration gives the sandbox its placeholder only asNEMOCLAW_API_<registration>_KEY, where the registration ends in 12 hex digits of the image scope, so the name changes with the image and tools that read a fixed variable can't find it.Each integration binds one URL, and two integrations can't share a variable either: OpenShell rejects a sandbox whose attached providers claim the same credential variable ("credential env key '…' is provided by both provider '…' and provider '…'; use provider-specific env names").
An API spread over several hosts therefore can't be reached with one key under the name its clients read.
Change
endpointsreplacesendpointonkind: apiandopenshell_api. One integration projects to one OpenShell profile: one credential, and one endpoint with its path subtree per URL. The registration records the list underNEMOCLAW_API_ENDPOINTS, and the profile under thenemoclaw.nvidia.com/endpointsannotation.sandboxEnv(sandbox_envin HCL) is optional and validated like web search's; without it the variable keeps today's derived name.openshell_apiwith anmcpblock takes exactly one URL, since NemoClaw projects its tool rules onto one exact path.brave-search/tavily-searchand registration-name checks concern provider names, not variables.Beyond CI
On a local Docker engine, a deployment with three OpenClaw sandboxes, a
build.nvidia.cominference provider and onekind: apiintegration listinghttps://integrate.api.nvidia.com/v1andhttps://ai.api.nvidia.com/v1withsandboxEnv: NVIDIA_API_KEYapplied. Inside a sandboxNVIDIA_API_KEYheld an OpenShell placeholder, and Python started by the OpenClaw agent got HTTP 200 from the embeddings endpoint on the first host and the reranking endpoint on the second, whileexample.comwas refused. That is one run against two NVIDIA endpoints; it does not establish other APIs.