Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: ACP adapter re-sends an unchanged model, which resets Copilot's 1M context tier

Đang mở Phù hợp với người mới
#27,022 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

Đọc packages/provider-acp/src/server/adapter.ts ở phần thiết lập model của tùy chọn cấu hình tại các dòng 6694–6709, rồi so sánh với bước kiểm tra session/set_model ngay bên dưới. Tái hiện trường hợp bằng một phiên ACP có model hiện tại đã khớp với model được yêu cầu và kiểm tra nhật ký phiên. Hoàn tất khi adapter bỏ qua thao tác đặt tùy chọn cấu hình dư thừa nhưng vẫn giữ các thay đổi model khi model được yêu cầu khác với model hiện tại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

[!NOTE]
🤖 Claude Opus 5.5 responding on behalf of uzairansaruzi

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/server

Steps to reproduce
  1. Add GitHub Copilot through the ACP Registry (agent github-copilot-cli).
  2. Start Copilot on a long-context-eligible model with the 1M tier: copilot --acp --model claude-opus-5.5 --context long_context, or set "contextTier": "long_context" in ~/.copilot/settings.json.
  3. Start a T3 Code thread on claude-opus-5.5 and send a message.
  4. Read the session journal at ~/.copilot/session-state/<session-id>/events.jsonl.
Expected behavior

The model the thread wants is already the session's current model, so T3 Code leaves it alone and the session keeps the tier Copilot started with.

Actual behavior

T3 Code sends session/set_config_option {configId: "model", value: "claude-opus-5.5"} even though currentValue is already claude-opus-5.5. Copilot treats every model change as clearing the context tier, so the session drops to the 200K default.

On the config-option path, the adapter sets the model without checking the current value:
https://github.com/pingdotgg/t3code/blob/960d5761c13f68a2f10635bcd26489a5fa404ec1/packages/provider-acp/src/server/adapter.ts#L6694-L6709

The session/set_model path just below skips a model that already matches:
https://github.com/pingdotgg/t3code/blob/960d5761c13f68a2f10635bcd26489a5fa404ec1/packages/provider-acp/src/server/adapter.ts#L6715-L6717

The real fix belongs in Copilot CLI (github/copilot-cli#4275). Its ACP model switch drops contextTier, and the tier isn't offered as a config option. Skipping a model set that changes nothing still matters on our side: it is the only thing resetting the tier when the thread model matches Copilot's startup model. It also brings the two paths in line.

Once Copilot advertises a context-tier config option, T3 Code should show it with no changes (sessionConfig.ts passes through everything outside the model and collaboration_mode categories).

Impact

Major degradation or frequent failure

Version or commit

0.1.4-nightly.20261028.3841 (code references at main @ 960d576)

Environment

macOS 26, GitHub Copilot CLI 1.0.104 over ACP, claude-opus-5.5

Logs or stack traces
# Copilot started with --model claude-opus-5.5 --context long_context, then T3 Code's model set
1 session.start         {"selectedModel":"claude-opus-5.5","contextTier":"long_context"}
2 session.model_change  {"newModel":"claude-opus-5.5","previousModel":"claude-opus-5.5","contextTier":null,"source":"sdk"}
6 session.usage_record  maxPromptTokens: 200000

# Every recent T3 Code Copilot session (Copilot 1.0.97 to 1.0.104) shows the same pattern
2 session.model_change  {"newModel":"claude-opus-5.5","contextTier":null,"source":"sdk"}
8 session.usage_record  maxPromptTokens: 200000
Workaround

None in T3 Code today. The launch flag and the settings.json tier are both cleared by the model set. Over ACP, /model -s <id> takes no tier argument and doesn't restore the saved tier. The interactive copilot CLI is the only way to get the 1M window.

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
3 giờ 20 phút
Pull request đã merge (30 ngày)
208

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

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.