Skip to content

[Bug]: Model rate limit error causes immediate termination instead of auto-retry #16994

@otto-apoc

Description

@otto-apoc

Description

When the model provider returns the following rate limit error, opencode terminates the current task immediately instead of retrying automatically:

You have exceeded the request rate limit. Please wait a short period before retrying your request or contact the support to increase your request rate limit.

Expected Behavior

Detect this rate limit response and apply retry-with-backoff logic, similar to what was added for other rate limit cases (see #452). The user should not need to restart their entire task.

Current Behavior

opencode aborts the task immediately upon receiving this error message. There is no retry attempt.

Steps to Reproduce

Trigger a request that causes the model provider to respond with the rate limit message above (e.g. by sending many requests in a short period).

Notes

Metadata

Metadata

Assignees

Labels

coreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions