Skip to content
Open
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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# btw (development version)

* The documentation and the `btw_client()` error message now use `claude-sonnet-5-5` in their examples, instead of `claude-sonnet-4` and `claude-sonnet-4-20250514`, which Anthropic has retired.

* `path_find_in_project()` now stops its upward search when it reaches the home directory (either `fs::path_home()` or `fs::path_home_r()`, which differ on Windows) and never treats files there as project files, so `~/AGENTS.md` or `~/CLAUDE.md` are no longer picked up as project context when the working directory is under `~` but outside a project. Home-level files are handled only by the user-level lookup. This also fixes `~/btw.md` instructions being included twice — once as the project file and once as the user-level config (#225).

* `btw_client(path_btw = ...)` no longer duplicates instructions when `path_btw` is set explicitly to the same file as the user-level `btw.md` (#225).
Expand Down
6 changes: 3 additions & 3 deletions R/btw_client.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#' **Array format** (unnamed list):
#' ```yaml
#' client:
#' - anthropic/claude-sonnet-4
#' - anthropic/claude-sonnet-5-5
#' - openai/gpt-4.1
#' - aws_bedrock/us.anthropic.claude-sonnet-4-20250514-v1:0
#' ```
Expand Down Expand Up @@ -302,8 +302,8 @@ as_ellmer_client <- function(client) {

cli::cli_abort(c(
"{.arg client} must be an {.help ellmer::Chat} client, a {.val provider/model} string, or a list with {.field provider} (and optionally {.field model}).",
"i" = "Examples: {.or {.val {c('openai/gpt-4.1-mini', 'anthropic/claude-sonnet-4-20250514')}}}.",
"i" = "Or as a list: {.code list(provider = 'anthropic', model = 'claude-sonnet-4-20250514')}"
"i" = "Examples: {.or {.val {c('openai/gpt-4.1-mini', 'anthropic/claude-sonnet-5-5')}}}.",
"i" = "Or as a list: {.code list(provider = 'anthropic', model = 'claude-sonnet-5-5')}"
))
}

Expand Down
2 changes: 1 addition & 1 deletion R/btw_task.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#' ---
#' client:
#' provider: anthropic
#' model: claude-sonnet-4
#' model: claude-sonnet-5-5
#' tools: [docs, files]
#' ---
#'
Expand Down
4 changes: 2 additions & 2 deletions R/tool-agent-custom.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ NULL
#' * `title`: User-facing title for the tool. Defaults to title-cased name.
#' * `icon`: Icon specification for the agent (see **Icon Specification**
#' below). Defaults to the standard agent icon.
#' * `client`: Model specification like `"anthropic/claude-sonnet-4-20250514"`.
#' * `client`: Model specification like `"anthropic/claude-sonnet-5-5"`.
#' Falls back to `btw.subagent.client` or `btw.client` options.
#' * `tools`: List of tool names or groups available to this agent. Defaults to
#' all non-agent tools.
Expand Down Expand Up @@ -113,7 +113,7 @@ NULL
#' @param path Path to an agent markdown file.
#' @param client Optional. A client specification to override the agent's
#' configured client. Can be a string like
#' `"anthropic/claude-sonnet-4-20250514"`, an [ellmer::Chat] object, or a list
#' `"anthropic/claude-sonnet-5-5"`, an [ellmer::Chat] object, or a list
#' with `provider` and `model` keys. If `NULL` (default), uses the `client`
#' field from the agent file or falls back to btw's default client resolution.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/tool-agent-subagent.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ BtwSubagentResult <- S7::new_class(
#' # Configure the client and default tools for subagents
#' withr::with_options(
#' list(
#' btw.subagent.client = "anthropic/claude-sonnet-4-20250514",
#' btw.subagent.client = "anthropic/claude-sonnet-5-5",
#' btw.subagent.tools_default = "files"
#' ),
#' {
Expand Down
4 changes: 2 additions & 2 deletions man/btw_agent_tool.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/btw_client.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/btw_task.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/btw_tool_agent_subagent.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.