GPT 5.2 on Azure rate_limit_exceeded & no_kv_space issues #3539

Closed
opened 2026-02-16 17:40:34 -05:00 by yindo · 2 comments
Owner

Originally created by @seIIers on GitHub (Dec 14, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

This is not really an opencode problem but is fixable. Azure is having some trouble with their release of GPT 5.2 on Foundry, but there is a clear failure in their API design. The error response still returns 200 OK status codes which inhibits most retry mechanisms.

{"type": "error","sequence_number":2,"error":{"type":"server_error","code":"rate_limit_exceeded","message":"| ... | Traceback (most recent call):\n | \n|  File \"/usr/local/lib/python3.12/site-packages/inference_server/routes.py\", line 726, in streaming_completion\n |  await response.write_to(reactor)]\n | oai_grpc.errors.ServerError:  | no_kv_space\n  | ","param":null }

as well as:

{"type":"error","sequence_number":2,"error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request. You can retry your request, or contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 if the error persists. Please include the request ID ... in your message.","param":null}}

Looking at retryable(), I think it would make some sense to add some additional retry logic. Testing out these additions in my fork https://github.com/sellerscrisp/opencode/tree/feat/azure-foundry-retry

OpenCode version

1.0.152

Steps to reproduce

  1. Deploy GPT 5.2 on Azure Foundry
  2. Setup and use GPT 5.2 in OpenCode

Screenshot and/or share link

Image

Operating System

No response

Terminal

No response

Originally created by @seIIers on GitHub (Dec 14, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description This is not really an opencode problem but is fixable. Azure is having some trouble with their release of GPT 5.2 on Foundry, but there is a clear failure in their API design. The error response still returns 200 OK status codes which inhibits most retry mechanisms. ```json {"type": "error","sequence_number":2,"error":{"type":"server_error","code":"rate_limit_exceeded","message":"| ... | Traceback (most recent call):\n | \n| File \"/usr/local/lib/python3.12/site-packages/inference_server/routes.py\", line 726, in streaming_completion\n | await response.write_to(reactor)]\n | oai_grpc.errors.ServerError: | no_kv_space\n | ","param":null } ``` as well as: ```json {"type":"error","sequence_number":2,"error":{"type":"server_error","code":"server_error","message":"An error occurred while processing your request. You can retry your request, or contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 if the error persists. Please include the request ID ... in your message.","param":null}} ``` Looking at `retryable()`, I think it would make some sense to add some additional retry logic. Testing out these additions in my fork https://github.com/sellerscrisp/opencode/tree/feat/azure-foundry-retry ### OpenCode version 1.0.152 ### Steps to reproduce 1. Deploy GPT 5.2 on Azure Foundry 2. Setup and use GPT 5.2 in OpenCode ### Screenshot and/or share link <img width="863" height="161" alt="Image" src="https://github.com/user-attachments/assets/6b72ed2e-0661-4d7a-802d-9159432f2bd9" /> ### Operating System _No response_ ### Terminal _No response_
yindo added the bug label 2026-02-16 17:40:34 -05:00
yindo closed this issue 2026-02-16 17:40:34 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 14, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #2244: GPT5 Causes rate_limit_exceeded - Similar Azure GPT-5 rate limit issues and discussion about retry mechanisms
  • #163: Retry Claude overloaded_error's - Related issue about handling retryable server errors with retry logic
  • #5294: claude-opus-4.5 on azure unusable - Another Azure connectivity/error issue

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 14, 2025): This issue might be a duplicate of existing issues. Please check: - #2244: GPT5 Causes `rate_limit_exceeded` - Similar Azure GPT-5 rate limit issues and discussion about retry mechanisms - #163: Retry Claude `overloaded_error`'s - Related issue about handling retryable server errors with retry logic - #5294: claude-opus-4.5 on azure unusable - Another Azure connectivity/error issue Feel free to ignore if none of these address your specific case.
Author
Owner

@adamal commented on GitHub (Jan 26, 2026):

Could this issue be re-opened and the fix pulled from the downstream fork?
I am running into this issue several times a day.

@adamal commented on GitHub (Jan 26, 2026): Could this issue be re-opened and the fix pulled from the downstream fork? I am running into this issue several times a day.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3539