Michael
Forum Replies Created
-
These days, it’s quite common for complex WordPress plugins to provide a backend service. As long as you don’t force users to sign up, that’s fine. Make this feature optional and store the metadata locally as a fallback.
Jensen Huang recently claimed that the models no longer hallucinate. While this is certainly an exaggeration, I can confirm that, after decades of working with countless software engineers, humans hallucinate much more than AI does. In fact, the idea that AI hallucinates more than humans is a hallucination in itself. For instance, if you point out to a software engineer that their application has flaws or bugs, they will hallucinate 90% of the time, whereas a model will admit its mistakes in 99% of cases. 😉
I wouldn’t expect reliable standards from inference providers anytime soon. The competition is fierce, and the industry is advancing quickly. To keep up with developments, you have to build your own online service. I am confident that AI agents can update the database more reliably than humans.Jordy, when I mentioned it doesn’t make sense, I didn’t mean to offend. If it truly doesn’t make sense, then it simply doesn’t. There’s no reason to sugarcoat it. I’ve said before that AI Engine is the best WordPress plugin ever, and these minor flaws won’t change that.
Pricing is indeed important. However, last time I complained, the issue was that the pricing was off by orders of magnitude. I don’t mind if it’s just a few cents or dollars off. The pricing of successor models is typically similar to that of their predecessors.
Given how quickly the AI industry is evolving, hardcoding pricing information and metadata indeed makes little sense. AI Engine is the only AI tool I know that works this way.
You can store this metadata in a central database and have AI Engine retrieve it from there. An AI agent can easily keep the database up to date. You don’t want to do such things manually in 2026.
I see you’ve just updated the AI Engine. Thanks for that!I still don’t see version 1.8.1 available for the pro edition. It appears to be accessible only in the standard edition of AI engine.
That’s great! Thanks a lot!
After I removed the credentials request, I no longer saw any logs in the dev log on the AI Engine frontend.
I am unsure why you need the WP Filesystem to write to a log file in uploads. Many sites don’t use define(‘FS_METHOD’, ‘direct’) due to security. This way, you don’t need to give write permissions to the web server in wp-content, which means you must provide credentials when updating plugins. However, most sites grant write permissions to the uploads folder because you usually don’t have executables there. Thus, you don’t need to fall back to PHP’s error_log and can write to uploads without WP Filesystem being enabled.
I wonder why Roo Code and Cline consistently displayed the correct costs if there was a bug in OpenRouter. Plus, version 2.7.6 still shows the incorrect costs, whereas it functions correctly now. Anyway, I am glad it works now.
However, version 2.7.8 has another serious issue. It crashes WordPress if you don’t have define(‘FS_METHOD’, ‘direct’); in wp-config. In php_errors.log, I see this: AI Engine: Unable to initialize WP_Filesystem.
In 2.7.6, the price calculation for OpenAI: GPT-4o Search Preview through OpenRouter remains incorrect by a significant margin.
It isn’t even working with usleep( 10000 ); It seems that the if clause isn’t being executed at all.
It is not working. Please try it yourself.
The number changes, though:
AI Engine: $0.004, OpenRouter: 0.0389
It is only one order of magnitude off now.
I added the constant to wp-config.php. No change. The calculation is still incorrect.
Did you try the new version with GPT-4o Search and OpenRouter?
This is the result of my test: AI Engine: $0.0009525, OpenRouter: $0.036
I’d rather have a slight delay and ensure accurate calculations. Offering a commercial service without reliably deducting credits from users isn’t feasible.
I modified the line to if ( !empty( $reply->id ) ) {, but the calculation is still significantly incorrect. In my test, AI Engine calculated $0.0001584, while OpenRouter calculated $0.0277.
I’ve also noticed that the usage stats for tokens and costs are significantly inaccurate. This issue appears to be unrelated to the search problem, as the numbers were incorrect even before we began using search models.
Jordy, thanks for looking into this.
I tested the search models GPT-4o Search and Perplexity Sonar in Roo Code with OpenRouter. The VS Code extension consistently calculates costs accurately up to the fifth decimal place. This tells me that it is doable.
When you try it, keep in mind that Roo Code usually sends multiple queries for a single prompt. However, Roo Code displays the costs for each query, which always match exactly with what’s shown in the OpenRouter Activity.
Roo Code is open source. Take a look at how they’re doing it.
Soon, most models will support search. If you want to keep the price calculation feature, getting it right now is crucial. I believe an accurate price calculation feature is essential for business users.
Thank you for your reply.
Estimates are fine. The issue is that the AI Engine calculates the costs of search models like GPT-4o Search incorrectly, leading to numbers that are off by an order of magnitude.
When using search models, you can’t rely solely on the number of input and output tokens to calculate costs. You also need to account for the search costs, which AI companies charge separately.
This can be done easily. Take a look at the VS Code extension, Roo Code, which accurately calculates the costs of search models.
Fantastic! The container has been created.
Thanks a lot!