github / github/copilot-cli

models.list API omits CLI's configured default model (e.g. claude-sonnet-4.6)

Đang mở
#1,608 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:models
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

Describe the bug

The models.list JSON-RPC method returns a catalog of selectable models, but it does not include the model currently configured as the CLI's default in ~/.copilot/config.json.

For example, after running /model in the CLI and selecting claude-sonnet-4.6, the config stores "model": "claude-sonnet-4.6". However models.list returns only up to claude-sonnet-4.5 — the configured default is absent from the list.

This means any tool built on top of the SDK (e.g. the github-copilot-sdk Python package) that populates a model picker from models.list will not show the user's actual current model.

Steps to reproduce

1. Run /model in the CLI and select claude-sonnet-4.6
2. Call models.list via the SDK: models = await client.list_models()
print([m.id for m in models]) # claude-sonnet-4.6 is absent

Expected behavior

models.list should include every model the CLI can actually use — including the one it is currently configured to use as default.

Additional context

- CLI version: 0.0.414
- SDK version: github-copilot-sdk==0.1.23
- The session.start event's selected_model field is also None when a session is created without explicitly specifying a model, so there is no API workaround to discover the default model.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.