Repository navigation
[Epic] 模型 Provider 与运行时预算 / Model providers and runtime budgets #35
Copy link
Copy link
Closed
3 / 33 of 3 issues completedClosed
3 / 33 of 3 issues completed
Copy link
Labels
epicParent issue grouping related deliverablesParent issue grouping related deliverablesgoPull requests that update go codePull requests that update go codeproviderLLM provider and model runtimeLLM provider and model runtimeroadmapProduct roadmap and cross-cutting delivery trackingProduct roadmap and cross-cutting delivery tracking
Description
目标 / Goal
在现有 Anthropic-compatible 与 mock 能力之上,完成可扩展 Provider、可解释资格检测和统一 Token/时间/金额预算。
Extend the current Anthropic-compatible and mock stack with additional providers, explainable qualification, and unified token/time/cost budgets.
当前基线 / Current baseline
- Mock Provider 与 Router 已存在。
- DeepSeek Anthropic-compatible 真实多轮路径已通过本地验收。
- MiMo 适配点存在,但当前本机未配置且没有可复现验收证据。
- OpenAI-compatible 与 Ollama 仍是扩展点。
- 累计 Token/模型时间预算已存在,金额预算尚未完成。
子任务范围 / Child scope
- OpenAI-compatible Provider;
- Ollama 本地 Provider;
- 金额预算、价格快照、资格检测和诊断矩阵。
完成定义 / Definition of done
- Provider 配置、Secret 引用、模型列表、连通性、流式响应和工具协议有统一接口。(所有 Provider 实现同一
llm.Provider接口;Registry 统一配置/模型列表/Harness profile/凭证状态/诊断:feat(provider): OpenAI-compatible Provider 与工具流式协议 #47 → PR feat(provider): 接入 OpenAI 兼容模型服务与工具流式协议 #60、feat(provider): Ollama 本地 Provider 与能力探测 #48 → PR feat(provider):Ollama 本地 Provider 与能力探测(#48) #63;ADR 0040/0074/0100) - 不同 Provider 只接收其协议需要的最小 Prompt/Tool schema。(Harness profile 按 Provider 输出 transport/tool/json 策略;OpenAI 严格 Chat Completions 只发送
Authorization/Content-Type/Accept与协议字段;Ollama no-tool 模型在 Harness(ToolStrategy=none)与 Provider(拒绝透传 Tool schema)双层把关;ADR 0074/0100) - 资格检测区分未配置、网络失败、协议失败、容量限制和模型不支持。(8 值资格 taxonomy 持久化于
qualification_status.<provider>.<model>:not_configured/available/protocol_mismatch/auth_failed/network_failed/rate_limit/capacity/model_unsupported;诊断、qualification 与模型可用性视图统一返回;feat(runtime): 金额预算、价格快照与 Provider 资格诊断 #49 → PR feat(runtime): 金额预算、价格快照与 Provider 资格诊断 #64;ADR 0101) - Token、时间与金额预算均能在每次调用前复核并累计持久化。(Token:Supervisor/Specialist/fanout 每次调用前复核并在 checkpoint/attempt 持久化累计;时间:execution millis 累计;金额:reserve→call→settle-or-release 整数 micro-USD 账本 + 终态事件对账,schema v100;feat(runtime): 金额预算、价格快照与 Provider 资格诊断 #49 → PR feat(runtime): 金额预算、价格快照与 Provider 资格诊断 #64;ADR 0101)
- Secret 永不出现在日志、Activity、SQLite payload 或前端响应。(凭证只进 OS 凭证管理器,明文永不返回/落库;模型可用性与 OpenAPI 有 secret-free 审计测试;Web 客户端对 redacted 视图严格校验;ADR 0045/0100)
涉及目录 / Affected directories
internal/llm/internal/modelregistry/internal/credential/internal/application/internal/domain/internal/store/internal/contextmgr/internal/httpapi/cmd/cyberagent/web/src/configs/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
epicParent issue grouping related deliverablesParent issue grouping related deliverablesgoPull requests that update go codePull requests that update go codeproviderLLM provider and model runtimeLLM provider and model runtimeroadmapProduct roadmap and cross-cutting delivery trackingProduct roadmap and cross-cutting delivery tracking
Activity
Qiyuanqiii commentedon Aug 15, 2026
Epic 收口 / Epic closure
三个子任务已全部完成并合并,完成定义五项均已核对通过:
完成定义逐项证据
llm.Provider;Registry 统一配置、模型列表、Harness profile、凭证状态与诊断。model.*事件对账自愈,run 终态强制释放;MaxCostUSD>0才启用、缺价格条目 fail-closed。保留的边界(非目标,记录在 ADR 0101)
MaxCostUSD<=0)的 run 完全不记账,行为与以前一致。关闭本 epic。后续 Provider(如其他 OpenAI-compatible 厂商)与预算扩展均按新的独立 issue 从统一接口与 fail-closed 边界出发。