Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion langfuse/api/resources/commons/types/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Model(pydantic_v1.BaseModel):
Apply only to generations which are newer than this ISO date.
"""

unit: ModelUsageUnit = pydantic_v1.Field()
unit: typing.Optional[ModelUsageUnit] = pydantic_v1.Field(default=None)
"""
Unit used by this model.
"""
Comment on lines +34 to 37
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Making unit optional could cause issues if any code relies on unit being present for cost calculations. Consider adding validation to ensure unit is present when input_price, output_price, or total_price are set.

Expand Down
Loading