Skip to content

refactor(api): W8 Intent 栈拆分(rules + LLM 子模块)#157

Merged
Cyning12 merged 1 commit into
mainfrom
task/api-intent-w8
Jun 9, 2026
Merged

refactor(api): W8 Intent 栈拆分(rules + LLM 子模块)#157
Cyning12 merged 1 commit into
mainfrom
task/api-intent-w8

Conversation

@Cyning12

@Cyning12 Cyning12 commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • 新增 api/intent_router_rules.py:V1 表驱动规则命中
  • 新增 api/intent_llm.py:LRU 缓存、LLM 外呼/重试、decide_intent_v2
  • intent_agent.py 瘦身为模型 + hints 仲裁 + re-export
  • intent_router.py 保留 decide_intent() 入口

Test plan

  • ruff check api tests
  • pytest tests -m "not intent_eval and not intent_benchmark"(352 passed)

Made with Cursor

CI 状态(自动 · pr-post-ci)

更新:2026-06-09 09:42 UTC · tools/pr_post_ci_update_body.py

Required 全绿:是

Check Status
contract_check success
manifest_check success
pytest success

变更范围(自动统计)

文件数:5

顶层前缀 计数
api/ 4
docs/ 1

⚠ automerge 路径闸:含 api/tests/.github/workflows/ 等 — 勿打 automerge 或须人审 merge。

命中路径
  • api/intent_agent.py
  • api/intent_llm.py
  • api/intent_router.py
  • api/intent_router_rules.py

Epic api-modularization W8:表驱动规则与 LLM/cache/retry 分文件;
intent_agent 保留模型与公开 re-export,测试 monkeypatch 路径不变。

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-ink-brain-api-python Ready Ready Preview, Comment Jun 9, 2026 9:40am

@Cyning12 Cyning12 merged commit 0a78767 into main Jun 9, 2026
9 checks passed
@Cyning12 Cyning12 deleted the task/api-intent-w8 branch June 13, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants