ProjectList validation error: default_project is null in cloud API response
Description
bm project bisync --name foo (and bm project list) fails with:
Error: 1 validation error for ProjectList
default_project
Input should be a valid string
For further information visit https://errors.pydantic.dev/2.12/v/string_type
Root Cause
The cloud API endpoint GET /proxy/v2/projects/ returns "default_project": null even when a project has "is_default": true:
{
"projects": [
{"name": "main", "is_default": false, ...},
{"name": "foo", "is_default": true, ...}
],
"default_project": null
}
The ProjectList schema in basic_memory/schemas/project_info.py defines default_project: str (non-optional, no default), so Pydantic validation fails on the null value.
Expected Behavior
default_project should be populated from the project marked is_default: true (i.e., "default_project": "foo"), or the schema should handle null gracefully.
Environment
- Client version: 0.18.5 (pip), CLI binary reports 0.17.9 (stale
.local/bin/bm.exe, but same error from both)
- Cloud mode: enabled
- OS: Windows 11
- Python: 3.13
Steps to Reproduce
- Have cloud mode enabled with a default project configured
- Run
bm project list or bm project bisync --name <project>
- CLI calls
GET /proxy/v2/projects/, receives default_project: null, Pydantic rejects it
Workaround
None found. All CLI commands that call the projects endpoint are broken.
ProjectListvalidation error:default_projectisnullin cloud API responseDescription
bm project bisync --name foo(andbm project list) fails with:Root Cause
The cloud API endpoint
GET /proxy/v2/projects/returns"default_project": nulleven when a project has"is_default": true:{ "projects": [ {"name": "main", "is_default": false, ...}, {"name": "foo", "is_default": true, ...} ], "default_project": null }The
ProjectListschema inbasic_memory/schemas/project_info.pydefinesdefault_project: str(non-optional, no default), so Pydantic validation fails on thenullvalue.Expected Behavior
default_projectshould be populated from the project markedis_default: true(i.e.,"default_project": "foo"), or the schema should handlenullgracefully.Environment
.local/bin/bm.exe, but same error from both)Steps to Reproduce
bm project listorbm project bisync --name <project>GET /proxy/v2/projects/, receivesdefault_project: null, Pydantic rejects itWorkaround
None found. All CLI commands that call the projects endpoint are broken.