- Model provider rules are based on the Provider entity.
- Model rules are based on the AIModelEntity entity.
All entities below are based onPydantic BaseModel, and can be found in theentitiesmodule.
Provider
string
Provider identifier, e.g.:
openaiobject
object
object
string
Background color value, e.g.: #FFFFFF, if empty, will display the frontend default color value
object
array[ModelType]
required
Supported model types
array[ConfigurateMethod]
required
Configuration methods
ProviderCredentialSchema
required
Provider credential specifications
ModelCredentialSchema
Model credential specifications
AIModelEntity
string
required
Model identifier, e.g.:
gpt-3.5-turboobject
ModelType
required
Model type
array[ModelFeature]
List of supported features
object
required
Model properties
LLMMode
Mode (available for model type
llm)integer
Context size (available for model types
llm and text-embedding)integer
Maximum number of chunks (available for model types
text-embedding and moderation)integer
Maximum file upload limit, unit: MB. (available for model type
speech2text)string
Supported file extension formats, e.g.: mp3,mp4 (available for model type
speech2text)string
Default voice, required: alloy,echo,fable,onyx,nova,shimmer (available for model type
tts)array
integer
Word limit for single conversion, defaults to paragraph segmentation (available for model type
tts)string
Supported audio file extension formats, e.g.: mp3,wav (available for model type
tts)integer
Number of concurrent tasks supported for text-to-audio conversion (available for model type
tts)integer
Maximum characters per chunk (available for model type
moderation)array[ParameterRule]
Model call parameter rules
PriceConfig
Pricing information
boolean
Whether deprecated. If deprecated, the model list will no longer display it, but those already configured can continue to be used. Default is False.
ModelType
string
Text generation model
string
Text embedding model
string
Rerank model
string
Speech to text
string
Text to speech
string
Content moderation
ConfigurateMethod
string
Predefined model - Indicates that the user only needs to configure unified provider credentials to use predefined models under the provider.
string
Customizable model - The user needs to add credential configuration for each model.
string
Fetch from remote - Similar to the
predefined-model configuration method, only unified provider credentials are needed, but the models are fetched from the provider using the credential information.ModelFeature
string
Agent reasoning, generally models over 70B have chain-of-thought capabilities.
string
Vision, i.e.: image understanding.
string
Tool calling
string
Multiple tool calling
string
Streaming tool calling
FetchFrom
string
Predefined model
string
Remote model
LLMMode
string
Text completion
string
Chat
ParameterRule
string
required
Actual parameter name for model call
string
Use template
For details on using templates, you can refer to the examples in Creating a New Model Provider.There are 5 pre-configured variable content templates by default:
temperaturetop_pfrequency_penaltypresence_penaltymax_tokens
use_template, which will use the default configuration from entities.defaults.PARAMETER_RULE_TEMPLATE without needing to set any parameters other than name and use_template. If additional configuration parameters are set, they will override the default configuration. You can refer to openai/llm/gpt-3.5-turbo.yaml for examples.
boolean
Whether required, default is False
int/float/string/boolean
Default value
int/float
Minimum value, only applicable to numeric types
int/float
Maximum value, only applicable to numeric types
integer
Precision, decimal places to retain, only applicable to numeric types
array[string]
Dropdown option values, only applicable when
type is string, if not set or is null, then option values are not restrictedPriceConfig
float
Input unit price, i.e., Prompt unit price
float
Output unit price, i.e., returned content unit price
float
Price unit, e.g., if priced per 1M tokens, then the unit token number corresponding to the unit price is
0.000001string
Currency unit
ProviderCredentialSchema
array[CredentialFormSchema]
required
Credential form specifications
ModelCredentialSchema
object
required
array[CredentialFormSchema]
required
Credential form specifications
CredentialFormSchema
string
required
Form item variable name
FormType
required
Form item type
boolean
Whether required
string
Default value
array[FormOption]
Form item attribute specific to
select or radio, defines dropdown contentobject
integer
Form item attribute specific to
text-input, defines maximum input length, 0 means no limitarray[FormShowOnObject]
Display when other form item values meet conditions, empty means always display
FormType
string
Text input component
string
Password input component
string
Single-select dropdown
string
Radio component
string
Switch component, only supports
true and falseFormOption
string
required
Dropdown option value
array[FormShowOnObject]
Display when other form item values meet conditions, empty means always display
FormShowOnObject
string
required
Other form item variable name
string
required
Other form item variable value
Related Resources
- Model Architecture Details - Deep dive into the architecture specifications of model plugins
- Quickly Integrate a New Model - Learn how to apply these rules to add new models
- General Specifications - Understand the configuration of plugin manifest files
- Create a New Model Provider - Develop brand new model provider plugins
Edit this page | Report an issue