fix(monitoring): reject succeeded results missing answers or citation sources
Server callback now rejects succeeded submissions without a non-empty answer, or whose answer contains [citation:N] markers without any sources. Desktop adapters mirror this client-side: kimi returns unknown when sources arrive without a final answer, and yuanbao returns unknown when the answer has unresolved citation markers. Yuanbao also unwraps redirect URLs, harvests citations from more DOM attributes and document URL fields, drops links pointing back at yuanbao itself, and dedupes overlapping streaming fragments. Runtime controller forwards only an explicit "succeeded" status as success; anything else becomes failed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2918,16 +2918,16 @@ export const kimiAdapter: MonitorAdapter = {
|
||||
};
|
||||
}
|
||||
|
||||
if (!answer && !searchResults.length && !citations.length) {
|
||||
if (!answer) {
|
||||
const timedOut = !queryResult.ok && queryResult.error === "kimi_query_timeout";
|
||||
const hasReasoningOnly = Boolean(reasoning);
|
||||
if (timedOut || hasReasoningOnly) {
|
||||
if (timedOut || hasReasoningOnly || searchResults.length > 0 || citations.length > 0) {
|
||||
const incompleteDetail = !queryResult.ok
|
||||
? queryResult.detail ?? queryResult.error
|
||||
: "kimi returned no final answer before completion";
|
||||
: "kimi returned sources without a final answer";
|
||||
return {
|
||||
status: "unknown",
|
||||
summary: "Kimi 超时未拿到完整答案,已回写 unknown 等待后续补采。",
|
||||
summary: "Kimi 未拿到完整答案,已回写 unknown 等待后续补采。",
|
||||
error: buildAdapterError(
|
||||
timedOut ? queryResult.error : "kimi_incomplete_response",
|
||||
incompleteDetail,
|
||||
@@ -2935,6 +2935,8 @@ export const kimiAdapter: MonitorAdapter = {
|
||||
page_url: finalSnapshot.url,
|
||||
current_model_label: finalSnapshot.currentModelLabel,
|
||||
reasoning_present: Boolean(reasoning),
|
||||
citation_count: citations.length,
|
||||
search_result_count: searchResults.length,
|
||||
busy: finalSnapshot.busy,
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user