Skip to content

[serve][MVP] /v1/input 语义:normal/queue/steer + 路由 + 背压 #39

@ARCJ137442

Description

@ARCJ137442

Parent: #35
Depends on: #38

Goal

实现 POST /v1/input 的请求校验、模式语义、输入投递与错误模型。

Scope

  • 请求体:{ text, mode? }mode 默认 normal
  • 模式语义:
    • normal:idle 提交;busy -> 409 Busy
    • queue:忙闲都走现有 queue 通道
    • steer:忙闲都走现有 steer 通道
  • 路由:当前激活线程
  • 异步受理响应:返回 requestId 等受理信息
  • 错误码:
    • 400(非法参数/JSON/空 text)
    • 409(Busy / NoActiveThread)
    • 429(过载,带 retryAfterMs + queueDepth
    • 500(内部异常)

Out of Scope

  • HTTP 层覆盖旧消息策略(明确不做)
  • 远程鉴权/非 localhost

Definition of Done

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions