ACP: expose contextTier as a session config option (parity with interactive /model picker)
Chưa có ai nhận issue này.
- 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 feature or problem you'd like to solve
The interactive CLI lets you change the context window tier mid-session (via the /model context tier picker), but the ACP server does not expose contextTier as a session config option. ACP clients can only set the tier at spawn time with --context <tier>, and have no way to discover or change it once the session is running.
Proposed solution
Expose the context tier over ACP with the same shape already used for reasoning_effort:
- Include a
contextTierentry in theconfigOptionsarray returned bysession/new(andsession/load), oftype: "select", with the eligible values for the current model (default,long_context) and the current value. - Accept
session/set_config_optionwithconfigId: "contextTier"and apply it to the live session, exactly as the/modelpicker does interactively. - Only advertise the option for tiered-pricing models, mirroring the interactive behaviour ("context tier picker appears for eligible models").
This closes a parity gap rather than adding new functionality: the capability already exists in the runtime and is reachable from the interactive UI and from settings.json; it is just not reachable through ACP.
Issue #1994 ("Allow reasoning effort discovery and setting via ACP") is the direct precedent — reasoning_effort is now a first-class ACP config option, and contextTier is the remaining sibling setting that isn't.
Example prompts or workflows
- An ACP client (Zed, or any ACP editor integration) shows a "Context Size" picker next to the model and reasoning-effort pickers, populated from
session/new, instead of having to hardcode the tier list per CLI version. - A user on Claude Opus hits a large refactor mid-conversation and switches from
defaulttolong_contextwithout losing session state — today the client must kill and respawncopilot --acp --context long_contextand resume, or the control is simply hidden. - A client drops back from
long_contexttodefaultafter the large task is done, to avoid the surcharge for the rest of the conversation. - A client reads the current tier from
session/loadwhen reconnecting to an existing session, so the UI reflects reality instead of guessing.
Additional context
Reproduced against GitHub Copilot CLI 1.0.75.
The interactive CLI supports hot changes — from copilot help config:
contextTier: context window tier for tiered-pricing models (e.g., "default" or "long_context").
- Can also be set with --context flag (overrides persisted setting)
- Can be changed with /model command (context tier picker appears for eligible models)
ACP does not. Minimal probe over copilot --acp (initialize → session/new → session/set_config_option):
configOptions ids: ["mode","model","reasoning_effort","allow_all"]
contextTier -> {"code":-32602,"message":"Unknown config option 'contextTier'."}
context -> {"code":-32602,"message":"Unknown config option 'context'."}
contextSize -> {"code":-32602,"message":"Unknown config option 'contextSize'."}
So reasoning_effort is exposed but contextTier is not, even though both are per-session model settings adjustable from the interactive /model flow.
Current workaround and why it's poor. The tier can only be pinned at spawn time via --context <tier>. Changing it for a running conversation requires terminating the agent process and respawning it with a different flag, then reloading the session — an intrusive lifecycle operation for what is a per-request setting, and one that ACP clients cannot make feel like the interactive picker.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với tùy chọn cấu hình ACP hiện có reasoning_effort làm tiền lệ, sau đó theo dõi việc quảng bá và xử lý session/new và session/load, cũng như session/set_config_option. So sánh các luồng đó với hành vi của bộ chọn /model tương tác và --context. Hoàn tất khi các model đủ điều kiện cung cấp contextTier hiện tại và client có thể thay đổi nó trong một phiên đang hoạt động mà không cần khởi động lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- api, cli
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 65/100