mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-10 03:09:50 +08:00
fix(ai): harden responses replay and failure diagnostics
This commit is contained in:
@@ -203,7 +203,7 @@ fn build_admin_monitoring_usage_routing_snapshot_trace(
|
||||
endpoint_id: usage.provider_endpoint_id.clone(),
|
||||
key_id: usage.provider_api_key_id.clone(),
|
||||
status,
|
||||
skip_reason: None,
|
||||
skip_reason: usage.routing_candidate_skip_reason().map(ToOwned::to_owned),
|
||||
is_cached: false,
|
||||
status_code: usage.status_code,
|
||||
error_type: usage
|
||||
@@ -356,6 +356,9 @@ fn build_admin_monitoring_usage_routing_snapshot_extra_data(
|
||||
if let Some(candidate_index) = usage.routing_candidate_index() {
|
||||
object.insert("candidate_index".to_string(), json!(candidate_index));
|
||||
}
|
||||
if let Some(diagnostic) = usage.routing_failure_diagnostic() {
|
||||
object.insert("failure_diagnostic".to_string(), diagnostic.clone());
|
||||
}
|
||||
Some(Value::Object(object))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user