What the documents look like
Permit handling happens before declaration and determines whether a shipment may lawfully cross a border. The working file for one shipment typically holds an automatic import licence, a dual-use item licence, a contract and a product description. These materials arrive from commerce authority systems, customs commodity codes, supplier files and customer statements of use. Updates are irregular and each shipment is handled on its own.
The product data and selection question-answering task turns those materials into retrievable knowledge, then answers questions about commodity classification and which certificate applies. Model connection and configuration determine whether that question answering runs at all. The system requires at least one language model and one index model. AI Proxy is a required dependency: the App and any Admin service reusing App/Service configuration must both set AIPROXY_API_ENDPOINT and a non-empty AIPROXY_API_TOKEN, and a missing item causes startup validation to fail.
Constraints at the model connections step
Licence documents carry product names, specifications, uses and regulatory conditions, and answers must quote the source text accurately. The language model fields maxContext, maxResponse and quoteMaxToken bound how much context and reply length a single request can hold. The index model fields defaultToken and maxToken affect text splitting and vectorisation.
A model channel record needs a channel name, protocol type, model, model mapping, proxy address and API key. The proxy address takes a BaseUrl, not a full request address. Channel testing checks whether a channel works. Model status probing covers only enabled system models; after a first probe failure the system retries at most 3 times, and only 4 failed attempts mark the model abnormal.
Hypothetical paper exercise: a trade compliance staff member compiles a product record whose source text reads "Product name: stainless steel flange; specification: DN50 PN16; use: connection of chemical piping; regulatory condition: automatic import licence required." The draft sentence awaiting judgement is "This product requires a dual-use item licence." The exercise illustrates a checking method only and involves no real customer or live business.
Configuration and implementation checks
The table lists settings and check items tied to this page's task and documents.
| Configuration item | Hypothetical starting value for this exercise | Reason for the choice and comparison method |
|---|---|---|
| AIPROXYAPIENDPOINT | http://aiproxy:3000 | Documentation requires the service root address without /v1; compare the entered value against that format |
| AIPROXYAPITOKEN | A non-empty string | Documentation requires a non-empty value matching the server configuration; check whether the value is empty |
| Language model maxContext | 125000 | Example value in the model field documentation; compare against the actual token volume of the product record |
| Language model quoteMaxToken | 120000 | Example value in the model field documentation; compare against maxContext, which it must not exceed |
| Index model defaultToken | 512 | Example value in the model field documentation; compare against the text splitting setting |
| Index model maxToken | 3000 | Example value in the model field documentation; compare against defaultToken, which it must exceed |
The model ID is globally unique and the model name may be customised. Channel priority ranges from 1 to 100, and a larger number is selected more readily. Channel testing reports each model's test result and request duration.
Three common errors
- Entering a full request address as
AIPROXY_API_ENDPOINT. Documentation requires the service root address without/v1or/chat/completions. Check whether the entered value ends in/v1; if it does, remove that suffix. - Setting
quoteMaxTokenabovemaxContext. In the documented field examplequoteMaxTokenis 120000 andmaxContextis 125000. Compare the two numbers;quoteMaxTokenmust not exceedmaxContext. - Substituting an application API key for
AIPROXY_API_TOKEN. Documentation requires the AI Proxy administrator token, matching the server configuration and non-empty. Check whether the token is empty and whether it matches the server configuration.
How to verify the setup
- Check the
AIPROXY_API_ENDPOINTentry. Take the hypothetical valuehttp://aiproxy:3000and compare whether it ends in/v1. A value that does not end in/v1meets the documented format; a value that does requires correction. - Check the relationship between
quoteMaxTokenandmaxContext. Take the hypothetical values 120000 and 125000 and compare the two numbers. AquoteMaxTokenat or belowmaxContextmatches the documented field example; a larger value requires adjustment. - Check that
AIPROXY_API_TOKENis non-empty and matches the server configuration. Take the hypothetical non-empty string and compare whether it is empty and whether it equals the server configuration. A non-empty matching value meets the documented requirement; an empty or differing value requires correction.
Model status probing shows model health, and its result does not replace configuration checking. Retrieval results carry no permission or entity isolation, and a relevance score is not a permission filter. An empty result can be checked against the explicit paper input [] for downstream design, and no claim is made that a fictional rule search must return an empty array.