Files
proxycast/docs/content/02.user-guide/4.configuration-example.md
T
cosoandClaude Sonnet 4.6 0b2d3caa6c feat: add request dedup, response cache, and capability routing metrics to API server
- Add response cache middleware (backed by aster-rust implementation)
- Add request deduplication middleware to prevent duplicate in-flight requests
- Add capability routing metrics middleware for model/provider fallback tracking
- Add idempotency stats (atomic counters) to IdempotencyStore
- Expose all four stores in ServerState and surface stats in ServerStatus
- Add ResponseCacheSettings to ServerConfig with defaults (600s TTL, 200 max entries)
- Add API server observability infrastructure (IdempotencyGuard, RequestDedupGuard, ResponseCacheGuard)
- Add inline capability detection for vision/tools/context when routing requests
- Register workspace_ensure_ready and workspace_ensure_default_ready commands in runner
- Update docs with response_cache configuration example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 17:51:37 +08:00

1.8 KiB
Raw Blame History

title, description, navigation
title description navigation
进阶配置示例 按创作场景选择配置思路(示例)
icon
i-heroicons-document-text

进阶配置示例

::alert{type="info"} 本页示例用于说明配置思路,不要求你逐字段照抄。具体字段以应用设置界面为准。 ::

示例 1:个人创作者(推荐起步)

目标:少配置、快开始。

profile: "solo-creator"
navigation:
  enabled:
    - agent
    - projects
    - resources
    - image-gen
themes:
  enabled:
    - social-media
    - video
    - novel

适用:自媒体、短视频、小说日更。

示例 2:团队协作

目标:统一入口和主题,降低沟通成本。

profile: "team-content"
navigation:
  enabled:
    - agent
    - projects
    - resources
    - tools
themes:
  enabled:
    - social-media
    - poster
    - document
resource:
  naming: "project-date-version"

适用:品牌运营、活动策划、小团队协作。

示例 3:进阶接入

目标:在保留创作工作台的同时开放 API 给外部工具。

profile: "creator-plus-api"
api_server:
  enabled: true
  host: "127.0.0.1"
  port: 8999
  auth: "api-key"
routing:
  fallback: true

适用:有脚本联动、自动化流程需求的用户。

示例 4:API 缓存策略(高级)

目标:精确控制哪些响应状态码参与短时缓存(非流式)。

server:
  host: "127.0.0.1"
  port: 8999
  api_key: "your-api-key"
  response_cache:
    enabled: true
    ttl_secs: 600
    max_entries: 200
    max_body_bytes: 1048576
    cacheable_status_codes: [200]  # 默认仅缓存 200;可按需扩展 [200, 201]

适用:对缓存命中与语义一致性有要求的自动化/API 调用场景。

调整顺序建议

  1. 先确认导航与主题
  2. 再确认连接与稳定性
  3. 最后再做 API 与自动化扩展