• Hi,
    this is a follow of this previous post that you marked as “Resolved”, but it isn’t.

    I tested another plugin that works fine uploading images with Vision, so the problem is not on the AI provider side.

    Every time I try to upload an image through the AI Engine chatbot I’m having this message: No route was found matching the URL and request method. The message displays just after upload is finished, without hitting the Send button.

    • WordPress is installed in a subdirectory, AI Power works fine this way.
    •  A prompt with only text produces a normal answer. So the chatbot is reaching OpenAI.

    Here are my configs in AI Engine:

    • Memory local: Yes
    • OpenAI, GPT-4o mini, Vision enabled, Temperature 0,5, Max Tokens 16384.
    • Context Embeddings Environment: none.
    • Input Max Length: 16384 | Max Messages: 15 | Context Max Length: 4096.
    • I tried changing both
      Settings > Images & Files > Uploaded by Users >
      Local Upload: Filesystem and Media Library
      Remote Upload: Upload Data and Share URL

    Some additional information from Google Chrome Dev Tools:

    Network > Fetch/XHR:
    upload https://www.fumigatotal.com/wp-json/mwai-ui/v1/files/upload | 404 | xhr | chatbot.js?ver=1730735908:2 

    Console:
    (5) [Violation] Forced reflow while executing JavaScript took 34ms

    POST https://www.fumigatotal.com/wp-json/mwai-ui/v1/files/upload 404 (Not Found)

    onFileUpload Error {status: 404, message: ‘No route was found matching the URL and request method.’}

    Hope this helps. Thanks!

    • This topic was modified 1 week, 2 days ago by Daniel.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @damen02! ??

    The 404 error indicates that the route might not be correctly set up or is missing. But it seems it be existing in your wp-json routes.

    "methods":["POST"],"endpoints":[{"methods":["POST"],"args":[]}],"_links":{"self":[{"href":"https:\/\/www.fumigatotal.com\/wp-json\/mwai-ui\/v1\/files\/upload"

    You can try to go to WordPress settings and re-save your permalinks. This can sometimes resolve routing issues. Disable other plugins (mainly cache and optimization plugins) to check if there’s a conflict causing the issue.

    You could also try enabling the AI Engine public API and making a call from an external client to see if this works. Is the subdirectory REST URL the same one written in the request as well? Hope this helps.

    Thread Starter Daniel

    (@damen02)

    Hi Val, thanks for your answer.

    To me it is very clear that the problem is on your side, not mine.
    The other plugin AI Power is working fine on the same website, with the same plugins, same permalinks structure, same OpenAI provider, same plan… all the same.
    AI Power addresses well the REST API without any intervention from my side, why yours doesn’t?

    However, I tried your suggestions again, deactivated all plugins and re-saved permalinks.
    I even tested your plugin in a completely different installation of WordPress in another domain.
    Problem persists.

    AI Power continues to work fine and your plugin continues to fail.
    I wanted to use yours, but I can’t. Sorry.

    Thanks any way.

    • This reply was modified 1 day, 2 hours ago by Daniel.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.