g2api / config.yaml
LerinaOwO's picture
Upload 98 files
097fb32 verified
# Hugging Face Space runtime config for cursor2api
# 保留原项目的主要默认配置,只把端口和部署相关项调整为适合 HF Spaces。
# 敏感信息不要写进仓库;请在 Space Settings -> Variables and secrets 中设置:
# Secrets:
# CURSOR_COOKIE=<你的浏览器抓到的 Cursor Cookie,含 _vcrcs 等>
# AUTH_TOKEN=<你自己的 API 鉴权 token,可选但强烈建议>
# Variables:
# PORT=7860
# CURSOR_MODEL=google/gemini-3-flash # 可按需改
# ENABLE_STEALTH=false # 默认关闭
# LOG_DB_ENABLED=false
# LOG_FILE_ENABLED=false
#
# 如果你不用 CURSOR_COOKIE,而是自己另外部署了 stealth-proxy,也可以设置:
# STEALTH_PROXY=http://your-stealth-proxy:3011
port: 7860
timeout: 120
# 公网部署推荐用 AUTH_TOKEN 环境变量覆盖,而不是写死在仓库里
# auth_tokens:
# - "sk-your-secret-token"
# 国内/直连环境通常不需要
# proxy: "http://127.0.0.1:7890"
cursor_model: "google/gemini-3-flash"
max_auto_continue: 0
max_history_messages: -1
max_history_tokens: 120000
thinking:
enabled: false
compression:
enabled: true
level: 2
tools:
schema_mode: 'compact'
description_max_length: 100
passthrough: false
disabled: false
fingerprint:
user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36"
# 如果你通过浏览器拿到了完整 Cookie,可改为环境变量 CURSOR_COOKIE 提供
# cookie: "generaltranslation.locale-routing-enabled=true; _vcrcs=..."
# 如果你另有外部 stealth proxy,可用环境变量 STEALTH_PROXY 覆盖
# stealth_proxy: "http://127.0.0.1:3011"
vision:
enabled: true
mode: 'ocr'
logging:
file_enabled: false
dir: './logs'
max_days: 7
persist_mode: 'summary'
db_enabled: false
db_path: './logs/cursor2api.db'