Project sessions fail with "Model not available" — wrong GitHub account used for CLI session; account cannot be switched
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 2.1k
- Fork
- 153
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## Description
When two GitHub accounts are logged into the Copilot app (a personal account and an enterprise account), the app fails to create project sessions because it initializes the embedded CLI session with the wrong account — and there is no working way to switch it.
## Setup
- Account A (personal): owns the project's repository, does **not** have access to certain models (e.g. `claude-fable-5`, `claude-opus-4.8-fast`)
- Account B (enterprise, default account): has the models, but no access to Account A's private repo
- Project opened from a local clone of Account A's repo
## Behavior
1. Creating a new session in the project fails with:
`Session creation failed: RPC error -32603: Request session.create failed with message: Model "claude-fable-5" is not available.`
The session is created under Account A even though the selected model is only available on Account B.
2. Changing the project's **GitHub Account** in Project Settings to Account B does not persist — the DB row (`projects.github_account_id`) stays/reverts to Account A (apparently re-derived from the repo owner). The dropdown shows Account B while the stored value is Account A.
3. Removing Account A entirely then breaks workspace init ("Failed to initialize workspace"), since Account B's token cannot fetch the repo.
4. The same account (Account B) works fine in Copilot CLI directly, where switching accounts is possible.
## Expected
- The project should use the explicitly selected account for model/API calls, or
- Allow separate accounts for repo access vs. model/billing, or at minimum
- The Project Settings account dropdown should actually persist its selection and surface a clear error when model and repo access require different accounts.
## Environment
- macOS (Apple Silicon), GitHub Copilot app with bundled Copilot CLI 1.0.81-0
Hướng dẫn đóng góp
Hướng nghiên cứu
Tái hiện lỗi với hai tài khoản GitHub và kiểm tra tính bền vững của projects.github_account_id, việc chọn tài khoản trong phần cài đặt dự án, quá trình khởi tạo workspace và tích hợp Copilot CLI đi kèm. Xác minh rằng tài khoản được chọn được lưu trữ và sử dụng nhất quán, đồng thời các lỗi về quyền truy cập repo và tính khả dụng của mô hình vẫn rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- github, macos
- Lĩnh vực
- authentication, desktop
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100