fix(ci): fix schema drift, endpoint enum, and MCP test mocks

- schema.prisma: add static_headers and extra_headers to
  LiteLLM_AgentsTable (migration 20260305000000 adds them but root
  schema.prisma was missing them, causing test_aaaasschema_migration_check
  to fail)
- tests/test_utils.py: add /vertex_ai/live to supported_endpoints enum
  so test_aaamodel_prices_and_context_window_json_is_valid passes
- tests/mcp_tests/test_mcp_server.py: explicitly set
  tool_name_to_display_name, tool_name_to_description, byok_api_key_help_url
  to None in both failing MCP mock tests (MagicMock auto-creates these as
  MagicMock objects, causing Pydantic ValidationError in MCPServer)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Harshit28j 2026-03-06 22:30:55 +05:30
parent 9df6860ab8
commit 44d382218e
3 changed files with 9 additions and 0 deletions

View file

@ -70,6 +70,8 @@ model LiteLLM_AgentsTable {
created_by String
updated_at DateTime @default(now()) @updatedAt @map("updated_at")
updated_by String
static_headers Json? @default("{}")
extra_headers String[] @default([])
}
model LiteLLM_OrganizationTable {

View file

@ -1453,6 +1453,9 @@ async def test_add_update_server_with_alias():
mock_mcp_server.authorization_url = None
mock_mcp_server.registration_url = None
mock_mcp_server.token_url = None
mock_mcp_server.tool_name_to_display_name = None
mock_mcp_server.tool_name_to_description = None
mock_mcp_server.byok_api_key_help_url = None
# Add server to manager
await test_manager.add_server(mock_mcp_server)
@ -1535,6 +1538,9 @@ async def test_add_update_server_fallback_to_server_id():
mock_mcp_server.authorization_url = None
mock_mcp_server.registration_url = None
mock_mcp_server.token_url = None
mock_mcp_server.tool_name_to_display_name = None
mock_mcp_server.tool_name_to_description = None
mock_mcp_server.byok_api_key_help_url = None
# Add server to manager
await test_manager.add_server(mock_mcp_server)

View file

@ -754,6 +754,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"/v1/audio/transcriptions",
"/v1/audio/speech",
"/v1/ocr",
"/vertex_ai/live",
],
},
},