Descrição
Este plugin oferece integração com a Anthropic para o SDK PHP AI Client. Ele permite que sites WordPress usem os modelos Claude da Anthropic para geração de texto e outras capacidades de IA.
Recursos:
- Geração de texto com modelos Claude
- Suporte a chamada de funções
- Suporte a raciocínio estendido
- Cadastro automático de provedor
Os modelos disponíveis são descobertos dinamicamente a partir da API da Anthropic, incluindo modelos Claude para geração de texto com suporte a entrada multimodal.
Requisitos:
- PHP 7.4 ou superior
- WordPress 7.0 or higher
- Chave de API da Anthropic
Instalação
- Envie os arquivos do plugin para
/wp-content/plugins/ai-provider-for-anthropic/ - Ative o plugin pelo menu ‘Plugins’ no 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
Perguntas frequentes
-
Como obtenho uma chave de API da Anthropic?
-
Acesse o Anthropic Console para criar uma conta e gerar uma chave de API.
-
Este plugin funciona sem o 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.
Avaliações
Não há avaliações para este plugin.
Colaboradores e desenvolvedores
“AI Provider for Anthropic” é um programa de código aberto. As seguintes pessoas contribuíram para este plugin.
ColaboradoresAI Provider for Anthropic” foi traduzido para 23 localidades. Agradecemos aos tradutores por suas contribuições.
Traduzir o “AI Provider for Anthropic” para seu idioma.
Interessado no desenvolvimento?
Navegue pelo código, consulte o repositório SVN ou assine o registro de desenvolvimento por RSS.
Registro de alterações
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
- Adiciona o logotipo do provedor aos metadados se a versão do cliente for > 1.3.0 (#18).
1.0.2 – 2026-03-04
- Adiciona os recursos do diretório de plugins por @shaunandrews em https://github.com/WordPress/ai-provider-for-anthropic/pull/10
- Adiciona a tag ‘connector’ ao readme.txt por @jeffpaul em https://github.com/WordPress/ai-provider-for-anthropic/pull/12
- Adiciona a descrição do provedor por @felixarntz em https://github.com/WordPress/ai-provider-for-anthropic/pull/13
1.0.1 – 2026-02-23
- Lançamento inicial do plugin
- Suporte a modelos Claude de geração de texto
- Suporte a chamada de funções
- Suporte a raciocínio estendido
1.0.0 – 2026-02-11
- Lançamento inicial do pacote Composer
