client into config based on user configuration (model provider + model name + other parameters). This way, the plugin doesn’t need to create its own OpenAI / Anthropic / other VLM client.
I’ll help you redesign the OpenAIGPT4VStrategy meta and configSchema so it can request the Client from the core system.
New Strategy
🔑 How the Core System Handles This
-
Parse the plugin’s
meta.permissionsand find it needs: -
Instantiate
OpenAI({ apiKey: userApiKey })according to userconfig.provider = "openai",config.model = "gpt-4-vision-preview" -
Inject the client into
config.client -
Call
strategy.understandImages(files, config)
📌 Usage Example
This way, the plugin itself does not depend on any
openai wrapper logic—it only declares permissions + requires provider/model, and the core system can inject the appropriate client.
Would you like me to write an abstract permission declaration interface (e.g., ILLMPermissionRequest) so OCR/VLM/Embedding plugins can declare dependencies in a unified way?