{"id":371597,"date":"2026-09-22T00:21:48","date_gmt":"2026-09-22T00:21:48","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ai-provider-for-command-code\/"},"modified":"2026-09-22T00:21:11","modified_gmt":"2026-09-22T00:21:11","slug":"ai-provider-for-command-code","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/ai-provider-for-command-code\/","author":14788414,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.6","stable_tag":"1.0.6","tested":"7.1.1","requires":"6.9","requires_php":"7.4","requires_plugins":null,"header_name":"AI Provider for Command Code","header_author":"Bestony","header_description":"Command Code provider for the WordPress AI Client.","assets_banners_color":"81a1d2","last_updated":"2026-09-22 00:21:11","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/bestony\/AI-Provider-for-Command-Code","header_author_uri":"https:\/\/github.com\/bestony","rating":0,"author_block_rating":0,"active_installs":0,"downloads":39,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.6":{"tag":"1.0.6","author":"bestony","date":"2026-09-22 00:21:11","revision":3706445}},"upgrade_notice":{"1.0.6":"<p>The stored Command Code API key is no longer read by the plugin; the AI Client reports whether a credential is configured.<\/p>","1.0.3":"<p>Adds the External services documentation and the GPL license file.<\/p>","1.0.2":"<p>Plugin Check cleanup: escaped exception messages, autoloader direct-access guard, five readme tags.<\/p>","1.0.1":"<p>Fix <code>400 invalid_request_error: response_format<\/code> on JSON schema features such as Editorial Notes.<\/p>"},"ratings":[],"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3706444,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3706444,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3706444,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.6"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3706444,"resolution":"1","location":"assets","locale":"","width":2072,"height":1262}},"screenshots":{"1":"The Command Code connector card on Settings \u2192 Connectors, with the API key field and the\nmodels the provider reports."}},"plugin_section":[],"plugin_tags":[2353,229563,281925,25308,216551],"plugin_category":[],"plugin_contributors":[145631],"plugin_business_model":[],"class_list":["post-371597","plugin","type-plugin","status-publish","hentry","plugin_tags-ai","plugin_tags-claude","plugin_tags-command-code","plugin_tags-connector","plugin_tags-gpt","plugin_contributors-bestony","plugin_committers-bestony"],"banners":{"banner":"https:\/\/ps.w.org\/ai-provider-for-command-code\/assets\/banner-772x250.png?rev=3706444","banner_2x":"https:\/\/ps.w.org\/ai-provider-for-command-code\/assets\/banner-1544x500.png?rev=3706444","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/ai-provider-for-command-code\/assets\/icon.svg?rev=3706444","icon":"https:\/\/ps.w.org\/ai-provider-for-command-code\/assets\/icon.svg?rev=3706444","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/ai-provider-for-command-code\/assets\/screenshot-1.png?rev=3706444","caption":"The Command Code connector card on Settings \u2192 Connectors, with the API key field and the\nmodels the provider reports."}],"raw_content":"<!--section=description-->\n<p>Adds <a href=\"https:\/\/commandcode.ai\/docs\/provider\">Command Code<\/a> as a provider for the WordPress AI Client.\nCommand Code routes Claude, GPT, Gemini and the top open models through a single API with\nOpenAI-compatible and Anthropic-compatible endpoints, so one API key covers every model the\nAI plugin can use.<\/p>\n\n<ul>\n<li>The model list is fetched live from <code>GET \/provider\/v1\/models<\/code>, including newly added models.<\/li>\n<li>Claude models are called on the Anthropic Messages endpoint, everything else on the\nOpenAI-compatible chat completions endpoint \u2014 matching the <code>supported_endpoints<\/code> field the API\nreports for each model.<\/li>\n<li>Tool calling, structured output (JSON schema), chat history, stop sequences and multi-candidate\ngeneration are supported where the model supports them.<\/li>\n<li>Zero data retention can be requested per request (see below).<\/li>\n<\/ul>\n\n<h3>Configuration<\/h3>\n\n<p>The API key is read, in order of precedence, from:<\/p>\n\n<ol>\n<li>The <code>COMMANDCODE_API_KEY<\/code> environment variable<\/li>\n<li>The <code>COMMANDCODE_API_KEY<\/code> PHP constant<\/li>\n<li>The <code>connectors_ai_commandcode_api_key<\/code> option (Settings \u2192 Connectors)<\/li>\n<\/ol>\n\n<p>All optional settings are environment variables or PHP constants:<\/p>\n\n<ul>\n<li><code>COMMANDCODE_DEFAULT_MODEL<\/code> \u2014 model ID to prefer in pickers and feature filters.\nDefault: <code>claude-sonnet-5<\/code>.<\/li>\n<li><code>COMMANDCODE_ZDR<\/code> \u2014 set to <code>1<\/code> to send <code>x-cmd-zdr: 1<\/code> and route only through zero-data-retention\nupstreams. Requests fail with a 422 when the chosen model has no ZDR-capable upstream instead of\nsilently falling back. Default: off.<\/li>\n<li><code>COMMANDCODE_BASE_URL<\/code> \u2014 Provider API base URL.\nDefault: <code>https:\/\/api.commandcode.ai\/provider\/v1<\/code>.<\/li>\n<li><code>COMMANDCODE_MODEL_INPUT_MODALITIES<\/code> \u2014 comma-separated list of modalities your models accept.\nInclude <code>image<\/code> (e.g. <code>text,image<\/code>) for deployments that require vision features. Default: text only.<\/li>\n<li><code>COMMANDCODE_REQUEST_TIMEOUT<\/code> \u2014 request timeout in seconds. Default: <code>120<\/code>.<\/li>\n<li><code>COMMANDCODE_CONNECT_TIMEOUT<\/code> \u2014 connection timeout in seconds. Default: <code>10<\/code>.<\/li>\n<li><code>COMMANDCODE_STRUCTURED_OUTPUT<\/code> \u2014 how JSON response requests are shaped. One of:\n\n<ul>\n<li><code>json_schema<\/code> (default) \u2014 sends the JSON schema. Use this by default.<\/li>\n<li><code>json_object<\/code> \u2014 asks only for valid JSON, without the schema. Widely supported fallback.<\/li>\n<li><code>none<\/code> \u2014 sends no <code>response_format<\/code> at all. Use this when a model rejects every form of it.\nIf a feature that needs JSON (e.g. Editorial Notes) fails with\n400 ... \"param\":\"response_format\", try <code>json_object<\/code>.<\/li>\n<\/ul><\/li>\n<\/ul>\n\n<p>To influence which models the AI plugin picks for its features, use the standard filters in your own\nplugin or theme \u2014 this plugin already puts its preferred model first:<\/p>\n\n<pre><code>add_filter( 'wpai_preferred_text_models', function ( $models ) {\n    array_unshift( $models, array( 'commandcode', 'gpt-5.6-luna' ) );\n    return $models;\n} );&lt;h3&gt;External services&lt;\/h3&gt;\n<\/code><\/pre>\n\n<p>This plugin connects to the Command Code Provider API, an external service operated by Command Code.\nIt is required so the WordPress AI Client can route requests to models from your site. Command Code is\na paid service: a plan with API access is needed (the free Go plan has none), and requests are billed\nto your Command Code account.<\/p>\n\n<p>The plugin contacts the following endpoints under <code>https:\/\/api.commandcode.ai\/provider\/v1<\/code>:<\/p>\n\n<ul>\n<li><code>GET \/models<\/code> \u2014 called when the AI Client refreshes its list of available models, and when it checks\nwhether your credentials work. No user content is sent; only your API key, so Command Code can\nreturn the models available to your account.<\/li>\n<li><code>POST \/chat\/completions<\/code> \u2014 called whenever any plugin or theme on your site uses the WordPress AI\nClient to generate text with a non-Claude model. The request carries your API key and the prompt:\nmessages, system instruction, tool definitions, and any other parameters the calling code supplied\n(conversation history, a JSON schema for structured output, or files attached to the prompt).<\/li>\n<li><code>POST \/messages<\/code> \u2014 the same as above, for Claude models, which Command Code serves only on this\nendpoint.<\/li>\n<\/ul>\n\n<p>No request is made until something on your site asks the AI Client for a generation, or the AI Client\nrefreshes its model list. Your API key is stored on your own site and is only ever sent to\n    api.commandcode.ai.<\/p>\n\n<p>Optional: setting <code>COMMANDCODE_ZDR=1<\/code> adds an <code>x-cmd-zdr: 1<\/code> header, asking Command Code to route the\nrequest only through zero-data-retention upstreams. Requests fail with a 422 when a chosen model has\nno such upstream, rather than falling back silently.<\/p>\n\n<p>This service is provided by Command Code:<\/p>\n\n<ul>\n<li>Provider API documentation: <a href=\"https:\/\/commandcode.ai\/docs\/provider\">https:\/\/commandcode.ai\/docs\/provider<\/a><\/li>\n<li>Terms of Service: <a href=\"https:\/\/commandcode.ai\/terms\">https:\/\/commandcode.ai\/terms<\/a><\/li>\n<li>Privacy Policy: <a href=\"https:\/\/commandcode.ai\/privacy\">https:\/\/commandcode.ai\/privacy<\/a><\/li>\n<li>Zero data retention: <a href=\"https:\/\/commandcode.ai\/docs\/resources\/zdr\">https:\/\/commandcode.ai\/docs\/resources\/zdr<\/a><\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to <code>\/wp-content\/plugins\/ai-provider-for-command-code\/<\/code>.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to Settings \u2192 Connectors, open the Command Code card and paste your Provider API key \u2014 or\ndefine it outside the database (see Configuration).<\/li>\n<\/ol>\n\n<p>A Command Code plan with API access is required. The Go plan has no API access; Provider, GOAT, Pro,\nMax and Team plans do.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20plugin%20work%20without%20the%20php%20ai%20client%3F\"><h3>Does this plugin work without the PHP AI Client?<\/h3><\/dt>\n<dd><p>No. It requires the PHP AI Client SDK, which is provided by WordPress 7.0 or by the AI plugin. The\nprovider stays silent when the SDK is missing.<\/p><\/dd>\n<dt id=\"do%20i%20need%20to%20configure%20anything%20in%20the%20database%3F\"><h3>Do I need to configure anything in the database?<\/h3><\/dt>\n<dd><p>Only the API key, and only if you cannot set an environment variable or constant. The provider adds\nno settings page of its own: everything it needs is on Settings \u2192 Connectors.<\/p><\/dd>\n<dt id=\"which%20models%20can%20be%20used%20with%20vision%20features%3F\"><h3>Which models can be used with vision features?<\/h3><\/dt>\n<dd><p>Command Code's models endpoint does not report which models accept images, so the plugin declares\nimage input from a maintained list in the source. If your model supports images but is not on that\nlist, set <code>COMMANDCODE_MODEL_INPUT_MODALITIES=text,image<\/code> to declare it.<\/p><\/dd>\n<dt id=\"why%20is%20%60temperature%60%20missing%20on%20gpt-5%20models%3F\"><h3>Why is `temperature` missing on GPT-5 models?<\/h3><\/dt>\n<dd><p>GPT-5 and later reasoning families reject non-default sampling parameters, so the plugin does not\nadvertise them for those models. That is upstream behaviour, not a plugin limitation.<\/p><\/dd>\n<dt id=\"editorial%20notes%20fails%20with%20%60400%20...%20response_format%60\"><h3>Editorial Notes fails with `400 ... response_format`<\/h3><\/dt>\n<dd><p>That feature asks for a JSON schema response. Set <code>COMMANDCODE_STRUCTURED_OUTPUT=json_object<\/code> to ask\nfor plain JSON instead, or <code>none<\/code> to send no <code>response_format<\/code> at all \u2014 the prompt still asks for JSON.<\/p><\/dd>\n<dt id=\"where%20is%20my%20api%20key%20stored%3F\"><h3>Where is my API key stored?<\/h3><\/dt>\n<dd><p>In the WordPress options table on your own site, under the AI Client's connector option\n(<code>connectors_ai_commandcode_api_key<\/code>), or in an environment variable or PHP constant if you set one.\nIt is never transmitted anywhere except to the Command Code API when fulfilling a request.<\/p><\/dd>\n<dt id=\"what%20data%20leaves%20my%20site%3F\"><h3>What data leaves my site?<\/h3><\/dt>\n<dd><p>Only what you send to the AI: your prompts, and whatever the calling plugin or theme adds to them\n(system instructions, conversation history, tool definitions, a JSON schema, or attached files). See\nExternal services below for the exact endpoints.<\/p><\/dd>\n<dt id=\"is%20there%20a%20settings%20page%3F\"><h3>Is there a settings page?<\/h3><\/dt>\n<dd><p>No. Everything this plugin needs lives on Settings \u2192 Connectors, and the optional behaviour is\ncontrolled by environment variables or constants.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Stop reading the <code>connectors_ai_commandcode_api_key<\/code> option directly. Whether a Command Code\ncredential is configured is now asked of the AI Client, so the plugin never handles the key the\nuser saved in Settings \u2192 Connectors. Behaviour is unchanged: the <code>COMMANDCODE_API_KEY<\/code> constant and\nenvironment variable still work.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Document the external service in the readme: the endpoints contacted, what data is sent and when,\nand links to Command Code's Terms of Service and Privacy Policy.<\/li>\n<li>Ship the GPL-2.0 LICENSE file with the plugin.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Escape all exception messages and mark them for translation, so Plugin Check passes cleanly.<\/li>\n<li>Add a direct-access guard to the autoloader.<\/li>\n<li>Reduce the readme to five tags.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Fix <code>400 invalid_request_error: response_format<\/code> on features that request a JSON schema, such as\nEditorial Notes. The JSON schema is now sent in the wrapper the API expects.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Command Code provider for the PHP AI Client: Claude, GPT, Gemini and leading open models through one API.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/371597","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=371597"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/bestony"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=371597"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=371597"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=371597"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=371597"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=371597"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=371597"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}