Use project IDs to prevent duplicate projects after rename
Applies to:
Plan -
Deployment -
SummaryWhen a project is renamed, SDK code that references the old project name will automatically create a new duplicate project. To prevent this, use stable project_id parameters instead of project names in SDK initialization and environment variables.
Replace project name parameters with project ID parameters in your SDK initialization code.Python SDK:
# Before (using name - creates duplicate after rename)braintrust.init(project="my-project-name")# After (using ID - stable across renames)braintrust.init(project_id="proj_abc123xyz")
TypeScript SDK:
// Before (using name - creates duplicate after rename)braintrust.init({ project: "my-project-name" });// After (using ID - stable across renames)braintrust.init({ projectId: "proj_abc123xyz" });