Skip to content

Gradio plugin causes 'invalid prompt' error #154

Description

@MihalyToth20

Before you submit

  • I have read the Common Issues and ensured this issue is not covered there.
  • I have searched the existing issues and this is not a duplicate. Sorry, my Chinese is not good enough to try to find if this is already present in the issues.

Describe the bug
I have added a Gradio plugin, namely the Qwen-Coder-WebDev to AIAW and it actually does a pretty great job, combined with Gemini 3 flash in generating simple apps / webpages. But as soon as the Qwen-coder generation is finished, I can't seem to send another message, because it throws this error:

Invalid prompt: The messages must be a ModelMessage[]. If you have passed a UIMessage[], you can use convertToModelMessages to convert them.

To Reproduce
Steps to reproduce the behavior:

  1. Install this plugin:
{
    "id": "hf-caly-coder-000000000000000000000002",
    "title": "QWEN-coder",
    "description": "Qwen code generation agent.",
    "baseUrl": "https://qwen-qwen3-coder-webdev.hf.space",
    "avatar": {
        "type": "icon",
        "icon": "code",
        "hue": 80
    },
    "endpoints": [
        {
            "type": "tool",
            "name": "code_generation",
            "description": "Use this tool to generate code based on a prompt.",
            "prompt": "Use this tool to generate code based on a prompt.",
            "path": "/generate_code",
            "inputs": [
                {
                    "name": "input_value",
                    "description": "A prompt to generate an code for",
                    "paramType": "required",
                    "type": "str"
                },
                {
                    "name": "system_prompt_input_value",
                    "paramType": "optional",
                    "value": "",
                    "type": "str"
                }
            ],
            "outputIdxs": [
                1
            ]
        }
    ],
    "noRoundtrip": false
}
  1. Add hugging face api token.
  2. Enable this in any assistant.
  3. Attempt to generate a simple todoapp.
  4. Wait for successful response, and try to send a new message. See the error popping up.
    Expected behavior
    The expected behavour should be that it allows chatting futher. Note that the plugin endpoint can return markdonw, or pure text, markdown is at 0, text is at 1. No matter which one is chosen it will throw this error.

Screenshots
Image

Environment

  • Platform: [Windows]
  • Version: [v1.8.6]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions