GenericRandomErrorPlugin sends literal @dynamic in Retry-After for non-429 responses
Maintainer thường phản hồi trong vòng 1 ngày
Đá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
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ả
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
- Download the
openai-throttlingpreset:devproxy config get openai-throttling - Start Dev Proxy:
devproxy --config-file "~dataFolder/configs/openai-throttling/.devproxy/devproxyrc.json" --failure-rate 100 - 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
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc 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.
Issue khác của dotnet/dev-proxy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
waiting for response
dotnet/dev-proxy#1914 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
MockStdioResponsePlugin: @stdin.body.id placeholder fails to resolve when messages arrive back-to-back after an id-less messageCó thể làm lại được @garrytrinder đã nhận 84 ngày trước và không có pull request nào đang mở. Đang mở
dotnet/dev-proxy#1757 · 1 reaction · 2 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của dotnet/dev-proxy
Issue tương tự
-
[Doc Gap] Document new --enable-public-network-access breaking change for azurebackup vault createĐang mởcopilot documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area-dashboard
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0 - Backlog Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
BrighterCommand/Brighter#4539 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area-networking
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dotnet/aspnetcore#69671 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ignored test: FileLocalDataSourceTests.retries_loading_fileCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởtest
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NethermindEth/nethermind#14274 ·
Maintainer thường phản hồi trong vòng 1 ngày