{"slug": "the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by", "title": "The rate-limit counter on my gpt-5-mini deployment decrements by", "summary": "A developer reports that Azure OpenAI's rate-limit counter for gpt-5-mini deployments decrements by exactly the input token count, not by the documented formulas that include max_tokens. In 29 paired samples, 20 charges matched usage.prompt_tokens exactly, while 7 exceeded input after connection-error retries, and none matched input + completion. The behavior was identical across reasoning_effort settings, ruling out reasoning-budget effects, and contradicts Azure's documented worst-case ceiling and prompt + max_tokens formulas.", "body_md": "# The rate-limit counter on my gpt-5-mini deployment decrements by\n\n`x-ratelimit-remaining-tokens`\n\non a Global Standard gpt-5-mini (1M TPM, Sweden Central, API version `2024-12-01-preview`\n\n), computed each charge as `limit - remaining`\n\n, and kept only responses where a single request finished within ±2 seconds so the delta was attributable to one call.Breakdown of the 29 paired samples:\n\n**20** charged exactly`usage.prompt_tokens`\n\n(examples: 8,329 / 13,605 / 40,073 / 93,837)**2** within 5% of`input + max_tokens`\n\nor`max(input, max_tokens)`\n\n— probably coincidence**7** charged well above input — all retried after connection errors (one request with 252,781 input tokens was charged 630,582, suggesting two attempts each hit by a character-based input estimate)\n\nThis rules out the documented formulas:\n\n- One request was charged 8,329 tokens with\n`max_completion_tokens = 10000`\n\n. No formula involving max_tokens — sum or maximum — can produce a charge below max_tokens itself. `input + completion`\n\nmatched 0 of 29. Completions aren't counted.- Behavior was identical with\n`reasoning_effort`\n\nat`minimal`\n\n,`low`\n\n, and unset. Not a reasoning-budget effect.\n\nThe Azure docs are contradictory. One section says the estimate \"includes prompt text and count, the max_tokens parameter setting, the best_of parameter setting\" — a worst-case ceiling reading. The 429 section commits to an actual sum: \"prompt + max_tokens.\" Neither matches reality. OpenAI's platform docs use\n\n`max(max_tokens, character-based estimate)`\n\n— also doesn't match.So for a completed request, the counter visibly ends at exact input tokens with no max_tokens component. What I can't observe externally:\n\n1. Is the counter charged when the request arrives (the documented prompt + max_tokens estimate, later reconciled to actual input), or charged once at completion with the exact input?\n\n2. If requests are charged on receipt, does the over-estimate get refunded, or is the refund delayed/aggregated such that it's invisible in my per-request delta?\n\n3. For the retried requests, is each attempt charged independently against the remaining budget, or is there a deduplication window?\n\nHas anyone else seen this exact-input-only behavior? I'm especially curious if the charging-on-receipt theory holds — that would explain why max_tokens never shows up in completed-request deltas.\n\n[Next Cursor is losing its edge for my heavy coding workflows →](/en/threads/8152/)", "url": "https://wpnews.pro/news/the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by", "canonical_source": "https://promptcube3.com/en/threads/8181/", "published_at": "2026-08-29 23:48:27+00:00", "updated_at": "2026-08-30 00:19:50.796378+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-infrastructure"], "entities": ["Azure OpenAI", "gpt-5-mini", "OpenAI"], "alternates": {"html": "https://wpnews.pro/news/the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by", "markdown": "https://wpnews.pro/news/the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by.md", "text": "https://wpnews.pro/news/the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by.txt", "jsonld": "https://wpnews.pro/news/the-rate-limit-counter-on-my-gpt-5-mini-deployment-decrements-by.jsonld"}}