mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix: copy env_vars when duplicating MCP server
Addresses Greptile feedback: servers using ${VAR_NAME} interpolation in
static_headers would have broken references after duplication because
env_vars was not being copied.
https://claude.ai/code/session_01Wx49QQnsCngnJ7hsfaC1yC
This commit is contained in:
parent
7c23282da7
commit
e3f8813dfc
1 changed files with 9 additions and 0 deletions
|
|
@ -347,6 +347,15 @@ const CreateMCPServer: React.FC<CreateMCPServerProps> = ({
|
|||
}));
|
||||
}
|
||||
|
||||
if (duplicateServer.env_vars && duplicateServer.env_vars.length > 0) {
|
||||
prefillValues.env_vars = duplicateServer.env_vars.map((v) => ({
|
||||
name: v.name,
|
||||
value: v.value,
|
||||
scope: v.scope,
|
||||
description: v.description || "",
|
||||
}));
|
||||
}
|
||||
|
||||
if (duplicateServer.is_byok) {
|
||||
prefillValues.is_byok = true;
|
||||
prefillValues.byok_description = duplicateServer.byok_description || [];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue