Skip to content

Python: [Bug]: Workflow input schema form in devui not rendering for int fields #3171

@tonybaloney

Description

@tonybaloney

Description

When I put int fields as the schema for my start executor I noticed that DevUI doesn't render the fields correctly:

class AdminContext(BaseModel):
    """Admin user context for enterprise-wide insights.

    Contains user role verification for admin-level access.
    Unlike store manager workflows, no store_id filtering is needed
    since admins see all stores.
    """

    user_role: str
    days_back: int = Field(
        default=30, description="Number of days to analyze (default: 30)"
    )
    potatoes: Optional[int] = 10
    love: bool = True

...

class AdminContextCollector(Executor):
    """Collects admin context and initiates performance analysis."""

    def __init__(self, id: str | None = None):
        super().__init__(id=id or "admin-context-collector")

    @handler
    async def handle(
        self, parameters: AdminContext, ctx: WorkflowContext[AdminContext]
    ) -> None:
        if not parameters.user_role or parameters.user_role.strip().lower() != "admin":
            raise ValueError(
                "User role is required for admin insights"
            )

        await ctx.send_message(parameters)

In the API this returned the following schema:

"input_schema": {
        "additionalProperties": false,
        "description": "Admin user context for enterprise-wide insights.\n\nContains user role verification for admin-level access.\nUnlike store manager workflows, no store_id filtering is needed\nsince admins see all stores.",
        "properties": {
            "user_role": {
                "title": "User Role",
                "type": "string"
            },
            "days_back": {
                "default": 30,
                "description": "Number of days to analyze (default: 30)",
                "title": "Days Back",
                "type": "integer"
            },
            "potatoes": {
                "anyOf": [
                    {
                        "type": "integer"
                    },
                    {
                        "type": "null"
                    }
                ],
                "default": 10,
                "title": "Potatoes"
            },
            "love": {
                "default": true,
                "title": "Love",
                "type": "boolean"
            }
        },
        "required": [
            "user_role"
        ],
        "title": "AdminContext",
        "type": "object"
    },

But in DevUI I see this:

Image

Both of the int fields should be spinners, but it's forcing me to enter JSON

Code Sample

Error Messages / Stack Traces

Package Versions

agent-framework-devui==1.0.0b260107

Python Version

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdevuiDevUI-related itemspython

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions