Add ability to manually run Review Descriptions from the UI / API (#24222)

* Add ability to manually run Review Descriptions from the UI / API

* Fix not handling None type for call
This commit is contained in:
Nicolas Mowen
2026-09-12 07:30:04 -06:00
parent 82be9fff5e
commit f9347967eb
11 changed files with 409 additions and 39 deletions
+14
View File
@@ -190,6 +190,20 @@ def genai_models(request: Request):
return JSONResponse(content=request.app.genai_manager.list_models())
@router.get(
"/genai/roles",
dependencies=[Depends(allow_any_authenticated())],
summary="Get the model assigned to each GenAI role",
description=(
"Returns the selected model and its context size for each configured "
"GenAI role. Reads only what the client saved when it initialized, so "
"the provider is not queried for its model list."
),
)
def genai_roles(request: Request):
return JSONResponse(content=request.app.genai_manager.role_info())
@router.post(
"/genai/probe",
dependencies=[Depends(require_role(["admin"]))],