16 行
508 B
Python
16 行
508 B
Python
"""Runtime model catalog exposed by the AstrBot host."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from backend.routes.common import handle_request
|
|
from core.astrbot_provider_bridge import list_astrbot_text_models
|
|
from core.identity import RequestContext
|
|
from core.security import require_authenticated
|
|
|
|
|
|
def list_runtime_models(ctx: RequestContext) -> dict:
|
|
def action() -> dict:
|
|
require_authenticated(ctx)
|
|
return {"items": list_astrbot_text_models()}
|
|
|
|
return handle_request(ctx, action)
|