参考手册
配置
ICML_PAPERS_ 环境变量和默认值。
本地使用时,把 .env.example 复制为 .env。显式环境变量会覆盖 .env;所有变量都以 ICML_PAPERS_ 开头。
Secret
Key 可以直接设置,也可以从文件读取:
ICML_PAPERS_DASHSCOPE_API_KEY=
ICML_PAPERS_DASHSCOPE_API_KEY_FILE=/run/secrets/dashscope_api_key文件优先。公网部署建议使用只读 secret 文件。配置值无效或互相冲突时,进程会在启动前退出。
JSON 环境值
列表配置使用 JSON,例如:
ICML_PAPERS_ALLOWED_HOSTS=["papers.example.com:443"]
ICML_PAPERS_TRUSTED_PROXY_NETWORKS=["172.20.0.0/16"]生产环境应填写准确的 Host、Origin 和代理网段。
字段
下表由运行时配置 schema 自动生成。
| 环境变量 | 类型 | 默认值 | 约束 |
|---|---|---|---|
ICML_PAPERS_DATA_DIR | string | data | — |
ICML_PAPERS_INDEX_ROOT | string | .data/index | — |
ICML_PAPERS_STATE_DB_PATH | string | .data/state/runtime.sqlite3 | — |
ICML_PAPERS_SQLITE_BUSY_TIMEOUT_MS | integer | 5000 | ≥ 100, ≤ 60000 |
ICML_PAPERS_DASHSCOPE_API_KEY | string | null | 未设置 | — |
ICML_PAPERS_DASHSCOPE_API_KEY_FILE | string | null | 未设置 | — |
ICML_PAPERS_DASHSCOPE_HTTP_BASE_URL | string | https://dashscope.aliyuncs.com/api/v1 | — |
ICML_PAPERS_EMBEDDING_MODEL | string | qwen3.7-text-embedding | — |
ICML_PAPERS_EMBEDDING_DIM | integer | 1024 | ≥ 1 |
ICML_PAPERS_EMBEDDING_BATCH_SIZE | integer | 20 | ≥ 1, ≤ 20 |
ICML_PAPERS_EMBEDDING_MAX_ATTEMPTS | integer | 3 | ≥ 1, ≤ 5 |
ICML_PAPERS_EMBEDDING_DEADLINE_SECONDS | number | 12.0 | > 0, ≤ 60 |
ICML_PAPERS_MILVUS_URI | string | http://127.0.0.1:19530 | — |
ICML_PAPERS_MILVUS_COLLECTION_PREFIX | string | icml2026_mcp | — |
ICML_PAPERS_MILVUS_TIMEOUT_SECONDS | number | 10.0 | > 0, ≤ 120 |
ICML_PAPERS_DEFAULT_TOP_K | integer | 10 | ≥ 1 |
ICML_PAPERS_MAX_TOP_K | integer | 50 | ≥ 1 |
ICML_PAPERS_DEPTH_MULTIPLIER | integer | 4 | ≥ 1 |
ICML_PAPERS_MAX_SEARCH_DEPTH | integer | 200 | ≥ 1 |
ICML_PAPERS_MAX_QUERY_CHARS | integer | 4000 | ≥ 1 |
ICML_PAPERS_MAX_GET_PAPER_IDS | integer | 50 | ≥ 1 |
ICML_PAPERS_SESSION_IDLE_TTL_SECONDS | integer | 86400 | ≥ 60 |
ICML_PAPERS_MAX_SESSIONS | integer | 4096 | ≥ 1 |
ICML_PAPERS_EXHAUSTED_AFTER_EMPTY_ROUNDS | integer | 3 | ≥ 1 |
ICML_PAPERS_MAX_SESSION_ROUNDS | integer | 200 | ≥ 1 |
ICML_PAPERS_MAX_SESSION_SEEN | integer | 6341 | ≥ 1 |
ICML_PAPERS_MAX_SESSION_AUDIT_RECORDS | integer | 200 | ≥ 0 |
ICML_PAPERS_SESSION_SUMMARY_PAPER_LIMIT | integer | 500 | ≥ 0 |
ICML_PAPERS_SESSION_LABEL_MAX_CHARS | integer | 120 | ≥ 1 |
ICML_PAPERS_PROVIDER_CONCURRENCY | integer | 64 | ≥ 1 |
ICML_PAPERS_MILVUS_CONCURRENCY | integer | 32 | ≥ 1 |
ICML_PAPERS_SEARCH_QUEUE_SIZE | integer | 512 | ≥ 1 |
ICML_PAPERS_QUEUE_TIMEOUT_SECONDS | number | 10.0 | > 0 |
ICML_PAPERS_IP_RATE_PER_MINUTE | integer | 600 | ≥ 1 |
ICML_PAPERS_IP_RATE_BURST | integer | 100 | ≥ 1 |
ICML_PAPERS_IP_SEARCHES_PER_DAY | integer | 50000 | ≥ 1 |
ICML_PAPERS_IP_SESSION_OPEN_RATE_PER_MINUTE | integer | 60 | ≥ 1 |
ICML_PAPERS_IP_SESSION_OPEN_BURST | integer | 20 | ≥ 1 |
ICML_PAPERS_IP_SESSION_OPENS_PER_DAY | integer | 5000 | ≥ 1 |
ICML_PAPERS_GLOBAL_RATE_PER_MINUTE | integer | 6000 | ≥ 1 |
ICML_PAPERS_PROVIDER_REQUESTS_PER_MINUTE | integer | 24000 | ≥ 1 |
ICML_PAPERS_PROVIDER_TOKENS_PER_MINUTE | integer | 1000000 | ≥ 1 |
ICML_PAPERS_EMBEDDING_CACHE_MAX_ENTRIES | integer | 100000 | ≥ 0 |
ICML_PAPERS_EMBEDDING_CACHE_TTL_SECONDS | integer | 86400 | ≥ 0 |
ICML_PAPERS_ABSTRACT_PREVIEW_CHARS | integer | 360 | ≥ 0 |
ICML_PAPERS_MAX_AUTHORS_SHOWN | integer | 4 | ≥ 0 |
ICML_PAPERS_SERVER_HOST | string | 127.0.0.1 | — |
ICML_PAPERS_SERVER_PORT | integer | 20441 | ≥ 1, ≤ 65535 |
ICML_PAPERS_ALLOWED_HOSTS | string[] | ["127.0.0.1:*", "localhost:*", "[::1]:*", "icml-mcp:*"] | — |
ICML_PAPERS_ALLOWED_ORIGINS | string[] | ["http://127.0.0.1:*", "http://localhost:*"] | — |
ICML_PAPERS_TRUSTED_PROXY_ENABLED | boolean | false | — |
ICML_PAPERS_TRUSTED_PROXY_HEADER | string | X-ICML-Client-IP | — |
ICML_PAPERS_TRUSTED_PROXY_NETWORKS | string[] | [] | — |