TroubleshootingOfficial documentation12 min readIssue list

FastGPT Model Runtime Checks and Verification

Learn to verify FastGPT model connections, post-upgrade behavior, and context limits. Find guides for AIProxy setup, upgrades, and token management.

Model runtime checks help isolate issues related to model connections, platform upgrades, and context handling. These checks are distinct stages in verifying an application's behavior, each with specific configuration points and required evidence. The following sections describe three common verification tasks and link to the relevant technical guides.

Verifying Model Connections and Capabilities

An application may fail to connect to a model or use its features correctly due to misconfigured endpoints, authentication, or parameters. Verifying the connection begins with checking the AI Proxy dependencies for the deployed version. The AIPROXY_API_ENDPOINT environment variable in the App and Admin services must be set to the AI Proxy service's root address, without any appended paths like /v1 or /chat/completions.

Authentication requires a non-empty administrator token for AIPROXY_API_TOKEN that is identical to the one configured on the AI Proxy server; an application's API Key is not a substitute. Once the connection is established, it is necessary to confirm that the model's configured capabilities, such as multimodal input, tool calling, or reasoning, match the application's requirements. Application-specific parameters set within a FastGPT application or node take precedence; it is not assumed that identically named fields from a direct chat interface will override the orchestrated workflow.

For detailed instructions on these settings, refer to the guide on setting up FastGPT AIProxy protocol entries. This document provides the necessary steps for configuring model channels and application settings.

For example, in an illustrative reading exercise, a proposed task requires confirming a product's style description. The check would first validate the AI Proxy connection and token. Then, it would confirm the model has the text-processing capability needed for the task. The final output must be inspected to see if it matches the source document before proceeding.

TaskDescriptionDocumentation
Configure model accessSet environment variables and check model capabilities for a new or existing application.Set Up FastGPT AIProxy Protocol Entries

Validating Behavior After an Upgrade

Upgrading FastGPT or its dependencies can introduce changes that affect application behavior. Before starting, it is important to check the current and target versions against the official upgrade instructions, as configuration names and behaviors can change between releases. During the upgrade process, re-verify that the AIPROXY_API_ENDPOINT and AIPROXY_API_TOKEN environment variables remain correct and consistent with the AI Proxy service.

Following the documented steps for checking dependencies and performing backups is critical. The ability to recover from a backup must be validated within the specific deployment environment. After the upgrade is complete, a validation phase is necessary. This involves re-testing key functions like data import, knowledge base retrieval, and application calls using the same sample inputs as before the upgrade. Observing that the upgrade steps were completed does not itself constitute a zero-downtime commitment.

The guide to replacing OneAPI with AI Proxy contains relevant deployment and upgrade procedures that address these verification points.

For instance, if an upgrade is performed while checking for inconsistencies between a product page and an authorization letter, the validation must be re-run post-upgrade. This isolates whether a change in output is due to the platform upgrade or a change in the source documents.

TaskDescriptionDocumentation
Confirm post-upgrade stabilityFollow procedures for checking dependencies, backups, and re-validating application function after a version change.Replace OneAPI with AI Proxy for FastGPT

Checking Context and Token Limits

Incorrect or incomplete responses can result from how an application handles context windows and token limits. The model's actual context capacity must be correctly understood; the maximum length of a reply is not the same as the total context window, which includes inputs. The reply length should be adjusted to suit the task, ensuring it is sufficient to include both the answer and its supporting evidence.

For applications using knowledge base retrieval, the citation limit is controlled by tokens. It is necessary to check if the combination of passage length and question complexity causes retrieved content to be truncated. When troubleshooting, comparing an application's response to the same question with and without conversation history can help isolate issues caused by accumulated context. For workflows that expect a structured response, validation must confirm that all required fields are present and that the output can be parsed successfully, which is a separate check from simply measuring the text length.

The guide on adjusting chat context window limits explains these concepts and their configuration in FastGPT.

For example, if a task to generate marketing copy from a product description fails, the check would involve verifying if the source description exceeds token limits, if the reply length is too restrictive, or if the history of previous interactions is interfering with the current request.

TaskDescriptionDocumentation
Troubleshoot incomplete responsesInvestigate issues related to model context, reply length, knowledge base citation tokens, and conversation history.Adjust FastGPT Chat Context Window Limits