Skip to main content
Design a configuration in meta that allows the plugin to request large model invocation permissions from the core system (e.g., request an OpenAI Client instance). For example, declare the large model permission request in meta, design properties in configSchema for users to configure the model provider and model name, and when the core system detects the permission request, it will instantiate the large model Client according to the user’s config and inject it into the understandImages method via config.
👌 Got it! You want to declare the required large model permission request in the plugin Strategy’s meta, so the core system can parse it and automatically inject a 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.permissions and find it needs:
  • Instantiate OpenAI({ apiKey: userApiKey }) according to user config.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?