INNER CODE UNIT · Python

lifespan

openchoreo/openchoreo · agents/finops-agent/src/main.py:26

async def lifespan(_app: FastAPI):
    report_backend = None
    mcp_client = None

    try:
        logger.info("Initialising JWT validator...")
        try:
            get_jwt_validator()
        except Exception as e:
            logger.error("JWT validator initialization failed: %s", type(e).__name__)
            raise RuntimeError("JWT validator initialization failed") from e

        logger.info("Starting up: Testing LLM connection...")
        try:
            model = get_model()
            test_response = await model.ainvoke("Hello")
            logger.info("LLM test successful: %s", test_response.content[:50])
        except Exception as e:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…