Add admin panel, WebSocket support, and API versioning
CI / Lint & Format (push) Failing after 28s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped

Introduce an admin portal (React + Nginx), WebSocket routing, and
API versioning middleware with `/api/v1/` prefix deprecation.
Add master API key authentication, new Prometheus metrics for AI
token consumption and active WebSockets, and extend S3 config
with a public endpoint URL. Update test paths and fixtures to
align with the new routing structure.
This commit is contained in:
2026-06-22 11:25:22 -04:00
parent d68deb9c74
commit 2f2a5e9b4a
158 changed files with 64811 additions and 503 deletions
+7
View File
@@ -338,6 +338,8 @@ async def summarize_url(url: str, content: str, language: str = "français") ->
"summary": "",
"tags": [],
"model": settings.AI_PROVIDER,
"prompt_tokens": None,
"output_tokens": None,
}
if not settings.AI_ENABLED:
@@ -370,6 +372,7 @@ Retourne UNIQUEMENT ce JSON :
if parsed:
result["summary"] = parsed.get("summary", "")
result["tags"] = parsed.get("tags", [])
result["prompt_tokens"], result["output_tokens"] = response.get("usage")
except Exception as e:
logger.error("ai.summarize_url.error", extra={"error": str(e)})
@@ -385,6 +388,9 @@ async def draft_task(description: str, context: Optional[str], language: str = "
"steps": [],
"estimated_time": None,
"priority": None,
"model": settings.AI_PROVIDER,
"prompt_tokens": None,
"output_tokens": None,
}
if not settings.AI_ENABLED:
@@ -416,6 +422,7 @@ Retourne UNIQUEMENT ce JSON :
parsed = _extract_json(text)
if parsed:
result.update(parsed)
result["prompt_tokens"], result["output_tokens"] = response.get("usage")
except Exception as e:
logger.error("ai.draft_task.error", extra={"error": str(e)})