github / github/copilot-cli

contextTier=long_context is not applied on startup / no CLI flag for long context tier

Đang mở
#3,481 2 bình luận 8 reaction 0 người được giao Xem trên GitHub
area:configuration area:models area:non-interactive
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 CLI accepts `contextTier: "long_context"` in `~/.copilot/settings.json`, but new/default sessions launched non-interactively do not reliably start with the long context tier. The session starts with the smaller/default context even when settings specify `model`, `effortLevel`, and `contextTier`.

Selecting the same model interactively through `/model` switches the session from `gpt-5.5 (xhigh)` to `gpt-5.5 (xhigh) (1.1M context)`, which suggests the context tier is recognized by the model picker but not applied during startup/model resolution.

This blocks autonomous or automatically launched sessions that start with an initial prompt, because those sessions cannot interactively choose the long-context tier after launch.

## Affected version

GitHub Copilot CLI 1.0.52-4

Observed installed package: `1.0.52-4` on Windows.

## Steps to reproduce the behavior

1. Configure `~/.copilot/settings.json` with:

```json
{
"model": "gpt-5.5",
"effortLevel": "xhigh",
"contextTier": "long_context"
}
```

2. Start a new default Copilot CLI session, or launch an automated session with an initial prompt.
3. Run `/context` or inspect the displayed model/context information.
4. Observe that the session uses the smaller/default context rather than the long-context tier.
5. In an interactive session, run `/model` and select the same model/tier. The display changes to the long-context variant, for example `gpt-5.5 (xhigh) (1.1M context)`.

## Expected behavior

A new session should honor `contextTier: "long_context"` from `settings.json` during startup/model resolution. For automation, there should also be a launch flag such as:

```bash
copilot --model gpt-5.5 --reasoning-effort xhigh --context-tier long_context
```

or equivalent.

## Additional context

I inspected the installed 1.0.52-4 bundle locally and found:

- `contextTier` is schema-recognized with values `"default"` and `"long_context"`.
- The interactive model picker has a `context_tier` phase and writes `contextTier` when selecting the long-context tier.
- The documented CLI flags include `--model` and `--reasoning-effort`, but not a context-tier flag.
- The startup/model-resolution path appears to read `model` and `effortLevel`, while the UI path applies context-tier capability overrides later.
- The plain `/model ` command path appears to clear `contextTier`, while the picker path can write it.

Operating system: Windows 11 / Windows Terminal / PowerShell.

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.