Skip to content

[BUG] Cloud API returns default_project: null in ProjectList, breaking all CLI project commands #644

@ryanstraight

Description

@ryanstraight

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

  1. Have cloud mode enabled with a default project configured
  2. Run bm project list or bm project bisync --name <project>
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions