mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
feat: persist real LLM cost to DB + block-level attribution (public API unchanged — placeholder preserved) (#5656)
This commit is contained in:
parent
6c2b4728ee
commit
3fce82760f
10 changed files with 383 additions and 28 deletions
|
|
@ -0,0 +1,30 @@
|
|||
"""add llm_cost to workflow_run_blocks
|
||||
|
||||
Revision ID: c19d7d385560
|
||||
Revises: c9005bafa5ec
|
||||
Create Date: 2026-04-24T23:53:46.912017+00:00
|
||||
|
||||
"""
|
||||
|
||||
from typing import Sequence, Union
|
||||
|
||||
import sqlalchemy as sa
|
||||
|
||||
from alembic import op
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = "c19d7d385560"
|
||||
down_revision: Union[str, None] = "c9005bafa5ec"
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"workflow_run_blocks",
|
||||
sa.Column("llm_cost", sa.Numeric(), nullable=False, server_default="0"),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("workflow_run_blocks", "llm_cost")
|
||||
Loading…
Add table
Add a link
Reference in a new issue