What the documents look like
General trade import declaration work centres on dutiable value, freight and insurance, and tax payment. Each shipment produces an import declaration form, a commercial invoice, a packing list, a bill of lading, and a contract. Product data and selection questions must be answered against this material: classification, specifications, and declared elements. The documents refresh per shipment, so configuration checks travel with each shipment's papers rather than relying on batch synchronization or transaction-triggered automation.
For model connections, the first requirement is that a language model and an index model are both available. The system needs at least one language model and one index model to operate. The language model handles text dialogue and, where the model supports it, image recognition. The index model indexes text chunks for retrieval. A rerank model is optional and only participates when one is configured and enabled; image retrieval requires an actual image input and a model with vision capability. The overall flow diagram lists optional paths that do not all execute on every request.
Retrieval is a recall process. It does not enforce permissions or entity isolation. Libraries built on different vector models cannot be associated with each other; the correct step is to check identifiers and record the gap, not to run cross-model retrieval to compare missed recalls.
Constraints at the model connections step
From V4.17.0, AI Proxy is a required dependency. Both the App and any Admin service that reuses App/Service configuration must set AIPROXY_API_ENDPOINT and a non-empty AIPROXY_API_TOKEN. Missing either one causes startup validation to fail. Legacy OpenAI environment variables or a single-model custom request address cannot replace these two settings.
Model ID is the value of the model field in the request body and is globally unique. A model channel determines the upstream protocol. Model mapping maps the model FastGPT requests to the actual upstream model; for example, gpt-4o-test maps to gpt-4o. The proxy address field takes a BaseUrl, not a full model request address, and whether /v1 is needed must be checked.
A model probe, when enabled, tests only currently enabled system models. A first failure triggers up to three retries, so a single round makes at most four attempts. One success marks the round valid; only four failed attempts mark the model abnormal. Status is green when the test succeeds with latency at or under 30s, yellow when it succeeds above 30s, and red after four consecutive errors. Probe interval accepts integers from 5 to 60 minutes. These are documented behaviours of the probe feature, not defaults for this page.
Hypothetical paper exercise. A customs manager at a customs broker reviews declaration material for a shipment of imported stainless steel plate on 2 March 2026. The commercial invoice reads: "Invoice No. INV-2026-0302, terms of trade CIF, total invoice value USD 48,000, price terms state freight and insurance are borne by the seller to Shanghai port." The packing list reads: "12 pallets total, gross weight 18,600 kg, net weight 18,200 kg." A draft sentence reads: "The terms of trade for this shipment are CIF, and freight and insurance are included in the invoice total." A handover request reads: "Please confirm whether the declared elements for this batch of plate can be quoted directly from the invoice and packing list." The parties, object, status, and date range above are used only for this paper check. No test, deployment, approval, or refund is claimed.
Configuration and implementation checks
| Configuration item | Hypothetical starting value for this exercise | Check method |
|---|---|---|
AIPROXY_API_ENDPOINT | AI Proxy service root address, without /v1 appended | Compare character by character against the deployed address |
AIPROXY_API_TOKEN | Non-empty admin token matching the server side | Confirm non-empty and consistent with AI Proxy configuration |
| Language model | One model enabled that supports tool choice | Send one request on the model test page and read the response |
| Index model | One index model enabled, with maxToken checked | Compare the maximum token field in the model configuration |
| Model mapping | FastGPT model ID mapped to the upstream model | Check the key-value correspondence in the mapping JSON |
| Model probe | Probe interval set to an integer from 5 to 60 minutes | Save on the model probe page, then view the status chart |
The starting values above are assumptions for this page's exercise. They are not official defaults. Each was chosen so that a comparison target exists: the endpoint against the deployed address, the token against the server-side token, the interval against the documented 5-to-60-minute range.
Three common errors
- Writing
AIPROXY_API_ENDPOINTas a full request address with/v1. Input: a configuration string containing the root address plus/v1. Comparison: the documented requirement of a service root address. Observable result: the two do not match, and the value needs correction. - Filling an application API key into
AIPROXY_API_TOKEN. Input: an application-side key. Comparison: the AI Proxy admin token. Observable result: the two have different sources, and startup validation may fail. - Treating the price term stated on the invoice as a declared-element conclusion in the draft sentence. Input: the CIF statement on INV-2026-0302. Comparison: the draft sentence's claim that freight and insurance are included in the invoice total. Observable result: the invoice supports the price term; whether declared elements can be quoted directly from it remains to be verified.
How to verify the setup
- Take the text of INV-2026-0302 and the draft sentence. Input: both texts. Compare whether the invoice states the terms of trade and which party bears freight and insurance. Observable result: when the draft sentence matches the invoice wording, that sentence is supported; when it does not, the point remains to be verified.
- Take the packing list text and the handover request. Input: 12 pallets, gross weight 18,600 kg, net weight 18,200 kg. Compare whether the request asks to confirm that declared elements can be quoted. Observable result: the packing list supplies only piece and weight data; the quotation conclusion is not supported.
- Take the model ID on the model configuration page and the mapping JSON. Input: the FastGPT-side model ID and the upstream model name. Compare whether the two correspond through the mapping. Observable result: when the key and value match, a channel test can be initiated; when they do not match, the test request points to a model different from the expected one, and the identifier must be checked first and non-matching entries excluded.
Retrieval checks record only what is observed. If the paper input is an empty array, downstream design handles an empty result; no guarantee is made that the first hit appears or that unrelated queries return empty. Libraries on different vector models cannot be associated, so only identifiers are checked and gaps recorded.