Skip to content

Commit 605ade2

Browse files
Merge remote-tracking branch 'upstream/main' into dev
2 parents 557bd05 + cb56dc1 commit 605ade2

8 files changed

Lines changed: 150 additions & 89 deletions

File tree

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
77
- Frameworks: none detected from the supported starter markers.
88

99
## Verification
10-
- Run Rust verification from `rust/`: `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`
10+
- Run Rust verification from repo root: `scripts/fmt.sh --check`; for formatting use `scripts/fmt.sh`. Run Rust clippy/tests from `rust/`: `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`
1111
- `src/` and `tests/` are both present; update both surfaces together when behavior changes.
1212

1313
## Repository shape

rust/CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This file provides guidance to Claw Code (clawcode.dev) when working with code i
77
- Frameworks: none detected from the supported starter markers.
88

99
## Verification
10-
- Run Rust verification from the repo root: `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, `cargo test --workspace`
10+
- From the repository root, run Rust formatting with `scripts/fmt.sh` (or `scripts/fmt.sh --check` for CI-style checks). From this `rust/` directory, the equivalent command is `../scripts/fmt.sh`. Root-level `cargo fmt --manifest-path rust/Cargo.toml` is not the supported formatting command.
11+
- From this `rust/` directory, run Rust verification with `cargo clippy --workspace --all-targets -- -D warnings` and `cargo test --workspace`.
1112

1213
## Working agreement
1314
- Prefer small, reviewable changes and keep generated bootstrap files aligned with actual repo workflows.

rust/crates/api/src/providers/mod.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -756,26 +756,28 @@ mod tests {
756756
#[test]
757757
fn returns_context_window_metadata_for_kimi_models() {
758758
// kimi-k2.5
759-
let k25_limit = model_token_limit("kimi-k2.5")
760-
.expect("kimi-k2.5 should have token limit metadata");
759+
let k25_limit =
760+
model_token_limit("kimi-k2.5").expect("kimi-k2.5 should have token limit metadata");
761761
assert_eq!(k25_limit.max_output_tokens, 16_384);
762762
assert_eq!(k25_limit.context_window_tokens, 256_000);
763763

764764
// kimi-k1.5
765-
let k15_limit = model_token_limit("kimi-k1.5")
766-
.expect("kimi-k1.5 should have token limit metadata");
765+
let k15_limit =
766+
model_token_limit("kimi-k1.5").expect("kimi-k1.5 should have token limit metadata");
767767
assert_eq!(k15_limit.max_output_tokens, 16_384);
768768
assert_eq!(k15_limit.context_window_tokens, 256_000);
769769
}
770770

771771
#[test]
772772
fn kimi_alias_resolves_to_kimi_k25_token_limits() {
773773
// The "kimi" alias resolves to "kimi-k2.5" via resolve_model_alias()
774-
let alias_limit = model_token_limit("kimi")
775-
.expect("kimi alias should resolve to kimi-k2.5 limits");
776-
let direct_limit = model_token_limit("kimi-k2.5")
777-
.expect("kimi-k2.5 should have limits");
778-
assert_eq!(alias_limit.max_output_tokens, direct_limit.max_output_tokens);
774+
let alias_limit =
775+
model_token_limit("kimi").expect("kimi alias should resolve to kimi-k2.5 limits");
776+
let direct_limit = model_token_limit("kimi-k2.5").expect("kimi-k2.5 should have limits");
777+
assert_eq!(
778+
alias_limit.max_output_tokens,
779+
direct_limit.max_output_tokens
780+
);
779781
assert_eq!(
780782
alias_limit.context_window_tokens,
781783
direct_limit.context_window_tokens

rust/crates/api/src/providers/openai_compat.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,9 +2220,16 @@ mod tests {
22202220

22212221
#[test]
22222222
fn provider_specific_size_limits_are_correct() {
2223-
assert_eq!(OpenAiCompatConfig::dashscope().max_request_body_bytes, 6_291_456); // 6MB
2224-
assert_eq!(OpenAiCompatConfig::openai().max_request_body_bytes, 104_857_600); // 100MB
2225-
assert_eq!(OpenAiCompatConfig::xai().max_request_body_bytes, 52_428_800); // 50MB
2223+
assert_eq!(
2224+
OpenAiCompatConfig::dashscope().max_request_body_bytes,
2225+
6_291_456
2226+
); // 6MB
2227+
assert_eq!(
2228+
OpenAiCompatConfig::openai().max_request_body_bytes,
2229+
104_857_600
2230+
); // 100MB
2231+
assert_eq!(OpenAiCompatConfig::xai().max_request_body_bytes, 52_428_800);
2232+
// 50MB
22262233
}
22272234

22282235
#[test]

rust/crates/commands/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2623,10 +2623,8 @@ fn render_mcp_report_json_for(
26232623
// runs, the existing serializer adds `status: "ok"` below.
26242624
match loader.load() {
26252625
Ok(runtime_config) => {
2626-
let mut value = render_mcp_summary_report_json(
2627-
cwd,
2628-
runtime_config.mcp().servers(),
2629-
);
2626+
let mut value =
2627+
render_mcp_summary_report_json(cwd, runtime_config.mcp().servers());
26302628
if let Some(map) = value.as_object_mut() {
26312629
map.insert("status".to_string(), Value::String("ok".to_string()));
26322630
map.insert("config_load_error".to_string(), Value::Null);

0 commit comments

Comments
 (0)