This commit is contained in:
Yujong Lee 2026-10-04 12:29:16 -07:00
parent 9c2e0e2853
commit 346e82b776
6 changed files with 17 additions and 12 deletions

View file

@ -571,7 +571,13 @@ async fn failed_batch_spend_lookup_falls_back_to_each_run_instead_of_losing_ever
let by_ref: HashMap<&str, f64> = page
.data
.iter()
.map(|run| (run.trace_ref.as_str(), run.spend.expect("run's own spend read should have succeeded")))
.map(|run| {
(
run.trace_ref.as_str(),
run.spend
.expect("run's own spend read should have succeeded"),
)
})
.collect();
assert_eq!(by_ref["ref-a"], 1.5);
assert_eq!(by_ref["ref-b"], 2.5);

View file

@ -239,8 +239,7 @@ mod tests {
use rstest::rstest;
use serde_json::json;
use super::Error;
use super::{shared_rows, write_rows};
use super::{Error, shared_rows, write_rows};
#[rstest]
fn encoded_limit_counts_utf8_bytes_across_rows() {

View file

@ -1,6 +1,5 @@
use litellm_http::Client;
use litellm_storage_clickhouse::Error as StorageError;
use litellm_storage_clickhouse::{Query, fetch};
use litellm_storage_clickhouse::{Error as StorageError, Query, fetch};
use litellm_traces::query::named as contracts;
use litellm_traces_cache::{StoreError, TraceStore};

View file

@ -3,8 +3,7 @@ use litellm_migrate::Migration;
use serde::Serialize;
use std::time::Duration;
use super::Connection;
use super::Error;
use super::{Connection, Error};
const SCHEMA_REQUEST_TIMEOUT: Duration = Duration::from_secs(30);

View file

@ -3,8 +3,10 @@ use std::collections::BTreeMap;
use litellm_http::Client;
use litellm_traces::ReadQuery;
use super::query::{lens::*, named::*};
use super::{Connection, Error, Parameter};
use super::{
Connection, Error, Parameter,
query::{lens::*, named::*},
};
use litellm_storage_clickhouse::{Query, fetch_json};
pub async fn execute_named_read(

View file

@ -1887,10 +1887,10 @@ async fn named_and_sql_readers_share_request_log_visibility(
#[case] legacy_key: Option<&str>,
#[case] expected: Vec<&str>,
) -> TestResult {
use litellm_traces_clickhouse::query::named::{
ReadAccessParams, SpendByResponseIds, SpendByResponseIdsParams,
use litellm_traces_clickhouse::{
QueryReaders, QueryScope,
query::named::{ReadAccessParams, SpendByResponseIds, SpendByResponseIdsParams},
};
use litellm_traces_clickhouse::{QueryReaders, QueryScope};
let database = database?;
let writer = Connection::writer(&database.url)?;