diff --git a/crates/llm_gateway/tests/integration.rs b/crates/llm_gateway/tests/integration.rs index a681a7c7..ea65bfa0 100644 --- a/crates/llm_gateway/tests/integration.rs +++ b/crates/llm_gateway/tests/integration.rs @@ -75,8 +75,7 @@ fn setup_filter(module: &mut Tester, config: &str) -> i32 { .expect_metric_creation(MetricType::Gauge, "active_http_calls") .expect_metric_creation(MetricType::Counter, "ratelimited_rq") .expect_metric_creation(MetricType::Histogram, "time_to_first_token") - .expect_metric_creation(MetricType::Histogram, "time_per_output_token") - .expect_metric_creation(MetricType::Histogram, "latency") + .expect_metric_creation(MetricType::Histogram, "request_latency") .expect_metric_creation(MetricType::Histogram, "output_sequence_length") .expect_metric_creation(MetricType::Histogram, "input_sequence_length") .execute_and_expect(ReturnType::None) @@ -216,8 +215,7 @@ fn llm_gateway_successful_request_to_open_ai_chat_completions() { .returning(Some(chat_completions_request_body)) .expect_log(Some(LogLevel::Trace), None) .expect_log(Some(LogLevel::Debug), None) - .expect_metric_record("input_sequence_length", 49) - .expect_log(Some(LogLevel::Debug), None) + .expect_metric_record("input_sequence_length", 21) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None) @@ -321,7 +319,7 @@ fn llm_gateway_request_ratelimited() { },\ {\ \"role\": \"user\",\ - \"content\": \"Compose a poem that explains the concept of recursion in programming. Compose a poem that explains the concept of recursion in programming. Compose a poem that explains the concept of recursion in programming. And also summarize it how a 4th graded would understand it.\"\ + \"content\": \"Compose a poem that explains the concept of recursion in programming. Compose a poem that explains the concept of recursion in programming. Compose a poem that explains the concept of recursion in programming. And also summarize it how a 4th graded would understand it. Compose a poem that explains the concept of recursion in programming. And also summarize it how a 4th graded would understand it.\"\ }\ ],\ \"model\": \"gpt-4\"\ @@ -338,8 +336,7 @@ fn llm_gateway_request_ratelimited() { // The actual call is not important in this test, we just need to grab the token_id .expect_log(Some(LogLevel::Trace), None) .expect_log(Some(LogLevel::Debug), None) - .expect_metric_record("input_sequence_length", 108) - .expect_log(Some(LogLevel::Debug), None) + .expect_metric_record("input_sequence_length", 107) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None) @@ -405,8 +402,7 @@ fn llm_gateway_request_not_ratelimited() { // The actual call is not important in this test, we just need to grab the token_id .expect_log(Some(LogLevel::Trace), None) .expect_log(Some(LogLevel::Debug), None) - .expect_metric_record("input_sequence_length", 57) - .expect_log(Some(LogLevel::Debug), None) + .expect_metric_record("input_sequence_length", 29) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None) .expect_log(Some(LogLevel::Debug), None)