|
@@ -79,6 +79,14 @@ pub fn generate_cluster_json(recipe: &Recipe, world_size: usize) -> Result<Strin
|
|
|
serde_json::Value::from(http_port(recipe) as i64),
|
|
serde_json::Value::from(http_port(recipe) as i64),
|
|
|
);
|
|
);
|
|
|
root.insert("http".into(), serde_json::Value::Object(http));
|
|
root.insert("http".into(), serde_json::Value::Object(http));
|
|
|
|
|
+ // `paths` always present (DGPP examples carry it); resident_cache empty =
|
|
|
|
|
+ // DGPP default.
|
|
|
|
|
+ let mut paths = serde_json::Map::new();
|
|
|
|
|
+ paths.insert(
|
|
|
|
|
+ "resident_cache".into(),
|
|
|
|
|
+ serde_json::Value::String(d.resident_cache.clone().unwrap_or_default()),
|
|
|
|
|
+ );
|
|
|
|
|
+ root.insert("paths".into(), serde_json::Value::Object(paths));
|
|
|
Ok(serde_json::to_string_pretty(&serde_json::Value::Object(
|
|
Ok(serde_json::to_string_pretty(&serde_json::Value::Object(
|
|
|
root,
|
|
root,
|
|
|
))?)
|
|
))?)
|
|
@@ -288,6 +296,7 @@ mod tests {
|
|
|
assert_eq!(json["engine"]["dflash_model"], "z-lab/Qwen3.8-27B-DFlash2");
|
|
assert_eq!(json["engine"]["dflash_model"], "z-lab/Qwen3.8-27B-DFlash2");
|
|
|
assert_eq!(json["http"]["port"], 18080);
|
|
assert_eq!(json["http"]["port"], 18080);
|
|
|
assert_eq!(json["http"]["bind_host"], "0.0.0.0");
|
|
assert_eq!(json["http"]["bind_host"], "0.0.0.0");
|
|
|
|
|
+ assert_eq!(json["paths"]["resident_cache"], "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
#[test]
|