Repository navigation
搜索被拒绝时明确降级并继续回答 - #506
Closed
taekchef wants to merge 4 commits into
Closed
搜索被拒绝时明确降级并继续回答#506taekchef wants to merge 4 commits into
taekchef wants to merge 4 commits into
Conversation
Closed
Collaborator
Author
|
这项改动已随 #512 接回 main。已核对本 PR 的完整组合补丁与 Codeberg #4 的 squash 提交 e19c0bc8 完全一致;后续错误处理改动也保留在主线中。 关闭重复待办,保留原分支和讨论,不再重复合并旧分支。 |
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.
服务拒绝原生网页搜索工具时,Agent 现在会明确降级并继续回答:在尚未收到模型输出的前提下,仅对明确的“不支持搜索”HTTP 400 关闭本轮后续搜索并重试一次。同步更新模型的能力说明,并通过已有工具活动显示、记录搜索不可用;本地工具、会话历史、模型和推理档保持原配置,下一轮恢复正常搜索尝试。
移除传输层原先对几乎所有 HTTP 400 隐藏关闭搜索的重试,把恢复放到能同步提示词和用户状态的 Agent 循环。四类服务接口统一遵守请求中的搜索开关,避免本地课程工具把已关闭的搜索重新打开。无关请求错误、认证错误、限流、已经开始输出或降级后的再次失败保留错误;一般 HTTP 400 显示为请求被拒绝,不再误报临时服务故障。
验证:
swift test -j 4 --filter 'NativeProviderSearchFailureTests|NativeAgentReplayTests|NativeAgentRuntimeTests|NativeModelUsageTests|AgentReasoningEffortTests|AgentStreamingDisplayPumpTests':89 项通过。.build/debug/WeiBeiSelfCheck:通过。python3 script/check_ci_routing.py和git diff --check:通过。边界:仅识别结构化错误中明确的不支持搜索措辞,其他错误保留真实失败。测试使用虚构凭据、隔离数据及本地响应,没有调用真实模型服务,未安装验证 App。此修复处理独立的搜索错误路径,不作为原足球事实错误已解决的证据。