import httpx import pytest from app.main import app @pytest.mark.asyncio async def test_liveness_does_not_require_database_or_model_credentials() -> None: transport = httpx.ASGITransport(app=app) async with httpx.AsyncClient(transport=transport, base_url="http://test") as client: response = await client.get("/api/v1/health/live") assert response.status_code == 200 assert response.json()["status"] == "ok" @pytest.mark.asyncio async def test_meta_exposes_model_names_but_no_credentials() -> None: transport = httpx.ASGITransport(app=app) async with httpx.AsyncClient(transport=transport, base_url="http://test") as client: response = await client.get("/api/v1/meta") assert response.status_code == 200 payload = response.json() assert payload["models"] == { "embedding": "text-embedding-v4", "rerank": "qwen3-rerank", "generation": "deepseek-v4-flash", } assert "key" not in str(payload).lower()