agent: Disable thinking when using inline assistant/edit file tool (#34141)

This introduces a new field `thinking_allowed` on `LanguageModelRequest`
which lets us control whether thinking should be enabled if the model
supports it.
We permit thinking in the Inline Assistant, Edit File tool and the Git
Commit message generator, this should make generation faster when using
a thinking model, e.g. `claude-sonnet-4-thinking`

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-07-09 20:05:39 +02:00 committed by GitHub
parent 96ff6d86a3
commit 41fe2a2ab4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 37 additions and 8 deletions

View file

@ -391,6 +391,7 @@ pub struct LanguageModelRequest {
pub tool_choice: Option<LanguageModelToolChoice>,
pub stop: Vec<String>,
pub temperature: Option<f32>,
pub thinking_allowed: bool,
}
#[derive(Serialize, Deserialize, Debug, Eq, PartialEq)]