Skip to content

Bug: Cannot read properties of null (reading 'length') when using BYOK #3911

Description

@doggy8088

Describe the bug

When using BYOK (Bring Your Own Key) in the Copilot CLI, I encounter the following error: Cannot read properties of null (reading 'length').

Image

Affected version

GitHub Copilot CLI 1.0.64.

Steps to reproduce the behavior

  1. Open Copilot CLI with the following command:

    COPILOT_PROVIDER_TYPE=openai COPILOT_PROVIDER_WIRE_API=completions COPILOT_PROVIDER_BASE_URL=https://api.mistral.ai/v1 COPILOT_PROVIDER_API_KEY=$MISTRAL_API_KEY COPILOT_MODEL=mistral-medium-latest COPILOT_PROVIDER_MAX_PROMPT_TOKENS=262144 COPILOT_PROVIDER_MAX_OUTPUT_TOKENS=262144 copilot --yolo --log-level all --log-dir logs/

  2. Send prompt

    hi
    

Expected behavior

No error

Additional context

process-1782304659429-43157.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationConfig files, instruction files, settings, and environment variablesarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions