We always update the available OpenAI models when a new version of AI Engine is released. However, if you can’t wait to try out the latest model that was released just two hours ago, you can manually add it to the OpenAI model list in AI Engine.
$new_models = array([
"model" => "gpt-4.1", // The model ID, exactly as the API expects it
"name" => "GPT 4.1", // The label shown in AI Engine
"family" => "gpt4.1",
"price" => [
"in" => 2.00,
"out" => 8.00,
],
"type" => "token",
"unit" => 1 / 1000000,
"maxCompletionTokens" => 16384,
"maxContextualTokens" => 128000,
"finetune" => false,
"tags" => ['core', 'chat', 'vision', 'functions', 'json']
]);
add_filter('mwai_openai_models', function ($models) use ($new_models) {
return array_merge($models, $new_models);
});
The same works for other providers that use a fixed model list: use mwai_anthropic_models or mwai_perplexity_models instead of mwai_openai_models. Providers with a Refresh Models button (Google, OpenRouter, Mistral, xAI, Ollama and others) fetch their models directly, so you only need to click it.