Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#1,905 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@waldekmastykarz ci sta già lavorando.

Dal 4/10/2026.

  • #1909 di @waldekmastykarz — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
cli, devtools

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C#
Stelle
833
Fork
90
Merge medio
16h 44m
PR unite (30g)
40

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di dotnet/dev-proxy

Tutte le issue di dotnet/dev-proxy

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.