bump v0.82.0-dev, fix ping-llm auth, шрифт 11sp
This commit is contained in:
+1
-4
@@ -28,14 +28,11 @@ def register(app):
|
||||
|
||||
@app.route("/api/v1/ping-llm", methods=["GET"])
|
||||
def ping_llm():
|
||||
"""Проверка LLM с адаптивным кэшем. # API key check
|
||||
"""Проверка LLM с адаптивным кэшем (успех=60с, ошибка=7с)."""
|
||||
cfg = load()
|
||||
required = cfg.get("api", {}).get("key", "")
|
||||
if required and request.headers.get("X-Api-Key", "") != required:
|
||||
return jsonify({"ok": False, "error": "unauthorized"}), 401
|
||||
- Успех → кэш 60с
|
||||
- Ошибка → кэш 7с (LLM мог уже ожить)
|
||||
"""
|
||||
global _ping_llm_cache
|
||||
now = time.time()
|
||||
if _ping_llm_cache:
|
||||
|
||||
Reference in New Issue
Block a user