Title: Code engine and AI engine issues
Last modified: March 4, 2025

---

# Code engine and AI engine issues

 *  Resolved [lazandsue](https://wordpress.org/support/users/lazandsue/)
 * (@lazandsue)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/code-engine-and-ai-engine-issues/)
 * Im having issues with both AI engine and code engine. Code engine wont let me
   save a callable function. i get the below errors when navigating tabs on code
   engine. If i create a simple global function that echos to the test window, the
   test screen seem to work and prints it. However if i create a simple callable
   function that just echos todays date the test screen doesnt output anything. 
   
   i get the below errors in the dev console and im also un able to save the snippet
   due to “The reply sent by the server is broken.” As a result the function menu
   never shows up in AI engine menu for me to select it. This is the same result
   if i manually add my own php functions and define it as per the docs for declaring
   functions.
 * ![](https://i0.wp.com/sunsetbeachone.com.au/wp-content/uploads/2025/03/Screenshot-
   from-2025-03-04-09-53-47.jpg?ssl=1)
 * I have no PHP debug logs related to this issue.
   I have uninstalled all other 
   plugins and themes which didnt help.i have the API enabled, i have set up a bearer
   token successfully.I do have a callable function stored in the database for code
   engine (on the rare occassion it does actually save functions) but still, AI 
   engine doesnt have a functions menu for me to select it.AI Engine is 2.7.4Code
   Engine is 0.2.9Not sure why run/lint is producing a 403 error as per above screenshot
   eitheri’m also 4 days into trying to diagnose it myself before posting this so
   im now at the point i need so assistance please 🙂On a side note : for Jordy…..
   in the addons screen of AI engine the link to deepseek addon goes to a invalid
   url as well 🙂

Viewing 1 replies (of 1 total)

 *  Plugin Support [Val Meow](https://wordpress.org/support/users/valwa/)
 * (@valwa)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/code-engine-and-ai-engine-issues/#post-18351718)
 * Hey [@lazandsue](https://wordpress.org/support/users/lazandsue/)! 👋
 * Unfortunately, a **403 error** isn’t something we can fix on the plugin side.
   It means that **authorization isn’t granted** to the current user, so the route
   is **forbidden**.
 * Both of these routes check for the **manage_options** capability. Make sure your
   user has this right.
 * If not, you can use the **mwcode_allow_usage** filter to always return true so
   that every user can query this route, which should fix the issue:
 *     ```wp-block-code
       add_filter( 'mwcode_allow_usage', function() {
           return true;
       });
       ```
   
 * If the issue persists or happens **only from time to time**, it could be due 
   to a **cache, security, or optimization plugin**interfering with the requests.
   Try disabling those temporarily to see if that helps.
 * Thanks! 😊

Viewing 1 replies (of 1 total)

The topic ‘Code engine and AI engine issues’ is closed to new replies.

 * ![](https://ps.w.org/ai-engine/assets/icon-256x256.png?rev=3431928)
 * [AI Engine - The Chatbot, AI Framework & MCP for WordPress](https://wordpress.org/plugins/ai-engine/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ai-engine/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ai-engine/)
 * [Active Topics](https://wordpress.org/support/plugin/ai-engine/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ai-engine/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ai-engine/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Val Meow](https://wordpress.org/support/users/valwa/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/code-engine-and-ai-engine-issues/#post-18351718)
 * Status: resolved