Linux 软件免费装
Banner图

AI Provider for Osaurus

开发者 euthelup
更新时间 2026年6月2日 09:35
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

ai connector llm local-ai osaurus

下载

0.4.2

详情介绍:

AI Provider for Osaurus wires the Osaurus local LLM runtime into the WordPress AI Client that ships with WordPress 7.0. After activation, any plugin that calls wp_ai_client_prompt() (Gutenberg AI features, official provider plugins, third-party code) can route prompts to Osaurus running on the same machine. Prompts never leave the local network. Why use it Capabilities Image generation, embeddings, and text-to-speech are not supported because Osaurus does not currently expose those endpoints. Pair this plugin with an image-capable provider such as the official AI Provider for OpenAI when you need images. How it works The plugin registers a provider with AiClient::defaultRegistry() and points it at the Osaurus HTTP server. Because Osaurus speaks the OpenAI Chat Completions wire format, the implementation extends the SDK's OpenAI-compatible base classes — so capabilities like streaming and tool calling flow through automatically. Configuration The plugin resolves the Osaurus base URL in this order (first match wins):
  1. OSAURUS_BASE_URL PHP constant defined in wp-config.php.
  2. osaurus_ai_connector_base_url option, settable from Settings → Connectors in wp-admin.
  3. Default: http://127.0.0.1:1337/v1 (works out of the box for bare-metal WordPress on the same Mac as Osaurus; Docker setups must override).
Pick the right URL for your setup WordPress can run in many places — the right base URL depends on how it reaches your Mac, where Osaurus is listening. The fastest way to confirm a URL works from the WordPress host: run curl <base-url>/models from the same shell environment WordPress runs in. A JSON list back means the connector will work. Osaurus project home: osaurus.ai Osaurus documentation: docs.osaurus.ai

安装:

  1. Install and start Osaurus on your Mac (Apple Silicon required).
  2. Confirm Osaurus is reachable, e.g. curl http://127.0.0.1:1337/v1/models.
  3. Install this plugin from the WordPress.org plugin directory, or upload the plugin folder to wp-content/plugins/.
  4. Activate AI Provider for Osaurus on the Plugins screen.
  5. Visit Settings → Connectors. The Osaurus row should report as connected once a model list is available.
If WordPress and Osaurus run on the same host, no further configuration is required — the default http://127.0.0.1:1337/v1 works as-is. If you run WordPress inside Docker (DDEV, Lando, Docker Desktop), switch the URL to http://host.docker.internal:1337/v1 from Settings → Connectors or set OSAURUS_BASE_URL in your environment config.

屏幕截图:

  • Using AI in the block editor — the paragraph toolbar offers Shorten, Expand, and Rephrase, all routed to the local Osaurus server.
  • An AI-generated suggested replacement shown in the editor, produced locally by Osaurus.

常见问题:

Do I need an API key?

No. Osaurus is a local server and does not require credentials. The plugin registers a placeholder authentication so the Connectors screen treats the row as configured.

Does this plugin send data to Osaurus.ai or any third party?

No. All requests go to the Osaurus URL you configure — by default a process on your own machine. See the External services section above.

I'm not on Apple Silicon. Will this work?

Osaurus itself currently targets Apple Silicon. The connector plugin will load on any system but cannot reach Osaurus if Osaurus is not running.

How do I change the Osaurus URL?

Either define OSAURUS_BASE_URL in wp-config.php, or change the URL from Settings → Connectors in wp-admin.

What about image generation, embeddings, or TTS?

Not supported. Osaurus only exposes text / chat completions today. For images, install an image-capable provider plugin alongside this one.

I get an http_request_failed error.

Confirm Osaurus is running and reachable from the host running WordPress. If you run WordPress inside Docker, change the URL to http://host.docker.internal:1337/v1 — the default 127.0.0.1 only works for bare-metal WordPress.

更新日志:

0.4.2