Code and Change Review Assistance for License Compliance and Copyright Notices: Context and Tokens

Data for this category supports copyright and license compliance workflows for open source projects. Sources include the LICENSE file in code

What Data Belongs to This Category

Data for this category supports copyright and license compliance workflows for open source projects. Sources include the LICENSE file in code repository root directories, third-party dependency lists, official standard license texts, and project contributor records. Daily produced documents include the project root LICENSE file, NOTICE files with copyright attribution, license lists updated alongside dependency changes, and copyright notice documents for corresponding versions. Data updates trigger on project version iterations or third-party dependency changes, with no fixed schedule. Updates only occur when versions are released or dependencies are adjusted.

What Constraints Do These Characteristics Impose on Context and Tokens

Data sources for this category are scattered, requiring integration of multi-source information such as code repositories, dependency lists, and contributor records. This leads to significant fluctuations in context token usage. Updates have no fixed schedule; each change review must pull the latest LICENSE file, NOTICE document, and dependency license list. Context length must adapt to the number of dependencies and document scale of different projects.

Daily documents have distinct structural differences: LICENSE files may contain thousands of characters of legal terms, while dependency lists may include dozens of third-party package license entries. Precise truncation of valid content is required to avoid invalid token usage. Additionally, compliance reviews need to link copyright attribution in contributor records, incorporating scattered contributor information into the context. This further increases the complexity of token management.

How to Set Configurations

Configuration ItemRecommended SettingRationale
Maximum Context8000–12000 tokenAdapts to the total length of compliance documents for most open source projects, aligns with the default parameter adjustment range of FastGPT v4.17.0
maxContext8000–12000 tokenCorresponds to the maximum context setting in the Chinese interface, covering total token consumption after integrating LICENSE files and dependency lists
Maximum Reference Tokens1500–2000 tokenTargets valid truncation of a single license text, retaining core compliance terms and copyright notice content
quoteMaxToken1500–2000 tokenLimits token usage for a single reference, preventing long license texts from occupying excessive context space
Chunk Overlap Length100–200 charactersAdapts to the long paragraph structure of license texts, avoiding cross-block truncation of compliance terms
Single Recall LimitTop 10 entriesRestricts the number of recalled dependency licenses, keeping total token consumption within a reasonable range

Three Common Misconfigurations

  • The interface displays the prompt "Context length exceeds model limit". This occurs when the maxContext parameter is not adjusted based on the total length of the open source project's compliance documents, causing the total token count of integrated LICENSE files and dependency license lists to exceed the configured limit.
  • Compliance review results omit license information for some third-party dependencies. This happens when the single recall limit is set too low, failing to retrieve license texts for all dependencies and resulting in missing necessary compliance data in the context.
  • The system displays the prompt "AIPROXYAPIENDPOINT or AIPROXYAPITOKEN is not set". For troubleshooting: Check if the FastGPT App/Admin server has configured the AIPROXYAPIENDPOINT (AI Proxy service root address, format example: http://aiproxy:3000) and a non-empty AIPROXYAPITOKEN (AI Proxy administrator Token) environment variable.

How to Verify Proper Configuration

  • Upload a project dependency list containing 3 or more third-party dependencies, and confirm that the number of license texts recalled by the system matches the actual number of dependencies.
  • Import a complete MIT license text, and confirm that the effective truncated length of the terms falls within the configured range of quoteMaxToken.
  • Run a change review task, and confirm that the total context token count shown in the logs does not exceed the configured value of maxContext.
  • Check the FastGPT App/Admin server environment variable configuration, and confirm that AIPROXYAPIENDPOINT and AIPROXYAPITOKEN are correctly set and non-empty.

The values given are common starting points and should be measured against the reader's own samples.

Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-10-19.