> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-docs-new-agent-experience.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# General Specs

> Common data structures shared across plugin types, including I18nObject, ProviderConfig, ModelConfig, NodeResponse, and ToolSelector

This page covers structures common to all plugin types. Read it alongside [Basic Concepts of Plugin Development](/en/develop-plugin/getting-started/getting-started-dify-plugin) and the [Developer Cheatsheet](/en/develop-plugin/getting-started/cli) for a picture of the overall architecture.

## Path Specifications

File paths in the manifest or any YAML file follow two rules, depending on the file type:

* Multimedia files such as images and videos (for example, the plugin's `icon`) go in the `_assets` folder under the plugin's root directory.
* Regular text files, such as `.py` or `.yaml` code files, are referenced by their absolute path within the plugin project.

## Common Structures

Some data structures are shared between tools, models, and Endpoints. They are defined here.

### I18nObject

`I18nObject` is an internationalization structure that conforms to the [IETF BCP 47](https://tools.ietf.org/html/bcp47) standard. Four languages are supported:

<ParamField path="en_US" type="string">
  English (United States).
</ParamField>

<ParamField path="zh_Hans" type="string">
  Simplified Chinese.
</ParamField>

<ParamField path="ja_JP" type="string">
  Japanese.
</ParamField>

<ParamField path="pt_BR" type="string">
  Portuguese (Brazil).
</ParamField>

### ProviderConfig

`ProviderConfig` is a common provider form structure used by both `Tool` and `Endpoint`.

<ParamField path="name" type="string">
  Form item name.
</ParamField>

<ParamField path="label" type="I18nObject" required>
  Display labels, following the [IETF BCP 47](https://tools.ietf.org/html/bcp47) standard.
</ParamField>

<ParamField path="type" type="provider_config_type" required>
  Form field type. Determines how the field is rendered in the UI.
</ParamField>

<ParamField path="scope" type="provider_config_scope">
  Optional range specification. Varies based on the value of `type`.
</ParamField>

<ParamField path="required" type="boolean">
  Whether the field must not be empty.
</ParamField>

<ParamField path="default" type="any">
  Default value. Only supports basic types: `float`, `int`, `string`.
</ParamField>

<ParamField path="options" type="array[provider_config_option]">
  Available options. Only used when `type` is `select`.
</ParamField>

<ParamField path="helper" type="object">
  Help document link label, following [IETF BCP 47](https://tools.ietf.org/html/bcp47).
</ParamField>

<ParamField path="url" type="string">
  Help document link.
</ParamField>

<ParamField path="placeholder" type="object">
  Placeholder text in multiple languages, following [IETF BCP 47](https://tools.ietf.org/html/bcp47).
</ParamField>

### ProviderConfigOption (object)

<ParamField path="value" type="string" required>
  Option value.
</ParamField>

<ParamField path="label" type="object" required>
  Option display label, following [IETF BCP 47](https://tools.ietf.org/html/bcp47).
</ParamField>

### ProviderConfigType (string)

<ParamField path="secret-input" type="string">
  Configuration information that will be encrypted.
</ParamField>

<ParamField path="text-input" type="string">
  Plain text input field.
</ParamField>

<ParamField path="select" type="string">
  Dropdown selection field.
</ParamField>

<ParamField path="boolean" type="boolean">
  Switch/toggle control.
</ParamField>

<ParamField path="model-selector" type="object">
  Model configuration selector, including provider name, model name, and model parameters.
</ParamField>

<ParamField path="app-selector" type="object">
  Application ID selector.
</ParamField>

<ParamField path="tool-selector" type="object">
  Tool configuration selector, including tool provider, name, and parameters.
</ParamField>

<ParamField path="dataset-selector" type="string">
  Dataset selector (TBD).
</ParamField>

### ProviderConfigScope (string)

When `type` is `model-selector`:

<ParamField path="all" type="string">
  All model types.
</ParamField>

<ParamField path="llm" type="string">
  Large language models only.
</ParamField>

<ParamField path="text-embedding" type="string">
  Text embedding models only.
</ParamField>

<ParamField path="rerank" type="string">
  Reranking models only.
</ParamField>

<ParamField path="tts" type="string">
  Text-to-speech models only.
</ParamField>

<ParamField path="speech2text" type="string">
  Speech-to-text models only.
</ParamField>

<ParamField path="moderation" type="string">
  Content moderation models only.
</ParamField>

<ParamField path="vision" type="string">
  Vision models only.
</ParamField>

When `type` is `app-selector`:

<ParamField path="all" type="string">
  All application types.
</ParamField>

<ParamField path="chat" type="string">
  Chat applications only.
</ParamField>

<ParamField path="workflow" type="string">
  Workflow applications only.
</ParamField>

<ParamField path="completion" type="string">
  Completion applications only.
</ParamField>

When `type` is `tool-selector`:

<ParamField path="all" type="string">
  All tool types.
</ParamField>

<ParamField path="plugin" type="string">
  Plugin tools only.
</ParamField>

<ParamField path="api" type="string">
  API tools only.
</ParamField>

<ParamField path="workflow" type="string">
  Workflow tools only.
</ParamField>

### ModelConfig

<ParamField path="provider" type="string">
  Model provider name containing the `plugin_id`, in the form `langgenius/openai/openai`.
</ParamField>

<ParamField path="model" type="string">
  Specific model name.
</ParamField>

<ParamField path="model_type" type="enum">
  Model type enumeration; see [Model Design Rules](/en/develop-plugin/features-and-specs/plugin-types/model-designing-rules#modeltype).
</ParamField>

### NodeResponse

<ParamField path="inputs" type="dict">
  Variables ultimately passed into the node.
</ParamField>

<ParamField path="outputs" type="dict">
  Output results of the node.
</ParamField>

<ParamField path="process_data" type="dict">
  Data generated during node execution.
</ParamField>

### ToolSelector

<ParamField path="provider_id" type="string">
  Tool provider name.
</ParamField>

<ParamField path="tool_name" type="string">
  Tool name.
</ParamField>

<ParamField path="tool_description" type="string">
  Tool description.
</ParamField>

<ParamField path="tool_configuration" type="dict[string, any]">
  Tool configuration information.
</ParamField>

<ParamField path="tool_parameters" type="dict[string, dict]">
  Parameters that require LLM reasoning.

  <ParamField path="name" type="string">
    Parameter name.
  </ParamField>

  <ParamField path="type" type="string">
    Parameter type.
  </ParamField>

  <ParamField path="required" type="boolean">
    Whether the parameter is required.
  </ParamField>

  <ParamField path="description" type="string">
    Parameter description.
  </ParamField>

  <ParamField path="default" type="any">
    Default value.
  </ParamField>

  <ParamField path="options" type="array[string]">
    Available options for the parameter.
  </ParamField>
</ParamField>

## Related Resources

* [Basic Concepts of Plugin Development](/en/develop-plugin/getting-started/getting-started-dify-plugin)—an overview of Dify plugin development
* [Developer Cheatsheet](/en/develop-plugin/dev-guides-and-walkthroughs/cheatsheet)—quick reference for common commands and concepts
* [Tool Plugin Development Details](/en/develop-plugin/dev-guides-and-walkthroughs/tool-plugin)—defining plugin information and the tool plugin development process
* [Model Design Rules](/en/develop-plugin/features-and-specs/plugin-types/model-designing-rules)—standards for model configuration
