feat: support image inputs in assistant tests

This commit is contained in:
Xin Wang
2026-08-23 23:46:18 +08:00
parent 0966f382b6
commit 9e4dfbe596
26 changed files with 1010 additions and 146 deletions
+17
View File
@@ -475,6 +475,23 @@ class TestSuite(Base):
)
class TestAsset(Base):
"""Immutable image fixture referenced by one or more test definitions."""
__tablename__ = "test_assets"
id: Mapped[str] = mapped_column(String(40), primary_key=True)
original_name: Mapped[str] = mapped_column(String(255), default="image.jpg")
storage_key: Mapped[str] = mapped_column(String(1024), unique=True)
mime_type: Mapped[str] = mapped_column(String(128), default="image/jpeg")
width: Mapped[int] = mapped_column(Integer)
height: Mapped[int] = mapped_column(Integer)
size_bytes: Mapped[int] = mapped_column(Integer)
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True), server_default=func.now()
)
class TestCase(Base):
"""One editable test definition; nested turns remain one JSON document."""