[MCP Gateway] Litellm mcp client list fail (#13114)

* fix headers

* fix test

* fix ruff

* added try except for catching errors which lead to client failures

* fix mypy

* fix ruff

* fix tests

* fix python error

* fix test

* fix test

* fixed the MCP Call Tool result
This commit is contained in:
Jugal D. Bhatt
2025-07-30 15:23:19 -07:00
committed by GitHub
parent 3ca99f1def
commit 5db4862cbf
9 changed files with 311 additions and 165 deletions
@@ -96,7 +96,25 @@ def test_litellm_proxy_server_config_no_general_settings():
try:
subprocess.run(["pip", "install", "-e", ".[proxy]"])
subprocess.run(["pip", "install", "-e", ".[extra_proxy]"])
subprocess.run(["prisma", "run", "generate"])
# Ensure Prisma client is generated
try:
# Get the project root directory (where schema.prisma is located)
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
print(f"Running prisma generate from: {project_root}")
result = subprocess.run(
["prisma", "generate"],
capture_output=True,
text=True,
check=True,
cwd=project_root
)
print(f"Prisma generate stdout: {result.stdout}")
except subprocess.CalledProcessError as e:
print(f"Prisma generate failed: {e}")
print(f"Prisma generate stderr: {e.stderr}")
raise
filepath = os.path.dirname(os.path.abspath(__file__))
config_fp = f"{filepath}/test_configs/test_config_no_auth.yaml"
server_process = subprocess.Popen(