Skip to content

CLI fails with Zod validation error: organization_list[0].name is null #1266

@rtkelly13

Description

@rtkelly13

Describe the bug

CLI fails with Zod validation error because the API returns null for an organization name. This blocks all CLI and Python SDK usage.

Log output:

[ERROR] Error fetching copilot user: [
  {
    "code": "invalid_type",
    "expected": "string",
    "received": "null",
    "path": ["organization_list", 0, "name"],
    "message": "Expected string, received null"
  }
]
[ERROR] Error loading models: Error: Failed to list models: 403

Key point: The Copilot API works directly (verified with curl), so this is a CLI schema validation issue, not an auth problem.

Affected version

0.0.400 (also affects Python SDK 0.1.18)

Steps to reproduce the behavior

copilot -p "Say hello" --model gpt-4.1 --allow-all
# Exit code 1, no output

Expected behavior

CLI should handle null organization names gracefully instead of failing validation.

Additional context

  • macOS 15.7.3, Node v22.17.0
  • Copilot Business via org, seat is active
  • curl https://api.business.githubcopilot.com/models returns 25 models successfully
  • Recently left an organization (EpicGames) which may have left stale data

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions