{"id":11461,"date":"2026-06-02T10:30:09","date_gmt":"2026-06-02T02:30:09","guid":{"rendered":"https:\/\/aeosub.com\/ai-provider-for-osaurus\/"},"modified":"2026-06-02T10:30:09","modified_gmt":"2026-06-02T02:30:09","slug":"ai-provider-for-osaurus","status":"publish","type":"post","link":"https:\/\/aeosub.com\/zh\/ai-provider-for-osaurus\/","title":{"rendered":"AI Provider for Osaurus"},"content":{"rendered":"<div class=\"post-img\" style=\"margin-bottom: 25px\"><img decoding=\"async\" src=\"https:\/\/ps.w.org\/ai-provider-for-osaurus\/assets\/banner-1544x500.png?rev=3557365\" alt=\"AI Provider for Osaurus\" style=\"width: 100%;height: auto;border-radius: 12px\"><\/div>\n<div class=\"plugin-expert-review\" style=\"border: 1px solid #e2e8f0;border-left: 4px solid #4a3bca;border-radius: 10px;padding: 20px;margin-bottom: 25px;background: #fff;font-family: -apple-system, system-ui, sans-serif\">\n<div style=\"font-weight: bold;font-size: 1.1em;color: #4a3bca;margin-bottom: 10px\">Expert Insight<\/div>\n<div style=\"color: #4a5568;font-size: 14px;line-height: 1.6\">\n<div>\n<p>As WordPress 7.0 introduces native AI capabilities, this plugin offers an exceptional bridge for developers and agency teams running local development environments on Apple Silicon. By wiring the Osaurus local LLM runtime directly into the WordPress AI Client, it allows for seamless, zero-cost testing of AI-driven features without exposing sensitive client data to external APIs. This is a highly practical solution for offline development, local prototyping of Gutenberg AI blocks, and high-throughput testing where API metered costs would otherwise accumulate rapidly.<\/p>\n<p><strong>Key Strengths &amp; Role:<\/strong> The plugin&#8217;s primary strength lies in its zero-configuration setup for bare-metal local environments, instantly routing wp_ai_client_prompt() calls to a local MLX-optimized engine. Because it extends the SDK&#8217;s OpenAI-compatible base classes, advanced features like streaming, structured JSON output, and tool\/function calling work flawlessly out of the box. This ensures that local development closely mirrors production behavior while maintaining absolute data sovereignty and zero operational latency over the local network.<\/p>\n<p><strong>Potential Limitations &amp; Pitfalls:<\/strong> Due to upstream limitations in the Osaurus runtime, this provider does not support image generation, embeddings, or text-to-speech, requiring developers to pair it with a secondary provider like OpenAI for multimodal workflows. Additionally, while bare-metal setups work out of the box, containerized environments (such as Docker, DDEV, or Lando) and remote LAN configurations require manual base URL overrides and firewall adjustments to resolve the host machine&#8217;s loopback interface correctly.<\/p>\n<\/div>\n<\/div><\/div>\n<div class=\"plugin-info-card\" style=\"border: 1px solid #e2e8f0;border-radius: 10px;overflow: hidden;margin-bottom: 30px;font-family: -apple-system, system-ui, sans-serif;background: #fff\">\n<div style=\"padding: 20px;border-bottom: 1px solid #edf2f7;background: #fafafa;display: flex;align-items: flex-start\">\n                <img decoding=\"async\" src=\"https:\/\/ps.w.org\/ai-provider-for-osaurus\/assets\/icon-256x256.png?rev=3557365\" style=\"width: 45px;height: 45px;border-radius: 8px;margin-right: 15px\"> <\/p>\n<div style=\"flex: 1;line-height: 1.2\">\n<div style=\"font-weight: bold;font-size: 1.1em;color: #1a202c\">Plugin Specification<\/div>\n<p>                    <small style=\"color: #718096\">WordPress.org Official Data<\/small>\n                <\/div>\n<\/p><\/div>\n<table style=\"width: 100%;border-collapse: collapse;font-size: 14px\">\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;width: 35%;color: #4a5568;background: #fcfcfc\">Developer<\/th>\n<td style=\"padding: 12px 20px;font-weight: 500\"><a href=\"https:\/\/profiles.wordpress.org\/euthelup\/\" target=\"_blank\" rel=\"noopener\">Andrei Lupu<\/a><\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Version<\/th>\n<td style=\"padding: 12px 20px\">v0.4.2<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Active Installs<\/th>\n<td style=\"padding: 12px 20px\">0 +<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Requires \/ Tested<\/th>\n<td style=\"padding: 12px 20px\">7.0 \/ 7.0<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Last Updated<\/th>\n<td style=\"padding: 12px 20px\">2026-06-02 1:35am GMT<\/td>\n<\/tr>\n<tr>\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Official Link<\/th>\n<td style=\"padding: 12px 20px\"><a href=\"https:\/\/wordpress.org\/plugins\/ai-provider-for-osaurus\/\" target=\"_blank\" style=\"text-decoration: none;color: #4a3bca;font-weight: bold\" rel=\"noopener\">View Details \u2192<\/a><\/td>\n<\/tr>\n<\/table><\/div>\n<div class=\"plugin-short-desc\" style=\"margin: 20px 0;padding: 12px 15px;background: #f9fafb;border-left: 4px solid #4a3bca;border-radius: 6px;font-style: italic;color: #4a5568\">Registers Osaurus, a local Apple Silicon LLM runtime, as a provider for the WordPress AI Client.<\/div>\n<p>AI Provider for Osaurus wires the <a href=\"https:\/\/osaurus.ai\" rel=\"nofollow ugc noopener\" target=\"_blank\">Osaurus<\/a> local LLM runtime into the WordPress AI Client that ships with WordPress 7.0.<\/p>\n<p>After activation, any plugin that calls <code>wp_ai_client_prompt()<\/code> (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.<\/p>\n<h4>Why use it<\/h4>\n<ul>\n<li><strong>Privacy first<\/strong> &mdash; prompts stay on your machine, no third-party API receives the data.<\/li>\n<li><strong>Zero cost<\/strong> &mdash; no API keys, no metered requests.<\/li>\n<li><strong>Fast<\/strong> &mdash; MLX-backed inference on Apple Silicon.<\/li>\n<li><strong>OpenAI-compatible wire format<\/strong> &mdash; streaming, tool calls, JSON output, and chat history work out of the box.<\/li>\n<\/ul>\n<h4>Capabilities<\/h4>\n<ul>\n<li>Text generation<\/li>\n<li>Chat history<\/li>\n<li>Function \/ tool calls<\/li>\n<li>Structured JSON output<\/li>\n<li>Streaming<\/li>\n<\/ul>\n<p>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.<\/p>\n<h4>How it works<\/h4>\n<p>The plugin registers a provider with <code>AiClient::defaultRegistry()<\/code> and points it at the Osaurus HTTP server. Because Osaurus speaks the OpenAI Chat Completions wire format, the implementation extends the SDK&#8217;s OpenAI-compatible base classes &mdash; so capabilities like streaming and tool calling flow through automatically.<\/p>\n<h4>Configuration<\/h4>\n<p>The plugin resolves the Osaurus base URL in this order (first match wins):<\/p>\n<ol>\n<li><code>OSAURUS_BASE_URL<\/code> PHP constant defined in <code>wp-config.php<\/code>.<\/li>\n<li><code>osaurus_ai_connector_base_url<\/code> option, settable from <strong>Settings &rarr; Connectors<\/strong> in wp-admin.<\/li>\n<li>Default: <code>http:\/\/127.0.0.1:1337\/v1<\/code> (works out of the box for bare-metal WordPress on the same Mac as Osaurus; Docker setups must override).<\/li>\n<\/ol>\n<h4>Pick the right URL for your setup<\/h4>\n<p>WordPress can run in many places &mdash; the right base URL depends on how it reaches your Mac, where Osaurus is listening.<\/p>\n<ul>\n<li><strong>Bare-metal WordPress on the same Mac<\/strong> (MAMP, Laravel Valet, Local, WordPress Studio, native PHP):<br \/>\n  http:\/\/127.0.0.1:1337\/v1 <em>(this is the default &mdash; no configuration needed)<\/em><\/li>\n<li><strong>Docker-based WordPress on the same Mac<\/strong> (DDEV, Lando, Docker Desktop):<br \/>\n  http:\/\/host.docker.internal:1337\/v1<\/li>\n<li><strong>WordPress on a different machine on your LAN, Osaurus on your Mac:<\/strong><br \/>\n  http:\/\/:1337\/v1 &mdash; make sure Osaurus is bound to a non-loopback interface and your firewall allows port 1337.<\/li>\n<li><strong>Remote Osaurus you operate<\/strong> (e.g. a Mac mini on Tailscale, a colocated server):<br \/>\n  http:\/\/:1337\/v1 or <code>https:\/\/...<\/code> if you front it with TLS.<\/li>\n<\/ul>\n<p>The fastest way to confirm a URL works from the WordPress host: run <code>curl &lt;base-url&gt;\/models<\/code> from the same shell environment WordPress runs in. A JSON list back means the connector will work.<\/p>\n<p>Osaurus project home: <a href=\"https:\/\/osaurus.ai\" rel=\"nofollow ugc noopener\" target=\"_blank\">osaurus.ai<\/a><br \/>\nOsaurus documentation: <a href=\"https:\/\/docs.osaurus.ai\" rel=\"nofollow ugc noopener\" target=\"_blank\">docs.osaurus.ai<\/a><\/p>\n<h3>External services<\/h3>\n<p>This plugin connects to an Osaurus HTTP server &mdash; a local LLM runtime that you install and run yourself on the same machine as WordPress (or on a host you operate). The plugin is useless without it: every text-generation request from the WordPress AI Client is routed to this server.<\/p>\n<p><strong>Service: Osaurus (self-hosted, local LLM runtime)<\/strong><\/p>\n<p>Osaurus is an open-source Apple Silicon LLM runtime that exposes an OpenAI-compatible HTTP API. It is installed and operated by the same person running WordPress &mdash; there is no third-party service operator. This plugin forwards prompts to it so WordPress can perform text generation, chat, tool calls, and structured JSON output without sending data to any cloud provider.<\/p>\n<p>Project homepage and download (<code>osaurus.ai<\/code>): https:\/\/osaurus.ai<br \/>\nProject documentation (<code>docs.osaurus.ai<\/code>): https:\/\/docs.osaurus.ai<\/p>\n<p>These URLs are referenced in the plugin&#8217;s admin UI as documentation\/download links only; the plugin does <strong>not<\/strong> make HTTP requests to <code>osaurus.ai<\/code> or <code>docs.osaurus.ai<\/code>.<\/p>\n<p><strong>Hosts the plugin actually contacts at runtime<\/strong><\/p>\n<p>The plugin sends HTTP requests only to the host and port resolved (in order) from:<\/p>\n<ol>\n<li>The <code>OSAURUS_BASE_URL<\/code> PHP constant (if defined in <code>wp-config.php<\/code>).<\/li>\n<li>The <code>osaurus_ai_connector_base_url<\/code> WordPress option (set from <strong>Settings &rarr; Connectors<\/strong>).<\/li>\n<li>The built-in default <code>http:\/\/127.0.0.1:1337\/v1<\/code>.<\/li>\n<\/ol>\n<p>Two host targets are referenced by name in the plugin code as quick-pick presets and as the default:<\/p>\n<ul>\n<li><code>127.0.0.1:1337<\/code> &mdash; loopback on the same machine as WordPress (default). Used by bare-metal installs (Studio, MAMP, Valet, Local, native PHP).<\/li>\n<li><code>host.docker.internal:1337<\/code> &mdash; Docker&#8217;s hostname for the host machine. Used by Docker-based WordPress (DDEV, Lando, Docker Desktop). Resolved by Docker, not by a public DNS server.<\/li>\n<\/ul>\n<p>If the user configures a different URL, the plugin only contacts that URL. The plugin never contacts any third-party endpoint operated by the plugin author, the Osaurus project, or any other party.<\/p>\n<p><strong>What data is sent and when<\/strong><\/p>\n<ul>\n<li>When any plugin (including WordPress core) calls <code>wp_ai_client_prompt()<\/code> and routes through Osaurus, the plugin sends a <code>POST<\/code> to <code>{base_url}\/chat\/completions<\/code> with: the prompt text, the conversation history you supplied, the model ID, sampling parameters (temperature, top_p, max tokens, etc.), and any tool \/ function declarations or JSON schemas you supplied.<\/li>\n<li>When an admin opens <strong>Settings &rarr; Connectors<\/strong>, the plugin sends a <code>GET {base_url}\/models<\/code> to populate the model picker and a <code>GET {base_root}\/health<\/code> to display a connection status indicator. Both run only for users with <code>manage_options<\/code> and are triggered by user actions in wp-admin.<\/li>\n<li>No telemetry, analytics, or background requests are sent.<\/li>\n<\/ul>\n<p><strong>Terms of service and privacy policy<\/strong><\/p>\n<p>Osaurus is open-source software you self-host. There is no third-party service operator collecting your data. See the project pages linked above for the project&#8217;s terms and source. If you point the plugin at a remote Osaurus server operated by someone else (for example, a Mac mini you reach over Tailscale), the operator of that server is the data recipient and is governed by whatever terms you have with them.<\/p>","protected":false},"excerpt":{"rendered":"<p>Registers Osaurus, a local Apple Silicon LLM runtime, as a provider for the WordPress AI Client.<\/p>","protected":false},"author":1,"featured_media":9317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[252],"tags":[550,1825,924,2719,2720,555],"class_list":["post-11461","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trends","tag-ai","tag-connector","tag-llm","tag-local-ai","tag-osaurus","tag-wordpress-plugin"],"_links":{"self":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/11461","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/comments?post=11461"}],"version-history":[{"count":0,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/11461\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media\/9317"}],"wp:attachment":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media?parent=11461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/categories?post=11461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/tags?post=11461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}