GenericRandomErrorPlugin sends literal @dynamic in Retry-After for non-429 responses
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
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
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.
- Lingua principale
- C#
- Stelle
- 833
- Fork
- 90
- Merge medio
- 16h 44m
- PR unite (30g)
- 40
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dotnet/dev-proxy
-
LanguageModelRateLimitingPlugin returns a billing error (insufficient_quota) instead of a rate limit errorForse già presa @waldekmastykarz l’ha presa 1 giorno fa. Apertawork in progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
dotnet/dev-proxy#1911 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
config get doesn't print the start command for presets with a .devproxy folderForse già presa @waldekmastykarz l’ha presa 1 giorno fa. Apertawork in progress
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
dotnet/dev-proxy#1906 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
MockStdioResponsePlugin: @stdin.body.id placeholder fails to resolve when messages arrive back-to-back after an id-less messageForse di nuovo libera @garrytrinder l’ha presa 84 giorni fa e non c’è nessuna pull request aperta. Aperta
dotnet/dev-proxy#1757 · 1 reazione · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di dotnet/dev-proxy
Issue simili
-
subsystem: UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
Open-Systems-Pharmacology/PK-Sim#3812 ·
I maintainer di solito rispondono entro 1 giorno
-
[C#]:主页联网更新的提示投稿横幅指向错误Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
PCL-Community/PCL-CE#3652 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
nightscout/nocturne#2012 ·
I maintainer di solito rispondono entro 1 giorno
-
area:frontend bug FE P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
klasolsson81/jobbliggaren#2010 ·
I maintainer di solito rispondono entro 1 giorno
-
[aw] Upgrade availableApertaagentic-workflows untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno