feat(schemas): add LlmSetupStatusRead for server-authoritative onboarding

This commit is contained in:
Anish Sarkar 2026-07-12 20:29:19 +05:30
parent e32413588e
commit 1c2c480b92
2 changed files with 17 additions and 2 deletions

View file

@ -43,6 +43,7 @@ from .model_connections import (
ConnectionCreate, ConnectionCreate,
ConnectionRead, ConnectionRead,
ConnectionUpdate, ConnectionUpdate,
LlmSetupStatusRead,
ModelCreate, ModelCreate,
ModelPreviewRead, ModelPreviewRead,
ModelProviderRead, ModelProviderRead,
@ -185,13 +186,14 @@ __all__ = [
"InviteInfoResponse", "InviteInfoResponse",
"InviteRead", "InviteRead",
"InviteUpdate", "InviteUpdate",
# Auth schemas
"LlmSetupStatusRead",
# Log schemas # Log schemas
"LogBase", "LogBase",
"LogCreate", "LogCreate",
"LogFilter", "LogFilter",
"LogRead", "LogRead",
"LogUpdate", "LogUpdate",
# Auth schemas
"LogoutAllResponse", "LogoutAllResponse",
"LogoutRequest", "LogoutRequest",
"LogoutResponse", "LogoutResponse",

View file

@ -1,6 +1,6 @@
import uuid import uuid
from datetime import datetime from datetime import datetime
from typing import Any from typing import Any, Literal
from pydantic import BaseModel, ConfigDict, Field from pydantic import BaseModel, ConfigDict, Field
@ -146,3 +146,16 @@ class ModelRolesUpdate(BaseModel):
chat_model_id: int | None = None chat_model_id: int | None = None
vision_model_id: int | None = None vision_model_id: int | None = None
image_gen_model_id: int | None = None image_gen_model_id: int | None = None
class LlmSetupStatusRead(BaseModel):
"""Server-authoritative verdict for the per-workspace LLM onboarding gate.
``status`` is the only thing the frontend gate acts on; ``source`` is
informational and ``can_configure`` selects the onboarding vs. blocked
screen for members who cannot manage models.
"""
status: Literal["ready", "needs_setup"]
source: Literal["global_config", "models", "none"]
can_configure: bool