• fredpeng

    (@fredpeng)


    Hi, I got an error when I try to input the API Key: It was not possible to connect to the provider using this key.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeffrey Paul

    (@jeffpaul)

    That error usually means the Anthropic API key on file isn’t being accepted, most often because it was mistyped or copied with extra characters, has since been revoked or rotated in the Anthropic Console, or the account it belongs to has no active billing/credits. It can also happen if the site’s server is blocked from reaching api.anthropic.com due to hosting/firewall restrictions.

    Could you try generating a fresh API key from the Anthropic Console and re-entering it in the plugin settings?

    If the same error persists with a brand-new key, that would point to a network/connectivity issue on the hosting side rather than the key itself, and we can dig into that next.

    ON a local machine, using DDEV that has zero issues with any other plugin, on a brand new default install via CLI using brand new api key, on a Max paid account and $100 of credit against API, it fails to take the keys.
    ON trying multiple keys on multiple settings, checking for copy paste issues, i canceled the process and lost the site as it blew a gasket and tanked the site. Have to do manual clean up at plugin file level.

    Fatal error: Uncaught Error: Class “WordPress\AiClient\Providers\ApiBasedImplementation\ListModelsApiBasedProviderAvailability” not found in /var/www/html/wordpress-security.local/wp-content/plugins/ai-provider-for-anthropic/src/Provider/AnthropicProvider.php:97 Stack trace: #0 /var/www/html/wordpress-security.local/wp-includes/php-ai-client/src/Providers/AbstractProvider.php(69): WordPress\AnthropicAiProvider\Provider\AnthropicProvider::createProviderAvailability() #1 /var/www/html/wordpress-security.local/wp-includes/php-ai-client/src/Providers/ProviderRegistry.php(359): WordPress\AiClient\Providers\AbstractProvider::availability() #2 /var/www/html/wordpress-security.local/wp-includes/php-ai-client/src/Providers/ProviderRegistry.php(94): WordPress\AiClient\Providers\ProviderRegistry->setHttpTransporterForProvider(‘WordPress\\Anthr…’, Object(WordPress\AiClient\Providers\Http\HttpTransporter)) #3 /var/www/html/wordpress-security.local/wp-content/plugins/ai-provider-for-anthropic/plugin.php(51): WordPress\AiClient\Providers\ProviderRegistry->registerProvider(‘WordPress\\Anthr…’) #4 /var/www/html/wordpress-security.local/wp-includes/class-wp-hook.php(353): WordPress\AnthropicAiProvider\register_provider(”) #5 /var/www/html/wordpress-security.local/wp-includes/class-wp-hook.php(377): WP_Hook->apply_filters(NULL, Array) #6 /var/www/html/wordpress-security.local/wp-includes/plugin.php(523): WP_Hook->do_action(Array) #7 /var/www/html/wordpress-security.local/wp-settings.php(779): do_action(‘init’) #8 /var/www/html/wordpress-security.local/wp-config.php(43): require_once(‘/var/www/html/w…’) #9 /var/www/html/wordpress-security.local/wp-load.php(50): require_once(‘/var/www/html/w…’) #10 /var/www/html/wordpress-security.local/wp-admin/admin.php(35): require_once(‘/var/www/html/w…’) #11 /var/www/html/wordpress-security.local/wp-admin/index.php(10): require_once(‘/var/www/html/w…’) #12 {main} thrown in /var/www/html/wordpress-security.local/wp-content/plugins/ai-provider-for-anthropic/src/Provider/AnthropicProvider.php on line 97

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.