Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/goose-cli/src/commands/configure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,7 @@ fn add_provider() -> anyhow::Result<()> {
requires_auth,
catalog_provider_id: None,
base_path,
preserves_thinking: None,
})?;

cliclack::outro(format!("Custom provider added: {}", display_name))?;
Expand Down
3 changes: 3 additions & 0 deletions crates/goose-sdk/src/custom_requests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ pub struct CustomProviderConfigDto {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub api_key_env: Option<String>,
pub api_key_set: bool,
pub preserves_thinking: bool,
}

#[derive(Debug, Default, Clone, Serialize, Deserialize, JsonSchema)]
Expand All @@ -725,6 +726,8 @@ pub struct CustomProviderUpsertDto {
pub catalog_provider_id: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub base_path: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub preserves_thinking: Option<bool>,
}

/// Create a custom provider backed by Goose's declarative provider store.
Expand Down
4 changes: 4 additions & 0 deletions crates/goose-server/src/routes/config_management.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ pub struct UpdateCustomProviderRequest {
pub catalog_provider_id: Option<String>,
#[serde(default)]
pub base_path: Option<String>,
#[serde(default)]
pub preserves_thinking: Option<bool>,
}

fn default_requires_auth() -> bool {
Expand Down Expand Up @@ -595,6 +597,7 @@ pub async fn create_custom_provider(
requires_auth: request.requires_auth,
catalog_provider_id: request.catalog_provider_id,
base_path: request.base_path,
preserves_thinking: request.preserves_thinking,
},
)?;

Expand Down Expand Up @@ -687,6 +690,7 @@ pub async fn update_custom_provider(
requires_auth: request.requires_auth,
catalog_provider_id: request.catalog_provider_id,
base_path: request.base_path,
preserves_thinking: request.preserves_thinking,
},
)?;

Expand Down
18 changes: 17 additions & 1 deletion crates/goose/acp-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,12 @@
"string",
"null"
]
},
"preservesThinking": {
"type": [
"boolean",
"null"
]
}
},
"required": [
Expand Down Expand Up @@ -1111,6 +1117,9 @@
},
"apiKeySet": {
"type": "boolean"
},
"preservesThinking": {
"type": "boolean"
}
},
"required": [
Expand All @@ -1119,7 +1128,8 @@
"displayName",
"apiUrl",
"requiresAuth",
"apiKeySet"
"apiKeySet",
"preservesThinking"
]
},
"CustomProviderUpdateRequest": {
Expand Down Expand Up @@ -1177,6 +1187,12 @@
"string",
"null"
]
},
"preservesThinking": {
"type": [
"boolean",
"null"
]
}
},
"required": [
Expand Down
3 changes: 3 additions & 0 deletions crates/goose/src/acp/server/providers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ fn custom_provider_config_to_dto(
base_path: config.base_path.clone(),
api_key_env,
api_key_set,
preserves_thinking: config.preserves_thinking,
}
}

Expand Down Expand Up @@ -513,6 +514,7 @@ impl GooseAcpAgent {
requires_auth: provider.requires_auth,
catalog_provider_id: provider.catalog_provider_id,
base_path: provider.base_path,
preserves_thinking: provider.preserves_thinking,
},
)
.internal_err_ctx("Failed to create custom provider")?;
Expand Down Expand Up @@ -581,6 +583,7 @@ impl GooseAcpAgent {
requires_auth: provider.requires_auth,
catalog_provider_id: provider.catalog_provider_id,
base_path: provider.base_path,
preserves_thinking: provider.preserves_thinking,
},
)
.internal_err_ctx("Failed to update custom provider")?;
Expand Down
Loading
Loading