{
  "listen": "127.0.0.1:7863",
  "api_key": "这里改成自己的密码，用于登陆后台和添加模型时候作为api key",
  "auth_dir": "./auths",
  "state_file": "./data/state.json",
  "dns_servers": [],
  "server": {
    "read_timeout": "300s",
    "shutdown_timeout": "30s",
    "max_payload_bytes": 67108864
  },
  "panel": {
    "package_detail_limit": 5,
    "poll_interval_sec": 0
  },
  "update": {
    "auto_enabled": false,
    "auto_time": "04:00"
  },
  "logging": {
    "request_archive_enabled": true,
    "request_retention_days": 7,
    "request_archive_max_mb": 100,
    "request_client_info": true,
    "request_archive_context": false
  },
  "cooldown": {
    "soft_rate": "600s",
    "soft_rate_max": "2h"
  },
  "schedule": {
    "checkin_hours": [9, 21],
    "travel_hours": [9, 21],
    "activity_hours": [10],
    "web_activity_enabled": false,
    "keepalive_hours": [22],
    "keepalive_refresh_window": "168h",
    "growth_hours": [11],
    "checkin_enabled": true,
    "travel_enabled": true,
    "activity_enabled": true,
    "keepalive_enabled": true,
    "growth_enabled": true,
    "growth_concurrency": 1,
    "jitter_minutes": 0,
    "account_spread_minutes": 0,
    "account_spread_min_gap_seconds": 0,
    "balance_refresh_enabled": true,
    "balance_refresh_minutes": 5,
    "include_disabled_in_tasks": false,
    "balance_refresh_jitter_permill": 0,
    "task_sweep_jitter_permill": 0,
    "makeup_cards_per_round": 0
  },
  "global": {
    "enabled": true,
    "chat_base": "",
    "billing_base": ""
  },
  "cn": {
    "chat_base": ""
  },
  "upstream": {
    "timeout_seconds": 120,
    "tls_fingerprint": "node",
    "header_timeout_seconds": 120,
    "idle_timeout_seconds": 300,
    "user_agent": "",
    "client_version": "",
    "cli_version": "",
    "client_name": "",
    "device_token": "",
    "device_token_file": "",
    "passthrough_ip": false,
    "dump_dir": "",
    "dump_max_bytes": 0,
    "restriction_hold_seconds": 1800
  },
  "features": {
    "sanitize_blacklist_fingerprints": true,
    "sanitize_brand_scope": "all",
    "embeddings_enabled": false,
    "watermark_strip_enabled": false
  },
  "models": {
    "_comment": "hidden: 不对外暴露的模型黑名单。裸名=两域都藏；\"cn:xxx\"/\"global:xxx\"=只藏该域。/v1/models 列表过滤 + chat 点名拒绝，面板保存后热生效。allowed: 模型白名单（issue #68），条目语法同 hidden；空数组 = 不启用（默认放行全部）；非空时仅白名单内模型可列出与调用，与 hidden 共存取交集。",
    "hidden": [],
    "allowed": []
  },
  "thinking": {
    "_comment": "网关思考档位策略。enabled=false 完全不碰档位；client_priority=true 客户端优先：客户端传了档位就照单全收（含关闭思考），只在缺档时补 default_effort；false 网关优先，按 override_scope 改写客户端档位（level=只改档位、尊重客户端关闭思考；all=连关闭也改写为开启）。default_effort=max 取模型支持的最高档，也可写 high/xhigh/medium/low/minimal（模型不支持时落到不高于它的最高支持档）。model_defaults 按模型覆盖目标档：\"cn:xxx\"/\"global:xxx\" 精确到域，裸名两域共用；\"inherit\" 表示不覆盖。面板「模型与档位」页每行的「网关档位」下拉直接写本表（域精确键），配置页仅保留总开关与优先级三选一；保存后热生效。",
    "enabled": true,
    "default_effort": "max",
    "client_priority": true,
    "override_scope": "level",
    "model_defaults": {}
  },
  "prompt": {
    "mode": "passthrough",
    "file": "",
    "keep_recent_rounds": 0
  },
  "upstash": {
    "url": "",
    "token": ""
  },
  "pool": {
    "max_in_flight": 3,
    "max_in_flight_global": 2,
    "breaker_threshold": 3,
    "breaker_cooldown": "30m",
    "breaker_cooldown_max": "6h",
    "degrade_threshold": 5,
    "degrade_cooldown": "10m",
    "degrade_cooldown_max": "2h",
    "idle_weight_per_hour": 0.5,
    "idle_weight_max": 5.0,
    "prefer_expiring": true,
    "expiring_soon": "168h",
    "account_priority": {},
    "account_share": {},
    "cost_explore_interval": "30m",
    "balance_window": "1h",
    "credit_floor": 100,
    "reserve_credits": 10,
    "model_fallback": {}
  },
  "session_sticky": {
    "enabled": true,
    "ttl": "30m",
    "gc_interval": "5m"
  },
  "admin": {
    "enabled": false,
    "audit_enabled": false,
    "audit_file": "./data/admin_audit.log"
  },
  "metrics": { "enabled": false },
  "budget": { "daily_credit_limit": 0, "burst_credit_limit": 0, "cache_low_rate": 0 },
  "alerting": {
    "enabled": false,
    "webhook_url": "",
    "min_healthy_cn": 1,
    "min_healthy_global": 0
  },
  "watchdog": {
    "_comment": "上游目录改版监控：定期对 /v1/models 结果取指纹，模型新增/下线或能力字段变动时经 alerting.webhook_url 通知。默认关闭——只在想第一时间知道上游改了目录时开。",
    "enabled": false,
    "interval_seconds": 3600
  }
}
