mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
feat: 请求候选追踪添加 proxy 元数据, 修复 usage 状态回退, 优化前端轮询
- 在各 planner decision payload 中注入 proxy trace 信息 (node_id, node_name, url, source) - request_candidate 报告上下文支持 proxy 字段, extra_data 合并逻辑改为 merge 而非覆盖 - SQL/内存仓库防止 usage status 从 streaming 回退到 pending - 前端移除活跃请求完成时的全表刷新, active discovery 尊重 globalAutoRefresh 开关
This commit is contained in:
@@ -501,6 +501,24 @@ async fn gateway_executes_openai_cli_sync_via_local_decision_gate_with_local_syn
|
||||
.expect("request candidate trace should read");
|
||||
assert_eq!(stored_candidates.len(), 1);
|
||||
assert_eq!(stored_candidates[0].status, RequestCandidateStatus::Success);
|
||||
assert_eq!(
|
||||
stored_candidates[0]
|
||||
.extra_data
|
||||
.as_ref()
|
||||
.and_then(|value| value.get("proxy"))
|
||||
.and_then(|value| value.get("node_id"))
|
||||
.and_then(serde_json::Value::as_str),
|
||||
Some("proxy-node-openai-cli-local")
|
||||
);
|
||||
assert_eq!(
|
||||
stored_candidates[0]
|
||||
.extra_data
|
||||
.as_ref()
|
||||
.and_then(|value| value.get("proxy"))
|
||||
.and_then(|value| value.get("source"))
|
||||
.and_then(serde_json::Value::as_str),
|
||||
Some("key")
|
||||
);
|
||||
|
||||
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
|
||||
assert!(
|
||||
|
||||
Reference in New Issue
Block a user