github / github/copilot-cli

Model "auto" always runs with reasoning effort disabled (reasoningEffort: null), and rejects any attempt to configure one

Đang mở
#4,560 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

area:configuration 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

When the model is set to auto, every request is sent without any reasoning effort:

  1. Selecting auto sets the session's reasoningEffort to null (visible in the session's events.jsonl as session.model_change → "reasoningEffort": null).
  2. The auto router (auto_v2) picks a model per prompt (session.auto_mode_resolved) but never assigns a reasoning effort to it — the request goes out with none, confirmed by reasoning_effort = NULL and reasoning_tokens = 0 in ~/.copilot/session-store.db (assistant_usage_events).
  3. Trying to set one explicitly is rejected: copilot --model auto --effort xhigh fails with Error: Model "auto" does not support reasoning effort configuration (requested: "xhigh").

So with auto there is no way at all to run with reasoning enabled. The degradation is silent — no error, no indication in the UI — and the impact on agentic work is severe: on a large agentic prompt (spec generation with mandatory file reads), the routed model (gpt-5.3-codex) ends its turn without making a single tool call, replying that it "could not perform the investigation". The exact same prompt, on the exact same routed model, works flawlessly when a reasoning effort is set (see "Same model, only effort differs" below).

Affected version

GitHub Copilot CLI 1.0.80.

Steps to reproduce the behavior
# 1) auto → no reasoning (silent)
copilot --model auto --allow-all-tools -p "Reply with exactly: ok"

# 2) control: explicit model → reasoning works
copilot --model gpt-5.4 --allow-all-tools -p "Reply with exactly: ok"

# 3) auto + explicit effort → hard error
copilot --model auto --effort xhigh --allow-all-tools -p "Reply with exactly: ok"

Then inspect what was actually sent (replace the session ids printed in the Resume line):

sqlite3 -readonly ~/.copilot/session-store.db \
  "SELECT session_id, model, reasoning_effort, reasoning_tokens
   FROM assistant_usage_events ORDER BY id DESC LIMIT 5;"

Observed results:

Run Routed/used model reasoning_effort reasoning_tokens
1 — --model auto gpt-5.4-mini (via auto_v2) NULL 0
2 — --model gpt-5.4 gpt-5.4 xhigh 21
3 — --model auto --effort xhigh Error: Model "auto" does not support reasoning effort configuration (requested: "xhigh").

The same happens in interactive mode: switching to auto logs
session.model_change ... "previousReasoningEffort": "xhigh", "reasoningEffort": null
in ~/.copilot/session-state/<session-id>/events.jsonl, and every subsequent session.auto_mode_resolved runs the chosen model with no effort.

Same model, only effort differs — night and day

Real-world case that led us here (a large spec-generation prompt, ~19.6k input tokens, requiring file reads and skill loading):

  • auto → routed to gpt-5.3-codex, reasoning_effort = NULL: the model ends the turn after 158 output tokens, 0 reasoning tokens, 0 tool calls, claiming it could not perform the investigation. Reproduced consistently across several sessions.
  • Same prompt, same gpt-5.3-codex, with reasoning_effort = xhigh: normal agentic behavior — tool calls, thousands of reasoning tokens, task completed.

The only variable is the reasoning effort. auto mode currently guarantees the degraded path.

Expected behavior

auto should never silently disable reasoning. Either:

  • the auto router assigns an appropriate reasoning effort for the routed model on each request (clamping to what that model supports), and/or
  • a user-provided effort (--effort, settings effortLevel, session config) is honored under auto and clamped per routed model — instead of being cleared on switch and rejected on the CLI flag.
Additional context
  • This looks like an overcorrection of #2870: there, switching to auto kept the previous effort and caused loud 400 errors on models that don't support it; the fix apparently clears the effort entirely, trading a loud error for a silent, permanent degradation. #4459 and #4445 show the invalid-combination side of this is still not fully solved either — both symptoms share the same root: the auto router does not manage effort per routed model.
  • The ACP server mode (copilot --acp) is affected identically, with no workaround at all: session/set_config_option with model=auto clears the effort and removes the reasoning-effort config option from the session, so ACP clients cannot restore it.

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

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

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.

Hướng nghiên cứu

Bắt đầu với các entry point copilot --model auto--effort, sau đó lần theo auto_v2, session.model_changesession.auto_mode_resolved trong khi so sánh events.jsonl với assistant_usage_events trong session-store.db. Được xem là hoàn thành khi chế độ tự động không còn âm thầm xóa effort suy luận, chấp nhận an toàn một effort đã cấu hình và duy trì hành vi agentic mà không tạo ra các yêu cầu không hợp lệ theo từng model.

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, sqlite
Lĩnh vực
cli
Loại issue
Lỗi
Độ 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
48/100

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.