feat: 完善模型平台相关功能

This commit is contained in:
Winnie
2026-07-31 19:10:37 +08:00
parent 86988bdaef
commit 49ee2c0a4a
24 changed files with 529 additions and 125 deletions
+5 -1
View File
@@ -38,6 +38,10 @@ class Settings(BaseSettings):
default="dev-only-not-for-production",
description="HS256 secret used by backend's jupyter auth_request.",
)
demo_auth_enabled: bool = Field(
default=False,
description="Enable the self-hosted UI's short-lived demo session cookie.",
)
# ── service identity ──────────────────────────────────────────
service_name: str = Field(
@@ -148,4 +152,4 @@ def get_settings() -> Settings:
settings: Settings = get_settings()
__all__ = ["Settings", "get_settings", "settings"]
__all__ = ["Settings", "get_settings", "settings"]
+2
View File
@@ -100,6 +100,7 @@ class StorageClient:
visibility: str,
is_immutable: bool,
idempotency_key: str,
relative_path: str | None = None,
) -> dict[str, Any]:
result = await self._request(
"POST",
@@ -114,6 +115,7 @@ class StorageClient:
"visibility": visibility,
"is_immutable": is_immutable,
"idempotency_key": idempotency_key,
"relative_path": relative_path,
},
)
return result["data"]
+2
View File
@@ -56,6 +56,7 @@ class CompleteUploadRequest(StrictModel):
"working_copy",
"public_script",
]
file_name: str = Field(min_length=1, max_length=255)
visibility: Literal["private", "workspace", "public"] = "private"
is_immutable: bool = False
@@ -78,6 +79,7 @@ class ServerObjectRequest(StrictModel):
visibility: Literal["private", "workspace", "public"] = "private"
is_immutable: bool = False
idempotency_key: str = Field(min_length=8, max_length=128)
relative_path: str | None = Field(default=None, max_length=1024)
class DownloadUrlRequest(StrictModel):