🚀 Quick Start Provider-executed tool injector for OMP/Pi runtimes. Bypasses local execution for OpenAI Responses web_search and image_generation, injecting them directly into the provider request.

  • Install: omp plugin install npm:omp-openai-provider-tools@0.1.9
  • Verify: omp plugin doctor

🔧 Configuration

  • Official OpenAI: web_search is enabled by default.
  • Custom / Compatible Providers: Opt-in required via compat.openaiProviderTools.enabled: true in provider metadata.
  • Image Generation: MUST be explicitly enabled per model variant using compat.openaiProviderTools.imageGeneration: true.
  • CLI Agent Setup: npx omp-openai-provider-tools configure-image-agent --model <actual-image-model>.

💡 Patterns & Best Practices

  • Visual Context Continuity: Use provider-native image_generation on the main agent ONLY when multi-turn visual editing is required. It natively accesses previous images appended to the context.
  • Subagent Delegation: For isolated drawing tasks, scaffold an image_generator subagent via the CLI. It uses read-only tools to gather context (README, assets) before drawing, saving main agent token limits.
  • Graceful Degradation: Use idle-gated display custom messages and UI-only custom entry replays for rendering. Headless/RPC runtimes automatically degrade without breaking editor semantics.
  • Stream Keepalive: The plugin automatically injects request-scoped Responses keepalives during image_generation. This prevents OMP’s 120s idle watchdog from prematurely killing long generations.

🚨 Anti-patterns / Gotchas

  • Do NOT Set tool_choice: The plugin never sets tool_choice. Always let the model/provider decide when to invoke the tool.
  • Do NOT Enable Image Gen Globally: Never set imageGeneration: true at the provider level. It must only target capable model variants to avoid hallucination loops.
  • Do NOT Assume Persistent Search Context: Provider-native search results are hidden and ONLY available during the active request turn. Use explicit read or browser tools if full-page context is needed later.
  • Do NOT Use Editor Replacement UIs: Avoid non-overlay ctx.ui.custom(..., { overlay: false }) for final web search cards. It locks the editor and is unsafe for persistent chat results.
  • Do NOT Supply API Keys to Plugin: The plugin manages zero credentials. Keep all authentication within OMP’s native registry.

🔍 Research / References