Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
修复 Agent 已被 Token 预算回调拒绝、却仍继续调用模型的问题。图执行层现在在 Generate / Stream 入口返回预算错误,普通推理和工具预算耗尽后的总结都在底层模型执行前停止。
Closes #457
Evidence
After:
TestBuildReActGraph_TokenBudgetStopsModelCalls的 10 个场景全部通过,覆盖 Invoke / Stream、普通推理 / 工具熔断总结、额度充足 / 无限额;拒绝场景断言底层模型调用为 0。go test -race ./internal/pkg/llm ./internal/manager/biz/aiops/graph/... ./internal/manager/biz/aiops/chatruntime ./internal/manager/biz/aiops/tools/decorators。go vet、Manager 构建、make test-commit-policy、git diff --check。make build的 Edge 阶段缺少平台实现;make test-race遇到相同 Edge 编译限制,以及未修改的TestValidateEntry_DestWhitelist路径大小写失败和TestProbeDNS_Execute_Unresolvable被本机 DNS 解析到地址的失败。全量 Linux 结果以 CI 为准。Merge Danger
Door: two-way
可回退此提交。配置了 Token 额度的部署在预算拒绝后会立即停止模型请求,并沿用现有预算错误提示。
Blast Radius: Agent
Author confirmation