MCPcopy Create free account
hub / github.com/LeenHawk/sgproxy / strips_all_sampling_when_model_missing

Function strips_all_sampling_when_model_missing

src/proxy.rs:1382–1395  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1380
1381 #[test]
1382 fn strips_all_sampling_when_model_missing() {
1383 let mut body = json!({
1384 "temperature": 0.7,
1385 "top_p": 0.9,
1386 "top_k": 40,
1387 "messages": []
1388 });
1389
1390 normalize_claudecode_sampling(&mut body);
1391
1392 assert!(body.get("temperature").is_none());
1393 assert!(body.get("top_p").is_none());
1394 assert!(body.get("top_k").is_none());
1395 }
1396
1397 #[test]
1398 fn keeps_top_k_for_tolerant_model() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected