Skip to main content

AI Models

AI Models are tenant-side external model resources. They provide the model credentials and runtime configuration used by Soln features that call chat, vision, tool-calling, image generation, or image-input models.

Open System > Resource, then select AI Models from the resource menu.

Page Structure​

The AI Models page has three main areas:

AreaPurpose
Top BarSearches models, creates model categories, filters models by all, active, or disabled status, and opens Model Usage
Category ListGroups models by provider or scenario and shows how many models are in each category. The footer provides the Model Billing entry
Model ListShows models in the selected category and provides edit, enable, disable, delete, and create-from-this-config actions

Model Categories​

Use model categories to keep models organized by provider, purpose, or runtime scenario.

FieldDescription
Model IconCategory icon. Upload an image so the category is easy to recognize in the model list
Model Category NameDisplay name of the category, such as OpenAI, Gemini, Image Models, or Internal Gateway

Category actions:

ActionDescription
New Model CategoryCreates a custom category
EditUpdates a custom category name or icon
DeleteDeletes the custom category and clears models in that category
NewCreates a model under the selected category

Preset categories can appear in the list. They can be selected and used for creating models, but only custom categories can be edited or deleted.

Create An AI Model​

Click New in the selected category, then fill in the model connection fields.

FieldRequiredDescription
Model TypeYesSelects Text model or Image generation model. The model type limits which protocols can be selected and decides whether the runtime uses the resource for chat or image generation
ProtocolYesModel API protocol used by Soln. The protocol decides the default Base URL, the request endpoints, and the model capabilities written to the resource
Base URLYesProvider base endpoint used by the selected protocol. Changing the protocol fills a matching default URL when the current URL is empty or still uses a known default. OpenAI-compatible gateways should use the gateway root URL, not a /chat/completions path
API KeyYes when creatingSecret credential used to call the provider. When editing an existing model, leave it empty to keep the stored key unchanged
ModelYesProvider model identifier, such as gpt-5.6, gpt-image-2, claude-opus-4-8, gemini-3.6-flash, or the model name from your gateway. The model name cannot be changed after the model is created, so billing, usage statistics, and audit records stay consistent
Model Display NameYesName shown to administrators and runtime selectors. Use a name that explains the provider, account, and purpose
Config (JSON)NoExtra JSON object merged into the model config. Use it for provider-specific options that are not represented by the standard fields

Protocols​

Choose the provider protocol that matches the model service. The runtime selects the official AI SDK provider from the selected protocol.

ProtocolModel TypeDefault Base URLTypical Use
OpenAI ResponsesText modelhttps://api.openai.com/v1OpenAI Responses-compatible services. Soln sends chat and built-in image-generation tool requests to the /responses endpoint
OpenAI Chat CompletionsText modelhttps://api.openai.com/v1OpenAI Chat Completions-compatible services. Soln sends chat requests to the /chat/completions endpoint
Anthropic MessagesText modelhttps://api.anthropic.com/v1Anthropic Claude chat, vision, and tool-calling models through the native /messages endpoint
Google Gemini GenerateContentText modelhttps://generativelanguage.googleapis.com/v1betaGoogle Gemini chat, vision, and tool-calling models through the native GenerateContent API
OpenAI ImagesImage Generation Modelhttps://api.openai.com/v1OpenAI image endpoint. Generates images and supports editing from input images
xAI Grok ImagesImage Generation Modelhttps://api.x.ai/v1xAI Grok image endpoint. Generates images and supports editing from input images
Google ImagenImage Generation Modelhttps://generativelanguage.googleapis.com/v1betaGoogle Imagen image generation endpoint. Generates images only; image editing is not supported
Google Gemini ImagesImage Generation Modelhttps://generativelanguage.googleapis.com/v1betaNative Gemini image generation endpoint. Generates images and supports editing from input images

Changing the protocol replaces the Base URL with the protocol default when the current URL is empty or still uses a known default. The actual URL for an OpenAI-compatible gateway depends on the provider deployment.

Model Capabilities​

Model capabilities are derived from Model Type and Protocol and written to the model resource capability metadata. The form does not expose a separate capability selector.

CapabilityDerived FromDescription
ChatText model protocolsThe resource is used for assistant conversation and text generation
StreamingText model protocolsText models return incremental content as a stream
Image Input / VisionText model protocolsChat messages can include images. Use this only when the model and gateway both accept image messages
Tool CallingText model protocolsSoln uses this for assistant workflows that need tenant data tools, form tools, file tools, or other runtime actions
Image GenerationImage generation model protocolsThe resource is used to generate images
Image EditingImage protocols that support editingOpenAI Images, xAI Grok Images, and Google Gemini Images can edit an existing image; Google Imagen cannot

Image generation models are never used for chat, so an image generation resource never carries streaming or tool-calling capabilities.

Vision capability must match the model
Text model protocols write the image-input capability flag. If a text-only model is configured, image questions may be rejected by the provider before Soln can generate an answer. Use a vision-capable model instead.

Image Generation And Editing​

Image requests use resources whose model type is Image Generation Model. Only protocols that support image editing can modify an existing image in the assistant.

ProtocolGenerate ImagesEdit Images
OpenAI ImagesYesYes
xAI Grok ImagesYesYes
Google Gemini ImagesYesYes
Google ImagenYesNo

In the assistant, choose Create Image. A text-only message generates a new image; attaching one or more PNG, JPEG, WEBP, or non-animated GIF images to the current message changes that request to image editing. The current assistant does not provide a mask upload field.

Config JSON​

The Config (JSON) field must be a JSON object. Use it for standard generation settings and provider-specific request parameters that are not represented by the form. Select the matching Protocol first, then use the field names and values documented by that provider or gateway. Soln does not infer settings from the model name.

The Config JSON is merged into the stored model config together with standard fields such as protocol, baseUrl, and model. It cannot replace fields controlled by the form.

Reserved keys:

KeyDescription
protocolWritten from the Protocol field. Do not set it in Config JSON
baseUrlWritten from the Base URL field. Do not set it in Config JSON
modelWritten from the Model field. Do not set it in Config JSON
toolCallingDerived from Model Type and Protocol. Do not set it in Config JSON
toolDiscoveryControlled by the assistant runtime. Do not set it in Config JSON
contextWindowTokensNot configurable. Do not set it in Config JSON

Context window size is not configurable in model resources. The tenant Runtime maintains conversation checkpoints automatically, preserving original user instructions and references to execution evidence. Recent messages remain intact; older execution details can be read through Runtime commands. Checkpoint scheduling is an internal maintenance policy, not a configurable model capacity limit.

Standard Generation Settings​

These top-level settings are mapped to the AI SDK generation call:

ParameterDescription
temperatureSampling temperature. The provider decides the supported range
topPNucleus sampling value
maxTokensMaximum output token count
presencePenaltyPenalty for introducing topics already present in the generated text
frequencyPenaltyPenalty based on repeated token frequency

Only configure settings supported by the selected provider and model. Capability flags such as streaming, tool calling, image input, and image generation are derived from Model Type and Protocol; do not configure them in Config JSON.

Example:

{
"temperature": 0.7,
"topP": 0.9,
"maxTokens": 4096
}

Provider-Specific Parameters​

Use these generic keys when the selected protocol exposes settings that are not represented by the standard generation fields:

KeyValueBehavior
headersObjectAdds provider or gateway request headers. Header values are converted to strings
requestBodyObjectAdds protocol-specific fields to the final JSON request body. Nested objects are merged recursively; explicit configured values override AI SDK defaults unless the field is reserved by Soln Runtime
providerToolsArray of objectsEnables provider-executed tools registered by Soln. Each item contains a registered id and an optional options object

Use this decision order when filling in Config JSON:

  1. Put temperature, topP, maxTokens, presencePenalty, and frequencyPenalty at the top level
  2. When provider documentation defines another request-body field, keep its original name and nesting under requestBody
  3. When you need a provider-executed tool, select its registered ID from the table below and place it in providerTools
  4. Use headers only for additional provider or gateway headers. Keep the API key in the dedicated API Key field

Field placement reference:

RequirementConfig JSON location
Standard sampling or output limitTop-level generation setting, such as temperature or maxTokens
Additional top-level provider body fieldrequestBody.<provider field>
Additional nested provider body fieldPreserve the full nesting under requestBody
Provider web search or another registered server-side toolproviderTools[].id and providerTools[].options
Additional HTTP headerheaders.<header name>

The same request-body passthrough is used by every supported protocol. Soln does not inspect the model name, translate parameter names between protocols, or maintain an allowlist of provider request fields. Consult the selected provider or gateway documentation and configure only fields accepted by that endpoint.

For requestBody, object values are merged recursively. Explicit scalar and array values replace the corresponding AI SDK defaults. Request identity, conversation state, credentials, streaming, and tool orchestration remain controlled by Soln Runtime and cannot be overridden. Protected fields include model, messages, input, contents, prompt, system, systemInstruction, instructions, stream, tools, tool_choice, toolConfig, store, conversation, previous_response_id, background, apiKey, api_key, baseUrl, and base_url.

Provider Tools​

providerTools are server-side tools executed by the model provider. Soln creates them through the matching AI SDK provider tool factory before calling streamText(), then combines them with the Assistant Runtime tools passed to the model. Only text model protocols derive the tool-calling capability, so this setting applies to text models only.

Each providerTools item accepts only these fields:

FieldRequiredDescription
idYesRegistered provider tool identifier. The tool must belong to the selected protocol
optionsNoConfiguration passed to the registered AI SDK provider tool factory. Supported fields depend on the tool ID

Registered tools:

Tool IDProtocolPurpose and options
openai.web_searchOpenAI ResponsesWeb search. Options control external web access, allowed-domain filters, search context size, and approximate user location
anthropic.web_search_20260209Anthropic MessagesWeb search. Options control maximum uses, allowed or blocked domains, and approximate user location
google.google_searchGoogle Gemini GenerateContentGoogle Search grounding. Options control enabled search types and an optional time range

Supported options fields:

Tool IDOptionTypePurpose
openai.web_searchexternalWebAccessBooleanSelects live external web access or provider-cached/indexed content
openai.web_searchfilters.allowedDomainsString arrayRestricts search results to the listed domains
openai.web_searchsearchContextSizelow, medium, or highControls search context volume, latency, and cost
openai.web_searchuserLocationObjectSupplies an approximate country, city, region, and time zone for geographically relevant results
anthropic.web_search_20260209maxUsesNumberLimits the number of searches during the conversation
anthropic.web_search_20260209allowedDomainsString arrayRestricts searches to the listed domains
anthropic.web_search_20260209blockedDomainsString arrayExcludes the listed domains from searches
anthropic.web_search_20260209userLocationObjectSupplies an approximate country, city, region, and time zone for geographically relevant results
google.google_searchsearchTypesObjectEnables web search, image search, or both when supported by the selected model
google.google_searchtimeRangeFilterObjectRestricts results to required ISO 8601 startTime and endTime values

The following are Soln Config JSON examples, not copies of provider request payloads. Choose only the example whose protocol matches the model resource.

OpenAI Responses web search:

{
"providerTools": [
{
"id": "openai.web_search",
"options": {
"externalWebAccess": true,
"searchContextSize": "medium"
}
}
]
}

Anthropic Messages web search:

{
"providerTools": [
{
"id": "anthropic.web_search_20260209",
"options": {
"maxUses": 5
}
}
]
}

Google Gemini GenerateContent search grounding:

{
"providerTools": [
{
"id": "google.google_search",
"options": {
"searchTypes": {
"webSearch": {}
}
}
}
]
}

To combine generation settings and a provider tool, keep them in the same Config JSON object. For example, add temperature beside providerTools, not inside options.

These tools are not Soln business tools. Tenant data and business actions continue through SL_COMMANDS, executeSlCommand, and the Runtime domain implementation; they are not routed through MCP. Provider tools also cannot be declared through requestBody.tools, because Soln Runtime must retain ownership of tool registration and tool choice.

Do not put secrets in Config JSON. Store credentials in the API Key field so they are saved as resource secrets.

Model Billing​

Model billing configures prices for AI models. The estimated cost in call logs and usage analytics, and the cost limits in usage controls, both depend on the billing modes configured here.

Open System > Resource > AI Models, then click Model Billing at the bottom of the category list.

Billing Modes​

The left side lists the billing modes created in the current space, and the right side is the billing mode editor.

ActionDescription
NewCreates a billing mode
EditUpdates the billing mode name, currency, billing type, prices, and applicable models
DeletePermanently deletes the billing mode

Billing Fields​

FieldRequiredDescription
Billing Mode NameYesDisplay name of the billing mode
CurrencyYesSupports CNY and USD
Billing TypeYesDecides which price fields are required and how cost is calculated from usage
PricesYesPer-million-token or per-image prices, with up to 6 decimal places
Applicable ModelsYesAI models selected by category. A model can belong to only one billing mode, so models already used by another billing mode cannot be selected again

Billing Types​

Billing TypeTypical UsePrice Fields
Input/Output Token BillingModels billed only by input and output tokensInput and output, per million tokens
Cached Input Token BillingModels that distinguish uncached input, cache reads, and cache writesInput, cached input, cache write (optional), and output, per million tokens
Long Context Token BillingModels that use a different price above a thresholdLong-context threshold (K tokens); input, cached input, cache write (optional), and output prices for standard and long context
Multimodal Token BillingModels billed by tokens for both text and imagesText input, cached text input, image input tokens, cached image input, text output, image output tokens, and reasoning output, per million tokens; at least one price is required
Image Generation BillingImage models billed per generated imageInput image (optional) and one or more output image prices by size, quality, and unit price

Notes:

  1. A model without a billing mode can still be called, but the estimated cost in call logs and usage analytics shows Pricing not configured
  2. Changing a billing mode affects later cost calculations only. Historical call logs keep the cost calculated at the time of the call
  3. Billing modes are currency-specific. A space can have both CNY and USD billing modes, and usage pages show costs per currency

Model Usage​

The Model Usage page summarizes model calls, token consumption, cost, and usage controls for the current space. Open it from the Model Usage button in the top bar of System > Resource > AI Models.

Left menu:

MenuPurpose
OverviewShows call trends, token composition, category distribution, and model rankings for a time range
AnalyticsAggregates tokens, image counts, and estimated cost by organization and department
Call LogsShows every model call in detail
External CallsManages the API keys members use to call the model service from outside Soln

Members with resource-edit permission also see Usage Controls in the top-right corner, which opens usage-limit rules and model gateway protection.

Overview​

AreaDescription
FiltersTime range (last seven days by default), model category, and model. Select a category before selecting one of its models
Metric CardsCalls, total tokens, active users, success rate, average task duration, cache hit rate, and estimated cost. Cost is shown per currency
ChartsCalls and token trend, input/output/cached tokens, and model category distribution
Model RankingModel, calls, tokens, cost, success rate, and average task duration

Charts can be exported as PNG from the panel header, and the model ranking can be exported as an Excel file. When cost is empty or shows -, the model usually has no billing mode, or the call log lacks the usage data required for cost calculation.

Analytics​

Analytics groups usage by the organization and department each member currently belongs to, so you can see how tokens, images, and estimated cost are distributed.

AreaDescription
FiltersTime range, model category, and model
Metric CardsTokens, image count, estimated CNY cost, and estimated USD cost, each with a trend line
Organization/Department DistributionTreemap of department usage share with a switchable metric and PNG export
Organization/Department UsageOrganization, department, tokens, image count, estimated CNY cost, and estimated USD cost. Supports organization or department filtering, paging, and Excel export
User UsageUser, tokens, image count, estimated CNY cost, and estimated USD cost. Supports user filtering, paging, and Excel export

Call Logs​

Call logs list every model call in reverse chronological order, which helps with troubleshooting failed calls and checking cost.

ItemDescription
FiltersStart time, end time, calling user, model category, and model. The refresh button reloads the current filter result
ColumnsCalled at, user, model, category, protocol, tokens, estimated cost, duration, and status
TokensShows input, output, cache read, and cache write token counts separately
SummaryThe pagination footer shows cache hit rate and total tokens for the current filter range
Estimated CostCalculated from the billing mode. When it cannot be calculated, the log shows Pricing not configured, Usage Incomplete, No Matching Price Rule, or Invalid Price Rule

Cost status:

StatusMeaningWhat To Do
Pricing not configuredThe model is not bound to any billing modeConfigure prices for the model in Model Billing
Usage IncompleteThe provider response lacks the usage fields required by the current billing typeCheck the protocol, model capabilities, and provider response, or use a billing type that matches the returned data
No Matching Price RuleA billing mode exists, but the usage matched no price tierCheck the billing type, the long-context threshold, and the image size and quality settings
Invalid Price RuleThe billing mode configuration is invalidSave the billing mode prices again

External Calls​

External calls are disabled by default. Administrators with resource-edit permission can enable the external-call switch on this page. While disabled, member account settings hide the AI Key entry and the model gateway rejects external requests, including model listing, with HTTP 403 and MODEL_GATEWAY_EXTERNAL_CALL_DISABLED. Enabling the switch still requires a valid key, an active member, and model access.

External calls manage the API keys members use when they call models through the model service.

ItemDescription
FiltersTime range (current week by default) and calling user
ColumnsUser, key, status, last used at, created at, and updated at
RotateGenerates a new key for the member. The old key stops working immediately, and the new plaintext key is shown only once
Disable / EnableStops or restores the member's ability to call the model service with the key

Calls made through external keys are recorded in call logs and included in usage analytics and usage controls.

Before You Call​

First confirm that an administrator has enabled external calls for this tenant.

  1. Get an AI key: Settings > AI Key in the sidebar creates the key of the signed-in member, and an administrator can also rotate the key of a member in Model Usage > External Calls. The key starts with so. and is shown only once
  2. Read the resource key of the model you want to call: System > Resource > AI Models, or GET /api/soln.modelservice/v1/models
  3. Match the protocol of the resource with the endpoint below
  4. Send the call with the key as a credential header

Call Address​

External callers use the model service gateway of the workspace, so the address is the workspace address itself plus the soln.modelservice prefix:

https://<workspace-domain>/api/soln.modelservice

The gateway keeps the protocol of the model resource, so pick the endpoint that matches the Protocol of the resource you want to call.

ProtocolMethodEndpointCredential headerRequired body fields
OpenAI Chat CompletionsPOST/api/soln.modelservice/v1/chat/completionsAuthorization: Bearer <AI key>model, messages
OpenAI ResponsesPOST/api/soln.modelservice/v1/responsesAuthorization: Bearer <AI key>model, input
Anthropic MessagesPOST/api/soln.modelservice/v1/messagesx-api-key: <AI key>model, messages, max_tokens
Google GenerateContentPOST/api/soln.modelservice/v1beta/models/{model}:generateContentx-goog-api-key: <AI key>contents
Google streamingPOST/api/soln.modelservice/v1beta/models/{model}:streamGenerateContent?alt=ssex-goog-api-key: <AI key>contents
List modelsGET/api/soln.modelservice/v1/modelsAuthorization: Bearer <AI key>None

Anthropic requests may carry anthropic-version and anthropic-beta; without anthropic-version the gateway sends 2023-06-01. When the model resource of the selected protocol does not match the endpoint, the gateway rejects the call with MODEL_GATEWAY_PROTOCOL_INVALID.

The protocol of a model resource and the endpoint are one-to-one. A model resource can only be called through the endpoint of its own protocol, and each protocol uses its own credential header and request body. When the same provider must be reached through two protocols, for example both OpenAI Responses and OpenAI Chat Completions, create one model resource per protocol.

The model Value​

model is the resource key of the AI model resource, not the provider model name. Read it in two ways:

  1. System > Resource > AI Models shows the resource key of each model
  2. GET /api/soln.modelservice/v1/models returns the models the key may use, and the resource key is the id of each entry

The gateway replaces model with the provider model configured on the resource before it calls the provider, so callers never need the provider model name. For the Google endpoints the resource key goes into the path instead of the body. GET /v1/models also reports whether a model is currently available and how much quota is left.

curl Examples​

List the models of the space:

export SOLN_API_KEY="so.xxxxxxxxxxxxxxxx"
export SOLN_BASE_URL="https://<workspace-domain>/api/soln.modelservice"

curl "$SOLN_BASE_URL/v1/models" \
-H "Authorization: Bearer $SOLN_API_KEY"

Chat with an OpenAI Chat Completions model:

curl "$SOLN_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $SOLN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-6-abc123",
"messages": [
{ "role": "user", "content": "用一句话介绍 Soln" }
],
"temperature": 0.7
}'

Stream the answer:

curl -N "$SOLN_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $SOLN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-6-abc123",
"messages": [
{ "role": "user", "content": "写一段 200 字的说明" }
],
"stream": true
}'

Call an OpenAI Responses model:

curl "$SOLN_BASE_URL/v1/responses" \
-H "Authorization: Bearer $SOLN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5-6-abc123",
"input": "总结这条记录的要点"
}'

Call an Anthropic Messages model:

curl "$SOLN_BASE_URL/v1/messages" \
-H "x-api-key: $SOLN_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8-abc123",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "用一句话介绍 Soln" }
]
}'

Call a Google Gemini GenerateContent model, where the resource key is part of the address:

curl "$SOLN_BASE_URL/v1beta/models/gemini-3-6-flash-abc123:generateContent" \
-H "x-goog-api-key: $SOLN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{ "parts": [ { "text": "用一句话介绍 Soln" } ] }
]
}'

Request And Response Rules​

RuleDescription
Content typeRequests must use Content-Type: application/json
Body limitThe request body may be at most 8 MB
ResponseThe provider response is passed back as it is, including streamed Server-Sent Events
Request idEvery response carries an x-request-id header that also appears in the call log
StreamingSend stream: true to receive streamed content; the gateway adds stream_options.include_usage so the call can be billed
Provider fieldsBody fields other than model are forwarded to the provider unchanged, so provider-specific parameters can be sent directly
TimeoutThe upstream call is aborted after 120 seconds by default and returns MODEL_GATEWAY_UPSTREAM_TIMEOUT

Error Responses​

Gateway errors use the OpenAI error shape, and provider errors keep the status and body of the provider:

{
"error": {
"code": "MODEL_GATEWAY_API_KEY_REQUIRED",
"message": "MODEL_GATEWAY_API_KEY_REQUIRED",
"param": null,
"type": "authentication_error"
}
}
HTTPCodeMeaning
400MODEL_GATEWAY_MODEL_REQUIRED, MODEL_GATEWAY_MESSAGES_REQUIRED, MODEL_GATEWAY_INPUT_REQUIRED, MODEL_GATEWAY_CONTENTS_REQUIRED, MODEL_GATEWAY_MAX_TOKENS_INVALIDThe request body is missing a required field or uses an invalid value
400MODEL_GATEWAY_PROTOCOL_INVALIDThe endpoint does not match the protocol of the model resource
400MODEL_GATEWAY_CONTENT_TYPE_INVALID, MODEL_GATEWAY_BODY_INVALIDThe content type or the JSON body is invalid
401MODEL_GATEWAY_API_KEY_REQUIRED, MODEL_GATEWAY_API_KEY_INVALIDThe AI key is missing or not valid
403MODEL_GATEWAY_MEMBER_INACTIVE, MODEL_ACCESS_DENIEDThe member or the key is disabled, or the model is not available to this member
404Codes ending in _NOT_FOUND, for example MODEL_NOT_FOUNDThe model resource does not exist
413MODEL_GATEWAY_BODY_TOO_LARGEThe request body exceeds 8 MB
429MODEL_GATEWAY_RATE_LIMIT_EXCEEDED, MODEL_GATEWAY_CONCURRENCY_LIMIT_EXCEEDEDModel gateway protection rejected the request
504MODEL_GATEWAY_UPSTREAM_TIMEOUTThe provider did not answer before the timeout

Model gateway protection counts requests per AI key: Requests Per Minute defaults to 120 and Maximum Concurrent Requests defaults to 8, and both can be changed in Usage Controls.

Usage Controls​

Usage controls limit how much model usage a space, user, role, department, or organization can consume. Click Usage Controls to open the rules page, which shows the rule list on the left and the rule editor on the right.

The rule list contains one Space Global Rule and any number of custom rules:

RuleDescription
Space Global RuleApplies to every user in the current space, always uses a shared quota, and always covers all AI models
Custom RuleConfigured by applicable scope, applicable models, and limit metrics

Rule fields:

FieldDescription
Rule NameDisplay name of the rule
Quota ModeIndividual quota: each applicable member gets a separate quota. Shared quota: all applicable members share one quota
Applicable ScopeUser, role, department, or organization. Departments and organizations can include descendants
Applicable ModelsAI models covered by the rule. When no model is selected, the rule covers all AI models
PeriodDaily or monthly
StatusActive or disabled
Limit MetricsCall count, total tokens, CNY cost, USD cost, and image generation count. Fill in only the metrics that need a limit; leave the others empty for no limit

Limit notes:

  1. Call count, total tokens, and image count use whole numbers. The token limit is entered in millions (M)
  2. CNY and USD cost limits accept an amount with up to 6 decimal places
  3. A custom rule without an applicable scope does not take effect
  4. When one request matches several rules, Match mode decides whether each metric uses the strictest or the loosest limit: Minimum match takes the smallest limit, and Maximum match takes the largest limit

The same page also provides Model Gateway Protection, which limits gateway request rate and concurrency:

FieldDescription
Requests Per MinutePer-API-key request limit in a fixed 60-second window
Maximum Concurrent RequestsRequests above this limit are rejected until an upstream request completes

Status And Deletion​

Enabled models are available for runtime use. Disabled models stay configured but should not be selected by runtime features. A model can be deleted after it is disabled.

Common Workflow​

  1. Open System > Resource > AI Models
  2. Create or select a model category
  3. Click New in the category
  4. Choose the model type and the protocol that matches the provider endpoint
  5. Fill in Base URL, API Key, model, and model display name
  6. Add optional Config JSON for provider-specific request parameters
  7. Save the model
  8. Enable, disable, edit, or delete models from the model list as needed
  9. Configure prices for the model in Model Billing
  10. Use Model Usage to review call logs, usage analytics, and estimated cost
  11. Configure usage limits and gateway protection in Usage Controls as needed