Skip to content

Conversation

@kkysen
Copy link
Contributor

@kkysen kkysen commented Jan 5, 2026

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.

…eview` for the default

`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 is in #1534, so it seems worth preserving.
@kkysen kkysen requested a review from thedataking January 5, 2026 23:55
Copy link
Contributor

@thedataking thedataking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should require the markdown code blocks.

Sometimes you get them, sometimes you don't (even for same model), so the way to round-trip less is to just remove them when they're present rather than forcing the model to potentially re-do its work when they're not present.

Copy link
Contributor Author

@kkysen kkysen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should require the markdown code blocks.

Sometimes you get them, sometimes you don't (even for same model), so the way to round-trip less is to just remove them when they're present rather than forcing the model to potentially re-do its work when they're not present.

I was always getting them with gemini-3-pro-preview, including on all of json-c, although not with gemini-3-flash-preview anymore. But with the direction to include it, it seems to always do it now. The remove_backticks logic isn't changed in this PR, though. But my thinking in general is that if we want the LLM to ever respond with anything else (which I found super useful in asking it why certain comments were omitted or emitted in certain weird ways), we need a way to distinguish that extra commentary/reasoning from the Rust code, and the Markdown code block seems like the perfect way to do that.

To keep our code more model-agnostic,
don't ask for or enforce that the Rust code be in a Rust Markdown code block.
Weaker models sometimes don't do this consistently,
and we don't want extra LLM queries just to fix backticks.
@kkysen kkysen requested a review from thedataking January 6, 2026 03:16
@kkysen kkysen merged commit 9e29621 into master Jan 6, 2026
6 checks passed
@kkysen kkysen deleted the kkysen/postprocess-switch-to-gemini-3-flash-preview branch January 6, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants