[CI] GSM8K eval integration test for KV offloading (#46893)

Signed-off-by: Tyler Michael Smith <tyler@tylermsmith.com>
Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Signed-off-by: Itay Etelis <itay.etelis@ibm.com>
Signed-off-by: Itay Etelis <92247226+Etelis@users.noreply.github.com>
Signed-off-by: Or Ozeri <oro@il.ibm.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Itay Etelis <92247226+Etelis@users.noreply.github.com>
Co-authored-by: Itay Etelis <itay.etelis@ibm.com>
Co-authored-by: Or Ozeri <oro@il.ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Tyler Michael Smith
2026-07-08 17:59:48 -04:00
committed by GitHub
co-authored by Claude Opus 4.6 Itay Etelis Itay Etelis Or Ozeri mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 0d2f4e7c9c
commit dcdd756d75
5 changed files with 330 additions and 10 deletions
+10 -4
View File
@@ -1,8 +1,9 @@
use std::sync::Arc;
use axum::Json;
use axum::extract::{Query, State};
use axum::http::StatusCode;
use serde::Deserialize;
use serde::{Deserialize, Serialize};
use crate::error::ApiError;
use crate::state::AppState;
@@ -16,19 +17,24 @@ pub(crate) struct ResetPrefixCacheParams {
reset_external: bool,
}
#[derive(Debug, Serialize)]
pub(crate) struct ResetPrefixCacheResponse {
success: bool,
}
/// Reset the local prefix cache and optionally the connector-managed external
/// cache.
pub async fn reset_prefix_cache(
State(state): State<Arc<AppState>>,
Query(params): Query<ResetPrefixCacheParams>,
) -> Result<StatusCode, ApiError> {
state
) -> Result<Json<ResetPrefixCacheResponse>, ApiError> {
let success = state
.engine_core_client()
.reset_prefix_cache(params.reset_running_requests, params.reset_external)
.await
.map_err(|error| utility_call_error("reset_prefix_cache", error))?;
Ok(StatusCode::OK)
Ok(Json(ResetPrefixCacheResponse { success }))
}
/// Reset the multi-modal cache.
+4 -1
View File
@@ -4796,7 +4796,10 @@ async fn reset_prefix_cache_route_sends_expected_utility_call() {
let status = response.status();
let body = to_bytes(response.into_body(), usize::MAX).await.expect("read body");
assert_eq!(status, StatusCode::OK, "{}", String::from_utf8_lossy(&body));
assert!(body.is_empty());
assert_eq!(
serde_json::from_slice::<serde_json::Value>(&body).expect("json body"),
json!({"success": true})
);
engine_task.await.expect("mock engine task");
}