Skip to content

Commit 9e29621

Browse files
authored
postprocess: switch from gemini-3-pro-preview to gemini-3-flash-preview for the default (#1535)
`flash` is cheaper and faster and seems to still be sufficiently capable. ~~I did have to adjust the prompt slightly to explicitly say to include the surrounding Rust Markdown code block. This isn't actually used right now, but it is in #1534, so it seems worth preserving.~~ Edit: The prompt is kept the same now.
2 parents 65ca2b9 + 4f84c61 commit 9e29621

File tree

4 files changed

+6
-10
lines changed
  • c2rust-postprocess

4 files changed

+6
-10
lines changed

c2rust-postprocess/postprocess/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def build_arg_parser() -> argparse.ArgumentParser:
5252
"--model-id",
5353
type=str,
5454
required=False,
55-
default="gemini-3-pro-preview",
55+
default="gemini-3-flash-preview",
5656
help="ID of the LLM model to use (default: gemini-3-pro-preview)",
5757
)
5858

c2rust-postprocess/tests/llm-cache/CommentTransfer/partition/bf27c23abbb2f5c2d7dba1891b748252983959f5dc232f35146250b6d2d1fb29/metadata.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
transform = "CommentTransfer"
22
identifier = "partition"
3-
model = "gemini-3-pro-preview"
4-
response = """```rust
5-
/// Lomuto Partition Scheme:
3+
model = "gemini-3-flash-preview"
4+
response = """/// Lomuto Partition Scheme:
65
/// Partitions the array so that elements < pivot are on the left,
76
/// and elements >= pivot are on the right.
87
#[no_mangle]
@@ -32,8 +31,7 @@ pub unsafe extern "C" fn partition(
3231
arr.offset(high as isize) as *mut ::core::ffi::c_int,
3332
);
3433
return i + 1 as ::core::ffi::c_int;
35-
}
36-
```"""
34+
}"""
3735

3836
[[messages]]
3937
role = "user"

c2rust-postprocess/tests/llm-cache/CommentTransfer/partition/bf27c23abbb2f5c2d7dba1891b748252983959f5dc232f35146250b6d2d1fb29/response.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
```rust
21
/// Lomuto Partition Scheme:
32
/// Partitions the array so that elements < pivot are on the left,
43
/// and elements >= pivot are on the right.
@@ -29,5 +28,4 @@ pub unsafe extern "C" fn partition(
2928
arr.offset(high as isize) as *mut ::core::ffi::c_int,
3029
);
3130
return i + 1 as ::core::ffi::c_int;
32-
}
33-
```
31+
}

c2rust-postprocess/tests/llm-cache/CommentTransfer/quickSort/d124abd1fe6752700e122e17288aac1b78606f3ffefcb6dc2c59e103933d1411/metadata.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
transform = "CommentTransfer"
22
identifier = "quickSort"
3-
model = "gemini-3-pro-preview"
3+
model = "gemini-3-flash-preview"
44
response = """```rust
55
#[no_mangle]
66
pub unsafe extern "C" fn quickSort(

0 commit comments

Comments
 (0)