LanguageModelRateLimitingPlugin returns a billing error (insufficient_quota) instead of a rate limit error
Los mantenedores suelen responder en 1 día
@waldekmastykarz ya está trabajando en esto.
Desde el 4/10/2026.
- #1912 de @waldekmastykarz — abierto
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 82/100
Línea de trabajo
Comienza en DevProxy.Plugins/Behavior/LanguageModelRateLimitingPlugin.cs y compara la estructura de error esperada con el preset openai-throttling en pnp/proxy-samples. Se considera terminado cuando la respuesta de throttle predeterminada usa type "tokens" y code "rate_limit_exceeded", incluye los contadores de tokens del plugin y Custom aún puede simular un error de cuota.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
When LanguageModelRateLimitingPlugin throttles a request with whenLimitExceeded: "Throttle" (the default), it returns a 429 with this body (DevProxy.Plugins/Behavior/LanguageModelRateLimitingPlugin.cs):
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"code": "insufficient_quota"
}
}
That's the body OpenAI uses for a billing or quota error, which means "stop, retrying won't help". OpenAI's docs say: "Retrying billing, spend, or quota errors won't restore API access." (Error codes)
The plugin simulates a token rate limit, which means "wait and retry". So an app that handles OpenAI errors correctly does the wrong thing under Dev Proxy:
- It stops retrying and shows "out of credits", when it should back off and retry.
- Its rate limit branch (
rate_limit_exceeded) never runs, so the test doesn't cover the code path the plugin is meant to test.
Steps to reproduce
- Enable
LanguageModelRateLimitingPluginwith a lowpromptTokenLimitforhttps://api.openai.com/*. - Send OpenAI requests until the limit is exceeded.
- Inspect the 429 body.
Expected behavior
A rate limit error that matches what OpenAI returns when you exceed tokens per minute, for example:
{
"error": {
"message": "Rate limit reached for <model> in organization <org> on tokens per min (TPM): Limit <limit>, Used <used>, Requested <requested>. Please try again in <n>s.",
"type": "tokens",
"param": null,
"code": "rate_limit_exceeded"
}
}
The openai-throttling preset in pnp/proxy-samples already uses this shape.
Actual behavior
The 429 body says insufficient_quota, which clients treat as a billing error.
Proposed fix
Change the default throttle body to rate_limit_exceeded with type: "tokens", and include the token numbers from the plugin's counters in the message. Keep whenLimitExceeded: "Custom" for anyone who wants to simulate a quota error on purpose.
- Lenguaje dominante
- C#
- Estrellas
- 833
- Forks
- 90
- Merge medio
- 18 h 41 min
- PR fusionados (30 d)
- 45
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/dev-proxy
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
waiting for response
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
dotnet/dev-proxy#1914 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
MockStdioResponsePlugin: @stdin.body.id placeholder fails to resolve when messages arrive back-to-back after an id-less messageQuizá libre de nuevo @garrytrinder la tomó hace 85 días y no hay ningún pull request abierto. Abierto
dotnet/dev-proxy#1757 · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/dev-proxy
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged aspnet-core/svc fundamentals/subsvc Source - Docs.ms
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
dotnet/AspNetCore.Docs#37785 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Azure/azure-sdk-tools#17204 ·
Los mantenedores suelen responder en 1 día
-
Проблема с Dotnet RUAbiertoarea-tutorials needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/website-feedback#1779 ·
-
[Bug] SwipeControl in Execute mode with more than one item replaces the whole UI with an error panelAbiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
microsoft/microsoft-ui-reactor#1344 ·
Los mantenedores suelen responder en 1 día