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

GenericRandomErrorPlugin sends literal @dynamic in Retry-After for non-429 responses

Đã đóng
#1,905 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

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

@waldekmastykarz đang làm issue này rồi.

Từ ngày 4/10/2026.

  • #1909 của @waldekmastykarz — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
cli, devtools

Hướng nghiên cứu

Start in DevProxy.Plugins/Behavior/GenericRandomErrorPlugin.cs at the status-code check described in the issue, then inspect how RetryAfterPlugin is registered. Reproduce with the openai-throttling preset and confirm that dynamic Retry-After values are resolved for non-429 responses and that the resulting header is numeric.

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

Mô tả

work in progress

Description

GenericRandomErrorPlugin only replaces @dynamic (and @dynamic=N) in the Retry-After header when the error response has status code 429. For any other status code, Dev Proxy sends the literal value @dynamic to the client.

APIs also send Retry-After on other status codes. For example, OpenAI returns 503 server_is_overloaded with Retry-After, and Anthropic returns 529 overloaded_error.

Source: DevProxy.Plugins/Behavior/GenericRandomErrorPlugin.cs, the if (error.StatusCode == (int)HttpStatusCode.TooManyRequests && ...) check.

Steps to reproduce

  1. Download the openai-throttling preset: devproxy config get openai-throttling
  2. Start Dev Proxy: devproxy --config-file "~dataFolder/configs/openai-throttling/.devproxy/devproxyrc.json" --failure-rate 100
  3. Send requests until you get a 503: curl -ikx http://127.0.0.1:8000 https://api.openai.com/v1/models

Expected behavior

HTTP/1.1 503 Service Unavailable
Retry-After: 5

Actual behavior

HTTP/1.1 503 Service Unavailable
Retry-After: @dynamic

Clients can't parse the header, so they fall back to their own backoff. RetryAfterPlugin doesn't check whether the app waited.

Affected presets

  • openai-throttling (503)
  • anthropic-random-errors (529)
  • anthropic-throttling (529)
  • api-degradation-scenarios (503)
  • webhook-delivery-resilience (503)

Proposed fix

Resolve @dynamic in the Retry-After header for any status code, and register the request with RetryAfterPlugin whenever the response has a @dynamic Retry-After header.

The other option is to keep the current behavior, show a warning when @dynamic is used on a status other than 429, and change the presets to use a number.

Ngôn ngữ chính
C#
Star
833
Fork
90
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
45

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

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 dotnet/dev-proxy

Tất cả issue của dotnet/dev-proxy

Issue tương tự

Thêm issue về C#

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.