mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
fix(ui): use dynamic proxy base URL in MCP usage examples (#30487)
Replace hardcoded http://localhost:4000 with getProxyBaseUrl() in the MCP server usage example and copy-to-clipboard snippet so the generated configuration works for non-local deployments. Fixes #30466
This commit is contained in:
parent
5ac0c57383
commit
751fad712e
1 changed files with 3 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import Navbar from "./navbar";
|
|||
import {
|
||||
agentHubPublicModelsCall,
|
||||
skillHubPublicCall,
|
||||
getProxyBaseUrl,
|
||||
getPublicModelHubInfo,
|
||||
getUiConfig,
|
||||
mcpHubPublicServersCall,
|
||||
|
|
@ -1929,7 +1930,7 @@ import asyncio
|
|||
config = {
|
||||
"mcpServers": {
|
||||
"${selectedMcpServer.server_name}": {
|
||||
"url": "http://localhost:4000/${selectedMcpServer.server_name}/mcp",
|
||||
"url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp",
|
||||
"headers": {
|
||||
"x-litellm-api-key": "Bearer sk-1234"
|
||||
}
|
||||
|
|
@ -1969,7 +1970,7 @@ import asyncio
|
|||
config = {
|
||||
"mcpServers": {
|
||||
"${selectedMcpServer.server_name}": {
|
||||
"url": "http://localhost:4000/${selectedMcpServer.server_name}/mcp",
|
||||
"url": "${getProxyBaseUrl()}/${selectedMcpServer.server_name}/mcp",
|
||||
"headers": {
|
||||
"x-litellm-api-key": "Bearer sk-1234"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue