Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
48a2a79
fix(tui): scope Kimi Code sampling strip to the route, not the roster
asto18089 Nov 4, 2026
14b7ac1
docs(tui): annotate Moonshot schema notes with their 2026-11-04 status
asto18089 Nov 4, 2026
f6b7eee
test(tui): ship the pptx per-layout union through Moonshot validation
asto18089 Nov 4, 2026
b91296c
fix(tui): cover the overseas Kimi Code host in the sampling strip
asto18089 Nov 4, 2026
ebef934
fix(tui): pass Moonshot root unions of object branches through
asto18089 Nov 4, 2026
dc6a1c3
fix(tui): admit probe-verified keywords on the exact Kimi Code route
asto18089 Nov 4, 2026
959ff20
fix(tui): flatten Moonshot root unions again per the object-root rule
asto18089 Nov 4, 2026
c18938d
fix(tui): hold the Moonshot tool schema to the MFJS documented set
asto18089 Nov 4, 2026
faf5a8c
docs(tui): pin the Moonshot schema policy to the published documents
asto18089 Nov 4, 2026
c24f8b0
fix(tui): drop the dead composition walk from the MFJS depth checker
asto18089 Nov 4, 2026
2ef8dff
fix(tui): carry the MFJS default keyword verbatim on any node
asto18089 Nov 5, 2026
ef53ea2
fix(tui): align the MFJS resource budgets with the walle validator de…
asto18089 Nov 5, 2026
1c7737a
fix(tui): land every scalar const through the same scalar-enum shape
asto18089 Nov 5, 2026
aec831d
docs(tui): state the Moonshot strip/fail-closed policy where it is im…
asto18089 Nov 5, 2026
67ec543
fix(client): prefix digit-led Moonshot tool names to the documented p…
asto18089 Nov 5, 2026
8e2882e
test(tui): re-export the pptx fixture from the current parent server
asto18089 Nov 5, 2026
5f5eca3
fix(client): close the Moonshot digit-led tool-name loop
asto18089 Nov 5, 2026
6d37a52
fix(tools): keep empty MFJS enums fail-closed and disclose dropped gr…
asto18089 Nov 5, 2026
c4b9589
docs(client): correct the probe-era route-whitelist comments
asto18089 Nov 5, 2026
bed7891
style: rustfmt the digit-led loop and budget probes
asto18089 Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 36 additions & 13 deletions crates/tui/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6105,9 +6105,10 @@ mod tests {
membership.get("max_completion_tokens").is_none(),
"{membership}"
);
// Kimi Code's documented membership models own their sampling
// behavior: the exact first-party membership route strips generic
// controls (apply_kimi_code_fixed_sampling).
// Kimi Code's membership endpoint owns the sampling behavior of
// every model it serves: the exact first-party route strips
// generic controls regardless of model id
// (apply_kimi_code_fixed_sampling).
assert!(membership.get("temperature").is_none(), "{membership}");
assert!(membership.get("top_p").is_none(), "{membership}");
}
Expand Down Expand Up @@ -6459,7 +6460,17 @@ mod tests {

#[tokio::test]
async fn kimi_code_compaction_shape_omits_sampling_parameters_on_wire() {
for model in crate::config::KIMI_CODE_MEMBERSHIP_MODELS {
// The strip is route-scoped, not roster-scoped: the 2026-11-04 live
// probe showed every id served by this endpoint (GET /models) rejects
// any sampling value other than temperature=1 / top_p=0.95 with a
// 400, so the two `k3.1-pro` spellings the roster does not list yet
// must be stripped the same way.
let models: Vec<&str> = crate::config::KIMI_CODE_MEMBERSHIP_MODELS
.iter()
.copied()
.chain(["k3.1-pro", "k3.1-pro-highspeed"])
.collect();
for model in models {
let mut request = k3_request_fixture(model, None, /*stream*/ false);
request.temperature = Some(0.3);
request.top_p = Some(0.8);
Expand Down Expand Up @@ -6589,11 +6600,15 @@ mod tests {
k3_request_fixture(crate::config::KIMI_CODE_K3_MODEL, Some("low"), streaming);
let good = test_tool("compatible_lookup");
let mut bad = test_tool("mcp_pattern_tool");
// One MFJS whitelist serves every Moonshot route: any unlisted
// keyword fails closed on all of them (see
// `probe_observed_keywords_fail_closed_on_every_route`), so
// `patternProperties` is simply one unlisted keyword used as the
// incompatible shape here — no route admits `pattern` either.
bad.input_schema = json!({
"type": "object",
"properties": {
"query": {"type": "string", "pattern": "^private-regex-7701$"}
}
"properties": {"query": {"type": "string"}},
"patternProperties": {"^private-regex-7701$": {"type": "string"}}
});
request.tools = Some(vec![good, bad]);
request.tool_choice = Some(json!("auto"));
Expand Down Expand Up @@ -6687,11 +6702,15 @@ mod tests {
k3_request_fixture(crate::config::KIMI_CODE_K3_MODEL, Some("low"), streaming);
let good = test_tool("compatible_lookup");
let mut bad = test_tool("mcp_pattern_tool");
// One MFJS whitelist serves every Moonshot route: any unlisted
// keyword fails closed on all of them (see
// `probe_observed_keywords_fail_closed_on_every_route`), so
// `patternProperties` is simply one unlisted keyword used as the
// incompatible shape here — no route admits `pattern` either.
bad.input_schema = json!({
"type": "object",
"properties": {
"query": {"type": "string", "pattern": "^private-regex-8801$"}
}
"properties": {"query": {"type": "string"}},
"patternProperties": {"^private-regex-8801$": {"type": "string"}}
});
request.tools = Some(vec![good, bad]);
request.tool_choice = Some(json!({
Expand Down Expand Up @@ -6755,11 +6774,15 @@ mod tests {
let mut request = k3_request_fixture(crate::config::KIMI_CODE_K3_MODEL, Some("low"), true);
let good = test_tool("compatible_lookup");
let mut bad = test_tool("mcp_pattern_tool");
// One MFJS whitelist serves every Moonshot route: any unlisted
// keyword fails closed on all of them (see
// `probe_observed_keywords_fail_closed_on_every_route`), so
// `patternProperties` is simply one unlisted keyword used as the
// incompatible shape here — no route admits `pattern` either.
bad.input_schema = json!({
"type": "object",
"properties": {
"query": {"type": "string", "pattern": "^private-regex-9901$"}
}
"properties": {"query": {"type": "string"}},
"patternProperties": {"^private-regex-9901$": {"type": "string"}}
});
request.tools = Some(vec![good, bad]);
request.tool_choice = Some(json!("auto"));
Expand Down
Loading
Loading