github / github/copilot-cli

account.getQuota returns the request timestamp as resetDate instead of the quota reset date

Đang mở
#4,504 0 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: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 Copilot CLI JSON-RPC account.getQuota response returns an incorrect resetDate for quota snapshots.

Environment:

  • GitHub Copilot CLI: 1.0.80
  • CLI started with:
    copilot --server --no-auto-update --log-level error --stdio

I sent the following JSON-RPC request:

{"jsonrpc":"2.0","id":2,"method":"account.getQuota","params":{}}

For premium_interactions, the raw response included:

{
"entitlementRequests": 1500,
"usedRequests": 1500,
"remainingPercentage": 0,
"resetDate": "2026-08-15T23:06:14.840-07:00"
}

This timestamp matched the time the account.getQuota request was made, rather than the account's actual premium quota reset date. The same resetDate timestamp was returned for chat, completions, and premium_interactions.

The GitHub Copilot web UI shows the actual billing-cycle reset date, for example:

Resets in 16 days on Sep 1, 2026

The CLI response does not include a separate quota_reset_at or equivalent field.

Because resetDate tracks the request time, CLI/API consumers cannot accurately display when the premium quota resets.

Expected behavior:

  • resetDate should contain the actual quota/billing-cycle reset timestamp; or
  • account.getQuota should expose a separate reset timestamp field for each quota bucket.

Actual behavior:

  • resetDate is effectively the quota-fetch timestamp and changes each time account.getQuota is called.
Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

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 bằng cách tìm handler JSON-RPC account.getQuota và đoạn mã xây dựng các snapshot hạn mức. Theo dõi cách resetDate được điền cho từng bucket hạn mức, sau đó xác minh rằng các request lặp lại không còn trả về timestamp của request và response hiển thị thời điểm reset hạn mức thực tế.

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
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 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
57/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.