Model guidesOfficial documentation6 min readModel guides

Understand FastGPT Model Preset Directory Structures

This documentation covers the standardized directory structure and core files for managing AI model presets in FastGPT plugin infrastructure, critical for…

This documentation covers the standardized directory structure and core files for managing AI model presets in FastGPT plugin infrastructure, critical for maintaining consistent model configuration across deployments.

Top-Level Directory Layout

The root directory for all model preset assets is packages/infrastructure/src/static-data/models/. This top-level directory contains six primary contents:

  • Root-level TypeScript files: index.ts, model.ts, type.ts
  • Two subdirectories: channel-avatar/ and provider/

Provider-Specific Preset Organization

The provider/ subdirectory organizes model presets by AI service provider. Each provider has a dedicated subdirectory named using the provider’s internal identifier, formatted as {Provider}/. Every provider subdirectory must include two mandatory files:

  1. index.ts: Holds the official model presets for that provider
  2. logo.svg: The brand logo asset for the provider, used for UI display in FastGPT interfaces.

The channel-avatar/ top-level subdirectory stores avatar assets exclusively for AIProxy channels.

Key File and Directory Reference

PathCore Purpose
index.tsRegisters all configured AI providers, and generates two critical exported assets: staticModelList and the global provider list
model.tsMaintains two standardized datasets: ModelProviderMap (maps internal provider IDs to human-readable display names) and aiproxyChannels (configuration data for AIProxy channels)
type.tsDefines strict TypeScript schemas for provider configuration structures and model preset definitions
provider/{Provider}/index.tsContains provider-specific model preset configurations, including supported model IDs and default parameters
provider/{Provider}/logo.svgBranded logo asset for the associated AI provider
channel-avatar/Directory storing custom avatar assets for AIProxy communication channels

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Model guides scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.