@@ -475,8 +475,9 @@ class OutputFieldJSONSchemaExtra(BaseModel):
475475 """
476476
477477 field_kind : FieldKind
478- ui_hidden : bool
479- ui_order : Optional [int ]
478+ ui_hidden : bool = False
479+ ui_order : Optional [int ] = None
480+ ui_type : Optional [UIType ] = None
480481
481482 model_config = ConfigDict (
482483 validate_assignment = True ,
@@ -794,17 +795,16 @@ def OutputField(
794795 that adds a few extra parameters to support graph execution and the node editor UI.
795796
796797 Args:
797- ui_type: **DEPRECATED** Optionally provides an extra type hint for the UI. This parameter is no longer used.
798+ ui_type: Optionally provides an extra type hint for the UI. In some situations, the field's type is not enough
799+ to infer the correct UI type. For example, Scheduler fields are enums, but we want to render a special scheduler
800+ dropdown in the UI. Use `UIType.Scheduler` to indicate this.
798801
799802 ui_hidden: Specifies whether or not this field should be hidden in the UI.
800803
801804 ui_order: Specifies the order in which this field should be rendered in the UI. If omitted, the field will be
802805 rendered after all fields with an explicit order, in the order they are defined in the Invocation class.
803806 """
804807
805- if ui_type is not None :
806- logger .warning ("OutputField: 'ui_type' is deprecated." )
807-
808808 return Field (
809809 default = default ,
810810 title = title ,
@@ -824,6 +824,7 @@ def OutputField(
824824 json_schema_extra = OutputFieldJSONSchemaExtra (
825825 ui_hidden = ui_hidden ,
826826 ui_order = ui_order ,
827+ ui_type = ui_type ,
827828 field_kind = FieldKind .Output ,
828829 ).model_dump (exclude_none = True ),
829830 )
0 commit comments