Files
lpt-infra/prod/configmap.yaml
T
admin 18d34f816f feat: 补充用量统计与上报的部署配置
- configmap 增加计价表与上报地址,改价不必重新发版
- lpt-ai 增加 LPT_AI_REPORT_URL/TOKEN,lpt-be 增加上报入站令牌
- 新增白名单变量,共用一个可选 secret key
2026-10-10 18:46:11 +08:00

30 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
apiVersion: v1
kind: ConfigMap
metadata:
name: lpt-config
namespace: lpt-prod
data:
# LPT AI Service
LLM_API_URL: https://api.deepseek.com/v1/chat/completions
LLM_MODEL: deepseek-flash
LLM_TIMEOUT_MS: "60000"
LPT_AI-SERVICE_URL: http://lpt-ai:5199
PORT: "5199"
# AI 用量统计(计价表按 DeepSeek 官方 PEAK 一列,USD / 1M tokens)
# 改价只需改这里并重启 lpt-ai,历史账不受影响:费用在结算时已冻结进数据库。
LLM_PRICE_CACHE_HIT_PER_M: "0.006"
LLM_PRICE_CACHE_MISS_PER_M: "0.3"
LLM_PRICE_OUTPUT_PER_M: "1.2"
LLM_PRICE_OFFPEAK_FACTOR: "0.5"
LLM_PRICE_PEAK_WINDOWS: "01:00-04:00,06:00-10:00"
# 中国法定节假日(UTC 的 yyyy-MM-dd,逗号分隔),按谷时计价;每年需要更新
LLM_PRICE_PEAK_HOLIDAYS: ""
# lpt-ai 把用量推给 lpt-be;留空表示不上报,只保留 lpt-ai 本地面板(无长期账本)
LPT_AI_REPORT_URL: http://lpt-be:8888
# 可见「AI 用量统计」入口的用户名白名单(Spring Boot 松绑定到 lpt.ai-usage.admin-usernames)
LPT_AI-USAGE_ADMIN-USERNAMES: admin
# Spring Boot Database
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/lpt_prod?allowPublicKeyRetrieval=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8