use the consistent defautl_enabled

This commit is contained in:
Channing Conger
2026-03-10 18:11:21 -07:00
parent 25d66bf52d
commit d8e79b65cb
2 changed files with 3 additions and 7 deletions

View File

@@ -509,7 +509,7 @@ pub struct DynamicToolSpec {
pub name: String,
pub description: String,
pub input_schema: JsonValue,
#[serde(default = "default_dynamic_tool_inject_into_context")]
#[serde(default = "default_enabled")]
pub inject_into_context: bool,
}
@@ -548,10 +548,6 @@ pub struct ToolProviderUnregisterParams {
#[ts(export_to = "v2/")]
pub struct ToolProviderUnregisterResponse {}
fn default_dynamic_tool_inject_into_context() -> bool {
true
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)]
#[serde(rename_all = "snake_case")]
#[ts(export_to = "v2/")]

View File

@@ -10,7 +10,7 @@ pub struct DynamicToolSpec {
pub name: String,
pub description: String,
pub input_schema: JsonValue,
#[serde(default = "default_inject_into_context")]
#[serde(default = "default_enabled")]
pub inject_into_context: bool,
#[serde(default)]
pub provider_owned: bool,
@@ -45,6 +45,6 @@ pub enum DynamicToolCallOutputContentItem {
InputImage { image_url: String },
}
fn default_inject_into_context() -> bool {
fn default_enabled() -> bool {
true
}