banners params polish
frdel committed
Jan 7, 2026 at 09:24 UTC
7bdfe40ed11a3bb360abc885b34b0c332d58016a
3 files changed
+6
-7
python/api/banners.py
+2
-3
@@ -9,12 +9,11 @@ class GetBanners(ApiHandler):
9
"""
10
11
async def process(self, input: dict, request: Request) -> dict | Response:
12
- frontend_banners = input.get("banners", [])
12
+ banners = input.get("banners", [])
13
frontend_context = input.get("context", {})
14
15
# Banners array passed by reference - extensions append directly to it
16
- banners = []
17
- await call_extensions("banners", agent=None, banners=banners, context=frontend_context, frontend_banners=frontend_banners)
16
+ await call_extensions("banners", agent=None, banners=banners, frontend_context=frontend_context)
17
18
return {"banners": banners}
19
python/extensions/banners/_10_unsecured_connection.py
+3
-3
@@ -6,9 +6,9 @@ import re
6
class UnsecuredConnectionCheck(Extension):
7
"""Check: non-local without credentials, or credentials over non-HTTPS."""
8
9
- async def execute(self, banners: list = [], context: dict = {}, **kwargs):
10
- hostname = context.get("hostname", "")
11
- protocol = context.get("protocol", "")
9
+ async def execute(self, banners: list = [], frontend_context: dict = {}, **kwargs):
10
+ hostname = frontend_context.get("hostname", "")
11
+ protocol = frontend_context.get("protocol", "")
12
13
auth_login = dotenv.get_dotenv_value(dotenv.KEY_AUTH_LOGIN, "")
14
auth_password = dotenv.get_dotenv_value(dotenv.KEY_AUTH_PASSWORD, "")
python/extensions/banners/_20_missing_api_key.py
+1
-1
@@ -15,7 +15,7 @@ class MissingApiKeyCheck(Extension):
15
"embedding": "Embedding Model",
16
}
17
18
- async def execute(self, banners: list = [], context: dict = {}, **kwargs):
18
+ async def execute(self, banners: list = [], frontend_context: dict = {}, **kwargs):
19
current_settings = settings_helper.get_settings()
20
model_providers = {
21
"chat": current_settings.get("chat_model_provider", ""),