Skip to content

feat: add rate limiting to AI recommend endpoint #16

Description

@luojiyin1987

问题

/api/ai/recommend 端点无任何频率限制,任意调用可消耗星火 API 配额。

修复

添加内存滑动窗口限流:

  • 60 秒窗口内每 IP 最多 5 次请求
  • 超限返回 429 + fallback_rate_limited,不触发 AI 调用

branch: feat/recommend-rate-limit

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions