Descripción
Este plugin ofrece integración con Anthropic para el SDK de PHP AI Client. Permite que los sitios de WordPress utilicen los modelos Claude de Anthropic para la generación de texto y otras funciones de IA.
Características:
- Generación de texto con los modelos de Claude
- Function calling support
- Extended thinking support
- Registro automático de proveedor
Los modelos disponibles se detectan dinámicamente a través de la API de Anthropic, incluidos los modelos de Claude para la generación de texto con compatibilidad con entradas multimodales.
Requisitos:
- PHP 7.4 o superior
- WordPress 7.0 or higher
- Clave de API de Anthropic
Instalación
- Sube los archivos del plugin a
/wp-content/plugins/ai-provider-for-anthropic/ - Activa el plugin a través del menú “Plugins” en WordPress
- On WordPress 7.0 and above, add your Anthropic API key under Settings > Connectors. Alternatively, on any supported WordPress version, provide the key via the
ANTHROPIC_API_KEYenvironment variable or PHP constant
FAQ
-
¿Cómo consigo una clave de API de Anthropic?
-
Entra en la Consola de Anthropic para crear una cuenta y generar una clave de API.
-
¿Funciona este plugin sin el PHP AI Client?
-
No. This plugin provides the Anthropic-specific implementation that the PHP AI Client uses. WordPress 7.0 and above include the PHP AI Client, so nothing else needs to be installed. On WordPress 6.9, the wordpress/php-ai-client package must be installed separately.
-
Why do I see “It was not possible to connect to the provider using this key”?
-
When you save a key under Settings > Connectors, WordPress checks it by requesting the list of available models from the Anthropic API. This message is shown whenever that request fails, whatever the reason. Common causes are:
- The key was mistyped, copied with extra characters, or has been revoked in the Anthropic Console.
- The server cannot reach
api.anthropic.com, for example because of a firewall, a proxy, or the network setup of a local development environment. - The request took longer than the default WordPress HTTP timeout of 5 seconds.
- The Anthropic API was temporarily unavailable.
To find out which one applies, run the same request from the server or container that runs WordPress, replacing
YOUR_API_KEYwith your key:curl -sS -m 5 https://api.anthropic.com/v1/models -H "x-api-key: YOUR_API_KEY" -H "anthropic-version: 2023-06-01"If this returns a list of models, the key and the connection both work. Otherwise the output shows whether the key was rejected or the API could not be reached.
Reseñas
No hay reseñas para este plugin.
Colaboradores & Desarrolladores
“AI Provider for Anthropic” es software de código abierto. Las siguientes personas han contribuido a este plugin.
Colaboradores“AI Provider for Anthropic” ha sido traducido en 23 idiomas. Gracias a los traductores por sus contribuciones.
Traduce “AI Provider for Anthropic” a tu idioma.
¿Interesado en el desarrollo?
Revisa el código, echa un vistazo al repositorio SVN, o suscríbete al registro de desarrollo por RSS .
Historial de cambios
1.0.6 – 2026-12-03
Changed
- Updated setup and FAQ documentation for Connectors API-key configuration, key precedence, and connection troubleshooting (#56).
- Bump WordPress tested-up-to version 7.2 (#58).
- Bump WordPress minimum supported version to 7.0 (#58).
Fixed
- Support Anthropic Agent Skills by ignoring code-execution results, merging custom tools, and preserving containers when resuming paused turns (#26).
- Flatten top-level
oneOf,anyOf, andallOfin tool input schemas to prevent Anthropic requests from failing (#43). - Report server tool usage, such as web search request counts, in the result’s additional data (#46).
- Restored corrupted metadata for four development dependencies in
composer.lock, resolving Composer installation conflicts (#49). - Defaulted
max_tokensto the model’s output limit (capped at 16,000) instead of a fixed 4,096 when no limit is configured, and reported the limit that was actually sent inTokenLimitReachedException(#55).
1.0.5 – 2026-10-01
Changed
- Throw
TokenLimitReachedExceptionwhen the Anthropic API stops withmax_tokensormodel_context_window_exceeded, instead of silently returning a truncated result (#4). - Added a WordPress Playground preview blueprint (#40).
Fixed
- Preserved extended thinking signatures across conversation turns, preventing “thinking.signature: Field required” errors on multi-turn conversations (#31).
- Continued turns that stop with
pause_turninstead of returning a truncated result (#32). - Made model sorting robust to empty regex matches and tested compatibility with PHP AI Client 1.3.1 (#34).
- Anthropic thinking-token usage is now reported via thoughtTokens, with totals preserved and paused-turn continuations accumulated correctly (#44).
1.0.4 – 2026-08-17
Changed
- Bumped WordPress tested-up-to version 7.1 #35.
Fixed
- Corrected model metadata for Claude Opus 4.7 and later, including Claude 5 models, so unsupported sampling parameters are no longer advertised during automatic model selection #25.
- Normalized empty tool-call arguments as JSON objects, preventing Anthropic API errors when replaying tool calls that accept no arguments #23.
1.0.3 – 2026-05-13
- Agregado el logotipo del proveedor a los metadatos si la versión del cliente es > 1.3.0 (#18).
1.0.2 – 2026-03-04
- Add plugin directory assets by @shaunandrews in https://github.com/WordPress/ai-provider-for-anthropic/pull/10
- Agregada la etiqueta “connector” al archivo readme.txt, por @jeffpaul en https://github.com/WordPress/ai-provider-for-anthropic/pull/12
- Agregada la descripción del proveedor de @felixarntz en https://github.com/WordPress/ai-provider-for-anthropic/pull/13
1.0.1 – 2026-02-23
- Initial release of the plugin
- Support for Claude text generation models
- Function calling support
- Extended thinking support
1.0.0 – 2026-02-11
- Initial release of the Composer package
