GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||
GeezerVison is showing docs.braintrust.dev — Migrate bt - Braintrust This page describes steps to follow when upgrading bt across versions with breaking changes.
Command syntaxHow you invokebt depends on how it is installed:
bt. Substitute the project-local invocation above when applicable.
Before you update1 Check the installed version of bt 2 Record authentication and context Complete this step only if your installed version is older than v0.16.0. Otherwise, continue to Update bt.
Update btUpdatebt using the method that matches how you installed it, then check the installed version:
Run these commands: bt update, run this command instead:If braintrust is installed in a project, run these commands from that project:braintrust globally, update the global package instead:The braintrust package pins a specific version of bt, which can lag behind standalone releases. If the package does not yet include the bt release whose migration steps you need, use the standalone installer.If braintrust is installed in a project, run these commands from that project:braintrust globally, update the global package instead:The braintrust package pins a specific version of bt, which can lag behind standalone releases. If the package does not yet include the bt release whose migration steps you need, use the standalone installer.Update bt, then verify the installed version:For a standalone Windows installation running bt v0.17.0 or later, run:bt update did not work on Windows in those versions.Version-specific migrationsOnly releases with migration steps appear below. Complete each applicable section newer than the version you recorded before updating, through the version you installed, in ascending version order.v0.16.0For the full list of changes, see the v0.16.0 changelog entry.
1 Verify authentication Verify each credential source you plan to keep using:
2 Repair authentication if needed Repair each credential source you plan to keep using that could not authenticate. If multiple saved profiles need repair, repeat the applicable commands for each profile.
If BRAINTRUST_API_KEY is missing or invalid, replace it with a valid Braintrust API key in the environment where you run bt.For a BYOC deployment, also set BRAINTRUST_API_URL and BRAINTRUST_APP_URL in the environment where you run bt.If the profile reports token expired, refresh it:credential missing, log in again:For a BYOC deployment, add its --api-url and --app-url to the login command.If the profile reports credential missing or invalid API key, log in again:For a BYOC deployment, add its --api-url and --app-url to the login command.3 Choose credentials, organization, and project Choose the credentials, organization, and project that bt should use for subsequent commands.To save your selection globally, use bt switch --global as shown below. For a project-specific selection, use bt switch --local (which writes to the nearest .bt/config.json, which you can create with bt init).
4 Verify the migrated setup Run bt status --all and confirm that the saved profiles, selected profile, organization, and project are correct.5 Update scripts and automation if needed Skip this step if you do not have scripts or saved commands that use bt.
Replace old commands and flags v0.16.0 changes several commands and flags, including replacing the bt auth command group with top-level commands. Update existing scripts as follows:
Specify credentials, organization, and project Starting in v0.16.0, a saved profile no longer provides an organization. Update affected scripts based on how they authenticate:
--project <PROJECT>.6 Identify coding-agent migrations If you have an older tracing setup for Claude Code, Codex, OpenCode, or pi, follow its migration guide to preserve your settings when moving to bt-managed tracing. Cursor, Grok, Antigravity, and Muse Code use bt-managed tracing from their first release and do not require this migration.v0.18.0For the full list of changes, see the v0.18.0 changelog entry. --api-key flag. Starting in v0.18.0, this flag is no longer supported. Update affected commands to use one of these authentication methods:
v0.19.0For the full list of changes, see the v0.19.0 changelog entry. 1 Update scripts that run bt login This step applies only if your scripts or CI workflows run bt login with BRAINTRUST_API_KEY set. Other commands can continue using BRAINTRUST_API_KEY without changes.bt login authenticated with an API key supplied through BRAINTRUST_API_KEY, it saved the key as a profile without asking for confirmation. Starting in v0.19.0, it requires confirmation before saving the environment key.After upgrading, choose one of these options for each affected bt login flow:
2 Enable tracing in the configuration file Starting in bt v0.19.0, Claude Code and Codex no longer use TRACE_TO_BRAINTRUST to enable tracing. This applies even if you don’t update the tracing plugin.
3 Refresh existing OpenCode and pi tracing configuration If you use an OpenCode or pi tracing integration configured by a version of bt earlier than v0.19.0, its configuration may contain obsolete top-level destination and authentication fields. These can override settings written by newer versions of bt in the route object.Starting in v0.19.0, bt trace enable removes those obsolete fields and updates the saved tracing settings in the global file. It does not migrate project-local files.Follow the OpenCode migration instructions or pi migration instructions to preserve your settings and migrate both global and project-local files.4 Update affected Codex tracing commands If a script or saved command passes --dangerously-bypass-hook-trust to bt trace run codex, update it before running it with v0.19.0 or higher. Before v0.19.0, bt could forward this option even though it conflicts with the managed hook and can produce duplicate Braintrust hook output. Starting in v0.19.0, bt rejects the combination before launching Codex.Remove --dangerously-bypass-hook-trust from commands launched through bt trace run codex. If the Codex invocation requires that option, run Codex directly instead of through bt trace run.5 Address Claude Code tracing warnings With bt v0.19.0 or higher, bt trace enable claude warns if Claude’s settings.json contains obsolete Braintrust tracing environment variables, but it does not remove them.Follow the Claude Code plugin migration to preserve your tracing destination and remove obsolete settings after verifying tracing.v0.19.2For the full list of changes, see the v0.19.2 changelog entry. bt sync pull used a three-day time window when --window and BT_SYNC_WINDOW were omitted. Starting in v0.19.2, project log pulls retain that default, but experiment and dataset pulls are unbounded.
1 Review experiment and dataset pull commands Find scripts and saved commands that use bt sync pull with an experiment or dataset object reference and do not set --window or BT_SYNC_WINDOW.2 Choose a time window To preserve the previous behavior, add --window 3d to each affected command or set BT_SYNC_WINDOW=3d in its environment. Leave the window unset only when you intend to pull all matching history.For example:v0.19.3For the full list of changes, see the v0.19.3 changelog entry. bt trace enable opencode and bt trace enable pi install v2 of their tracing integrations instead of v1. Updating bt alone does not update an installed plugin or extension.
For an existing v1 installation, follow the OpenCode migration instructions or pi migration instructions before updating the integration. The guides explain how to preserve settings that v1 read from environment variables and how to migrate global and project-local configuration files.
For routine updates after completing the applicable migrations, use bt trace update to preserve your tracing settings.
v0.20.0For the full list of changes, see the v0.20.0 changelog entry. bt topics config enable and bt topics config set accepted a --relabel-overlap flag. Starting in v0.20.0, passing --relabel-overlap produces an error.
Remove --relabel-overlap from any scripts or saved commands that pass it to bt topics config enable or bt topics config set.
v0.26.0For the full list of changes, see the v0.26.0 changelog entry. bt reads its command-specific environment variables with the BRAINTRUST_ prefix instead of BT_, matching the Braintrust SDKs. For example, BT_EVAL_WATCH is now BRAINTRUST_EVAL_WATCH, and BT_FUNCTIONS_PUSH_IF_EXISTS is now BRAINTRUST_FUNCTIONS_PUSH_IF_EXISTS.
The earlier BT_ names still work as deprecated aliases, so no immediate change is required. If both names are set, bt uses the BRAINTRUST_ value and ignores the BT_ value.
Coding-agent tracing follows the same rule. For example, BT_DAEMON_CONFIG is now BRAINTRUST_DAEMON_CONFIG.
To update, replace the BT_ prefix with BRAINTRUST_ for these variables in your shell profiles, .env files, and CI/CD settings. Run bt <command> --help to see the variable names a command reads. Don’t rename BT_BINARY_PATH or BT_SKIP_DOWNLOAD. The bt launcher in the braintrust npm package reads them, and they keep the BT_ prefix.
v0.33.0For the full list of changes, see the v0.33.0 changelog entry. bt trace disable uninstalled a coding agent’s tracing integration and deleted its tracing configuration. Starting in v0.33.0, it pauses tracing and keeps both, and bt trace uninstall removes them.
If a script or saved command runs bt trace disable <coding-agent> to remove tracing, change it to bt trace uninstall <coding-agent>. To pause tracing without removing the integration, keep bt trace disable and run bt trace enable <coding-agent> to resume.
TroubleshootingStart by inspecting the saved profiles and selected context:
Fix authentication or context If the output is not what you expect, check the following:
Inspect configuration files If the environment variables are correct, inspect the following locations:
On macOS and Linux, XDG_CONFIG_HOME is an optional environment variable that changes where applications store configuration files. If it is set, bt uses $XDG_CONFIG_HOME/bt/ instead of ~/.config/bt/.Next steps
Was this page helpful? | |||||||||||||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |