Skip to content

Support local AI providers without API keys in credential checks #336

@raftaar1191

Description

@raftaar1191

Description

When only a local/self-hosted AI provider is installed (no API key required), the AI settings page incorrectly reports that no valid AI connector is configured.

Expected behavior:

  • Local providers that do not require API-key auth should be able to work with the AI plugin.

Current behavior:

  • The AI settings page shows: "The AI plugin requires a valid AI Connector to function properly..." even when a local provider plugin is installed and configured.

Step-by-step reproduction instructions

  1. Install WordPress 7.0 + AI plugin (v0.6.0).
  2. Install and activate a local provider plugin, for example:
  3. Do not configure any cloud API key connector.
  4. Open wp-admin/options-general.php?page=ai.
  5. Observe the error notice that says no valid AI connector is configured.

Screenshots, screen recording, code snippet

Image Image

Error text shown in settings page:

The AI plugin requires a valid AI Connector to function properly. Verify you have one or more AI Connectors configured here.

Context:

  • Local-hosted providers such as Ollama/llama.cpp-style integrations may not need API credentials.

Environment info

  • WordPress version: 7.0
  • AI plugin version: 0.6.0
  • Local provider example: ai-provider-for-ollama
  • Theme: not relevant to reproduce (tested on admin settings page)
  • Device/OS: macOS desktop
  • Browser: Chrome (also reproducible in other browsers)

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except the AI plugin.

  • Yes (exception: local provider plugin required to reproduce)

Please confirm which theme type you used for testing.

  • Not sure

Additional note

A filter-based extension point in has_ai_credentials() would allow third-party local providers to declare credential availability for non-API-key connectors while preserving default behavior for API-key connectors.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Bug.

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions