Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Dec 30, 2025

Fixes user-configured rate limiting (client-side throttling in the extension) being surfaced as a Provider Error.

  • Add non-error say type api_req_rate_limit_wait and render it as a status row
  • Wait for the configured rate-limit delay before emitting api_req_started (prevents overlapping spinners)
  • Ensure the rate limit wait row completes correctly (no stuck spinner)
  • Add/adjust tests and i18n strings

Before
image
image

AFTER
image
image


Important

Fixes rate limit wait display by introducing api_req_rate_limit_wait status and updating task handling and UI components.

  • Behavior:
    • Introduces api_req_rate_limit_wait as a non-error status in runTask.ts and message.ts.
    • Delays api_req_started emission until after rate-limit wait in Task.ts to prevent overlapping spinners.
    • Ensures rate limit wait row completes without a stuck spinner in ChatRow.tsx.
  • UI Components:
    • Updates ChatRow.tsx and ChatView.tsx to handle api_req_rate_limit_wait status.
    • Adds ChatRow.rate-limit-wait.spec.tsx for testing rate limit wait display.
  • Internationalization:
    • Adds rateLimitWait string to multiple locale files for i18n support.
  • Tests:
    • Adds tests in Task.spec.ts to verify rate limit wait behavior and message emission.

This description was created by Ellipsis for 37bc97b. You can customize this summary. It will automatically update as commits are pushed.

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Dec 30, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 30, 2025

Oroocle Clock   See task on Roo Cloud

Re-review complete. No net new issues found; 1 previously flagged item remains.

  • Avoid rendering a blank padded row for completed api_req_rate_limit_wait (either filter it out in ChatView or render a completed row in ChatRow and update tests).
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

"streaming": "Permintaan API...",
"cancelled": "Permintaan API Dibatalkan",
"streamingFailed": "Streaming API Gagal",
"rateLimitWait": "Pembatasan rate",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typographical note: The new string "Pembatasan rate" mixes Indonesian with English. Consider localizing "rate" (e.g., "Pembatasan laju" or "Batasan kecepatan") to maintain consistency with the rest of the translations.

Suggested change
"rateLimitWait": "Pembatasan rate",
"rateLimitWait": "Pembatasan laju",

This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX.

@hannesrudolph hannesrudolph changed the title Fix provider rate limit wait display Fix rate limit wait display Dec 30, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 30, 2025
User-configured rate limiting is not an error/retry signal and should not
mark the API as unstable in eval runner.
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Review] in Roo Code Roadmap Dec 30, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 30, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Dec 30, 2025
Changed the rate limit wait countdown from a hardcoded English string to
a structured JSON payload for i18n-safe transport. The frontend ChatRow
component now parses the JSON to extract the seconds value, enabling proper
internationalization through the existing rateLimitWait translation key.
@roomote
Copy link
Contributor

roomote bot commented Dec 30, 2025

Fixaroo Clock   See task on Roo Cloud

Fixed the indentation issue in the maybeWaitForProviderRateLimit method. All local checks passed.

View commit | Revert commit

@mrubens
Copy link
Collaborator

mrubens commented Dec 30, 2025

I think passing JSON is better than parsing the English string, but I'm on my phone and haven't tested to make sure the latest commit works.

@roomote
Copy link
Contributor

roomote bot commented Dec 31, 2025

Fixaroo Clock   See task on Roo Cloud

Fixed the test to verify the rate limit row is hidden when complete. All local tests passed.

View commit | Revert commit

@mrubens mrubens merged commit ca1bc18 into main Dec 31, 2025
10 checks passed
@mrubens mrubens deleted the rate-limit-display-fix branch December 31, 2025 05:56
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Dec 31, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 31, 2025
@roomote roomote bot mentioned this pull request Dec 31, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Jan 3, 2026
* fix: add general API endpoints for Z.ai provider (RooCodeInc#9894)

Co-authored-by: Roo Code <[email protected]>

* fix: handle empty Gemini responses and reasoning loops (RooCodeInc#10007)

* fix: add missing tool_result blocks to prevent API errors (RooCodeInc#10015)

* feat: add gpt-5.2 model to openai-native provider (RooCodeInc#10024)

* test: update built-in commands count to 9

* fix: filter orphaned tool_results when more results than tool_uses (RooCodeInc#10027)

* Release v3.36.5 (RooCodeInc#10029)

* Changeset version bump (RooCodeInc#10032)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* fix: merge settings and versionedSettings for Roo provider models (RooCodeInc#10030)

* Revert "fix: merge settings and versionedSettings for Roo provider models" (RooCodeInc#10034)

* Revert the 3.6.5 release (we halted it) (RooCodeInc#10036)

* Release v3.36.5 (RooCodeInc#10037)

* Changeset version bump (RooCodeInc#10038)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* test: adjust terminal count limits in TerminalRegistry tests

* ux: improve auto-approve timer visibility in follow-up suggestions (RooCodeInc#10048)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>

* fix: cancel auto-approval timeout when user starts typing (RooCodeInc#9937)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* fix: extract raw error message from OpenRouter metadata (RooCodeInc#10039)

OpenRouter wraps upstream provider errors in a generic message but includes
the actual error in metadata.raw. This change:

- Adds OpenRouterErrorResponse interface for proper typing
- Creates handleStreamingError() helper for DRY error handling
- Extracts metadata.raw for actionable error messages in PostHog
- Includes nested error structure so getErrorMessage() can extract raw message

Before: PostHog receives '400 Provider returned error' (generic)
After: PostHog receives 'Model xyz not found' (actionable)

This enables proper error tracking and debugging via PostHog telemetry.

* feat: add tool alias support for model-specific tool customization (RooCodeInc#9989)

Co-authored-by: Hannes Rudolph <[email protected]>

* fix: show tool protocol dropdown for LiteLLM provider (RooCodeInc#10053)

* feat: add WorkspaceTaskVisibility type for organization cloud settings (RooCodeInc#10020)

* feat: add WorkspaceTaskVisibility type and workspaceTaskVisibility property to OrganizationCloudSettings

* refactor: create workspaceTaskVisibilitySchema and derive WorkspaceTaskVisibility type from it

---------

Co-authored-by: Roo Code <[email protected]>

* Release: v1.91.0 (RooCodeInc#10055)

chore: bump version to v1.91.0

* feat: sanitize MCP server/tool names for API compatibility (RooCodeInc#10054)

* Release v3.36.6 (RooCodeInc#10057)

* Changeset version bump (RooCodeInc#10058)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* fix: use JavaScript-based hover for checkpoint menu visibility (RooCodeInc#10056)

* feat: remove auto-approve toggles for to-do and retry actions (RooCodeInc#10062)

* feat(openrouter): add improvements to openrouter provider (RooCodeInc#10082)

* feat: Add Amazon Nova 2 Lite model to Bedrock provider (RooCodeInc#9830)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* feat: add AWS Bedrock service tier support (RooCodeInc#9955)

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>

* Capture more of OpenRouter's provider specific error details (RooCodeInc#10073)

* Capture more of OpenRouter's provider specific error details

* Actually match the openrouter structure

* feat(web-evals): improve run logs and formatters (RooCodeInc#10081)

* Move isToolAllowedForMode out of shared directory (RooCodeInc#10089)

* chore: add changeset for v3.36.7 (RooCodeInc#10091)

* Changeset version bump (RooCodeInc#10092)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix: prevent duplicate MCP tools error by deduplicating servers at source (RooCodeInc#10096)

* feat: add metadata to error details dialog (RooCodeInc#10050)

* feat: add metadata to error details dialog

- Prepends extension version, provider, model, and repository info to error details
- Helps users provide better bug reports with context
- Uses useExtensionState and useSelectedModel hooks for data

* Tweaks

---------

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: Bruno Bergher <[email protected]>

* web: Fixes link to provider pricing page (RooCodeInc#10107)

* feat(read-file): implement incremental token-budgeted file reading (RooCodeInc#10052)

* Add config to control public sharing (RooCodeInc#10105)

Co-authored-by: Roo Code <[email protected]>

* Release: v1.92.0 (RooCodeInc#10116)

* Remove the description from bedrock service tiers (RooCodeInc#10118)

* feat: remove strict ARN validation for Bedrock custom ARN users (RooCodeInc#10110)

Co-authored-by: Roo Code <[email protected]>

* fix: prevent race condition from deleting wrong API messages (RooCodeInc#10113)

Co-authored-by: daniel-lxs <[email protected]>

* feat(anthropic): enable native tools by default and add telemetry tracking (RooCodeInc#10021)

* feat: enable native tools by default for multiple providers (RooCodeInc#10059)

* Release v3.36.8 (RooCodeInc#10119)

* fix: add additionalProperties: false to nested MCP tool schemas (RooCodeInc#10109)

* fix: normalize tool call IDs for cross-provider compatibility via OpenRouter (RooCodeInc#10102)

* feat: add full error details to streaming failure dialog (RooCodeInc#10131)

Co-authored-by: Roo Code <[email protected]>
Co-authored-by: cte <[email protected]>

* fix: validate tool_result IDs in delegation resume flow (RooCodeInc#10135)

* feat(evals): improve evals UI with tool groups and duration fix (RooCodeInc#10133)

Co-authored-by: Roo Code <[email protected]>

* Changeset version bump (RooCodeInc#10120)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Release v3.36.9 (RooCodeInc#10138)

* Changeset version bump (RooCodeInc#10137)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* fix: correct token counting for context truncation display (RooCodeInc#9961)

* feat(deepseek): implement interleaved thinking mode for deepseek-reasoner (RooCodeInc#9969)

* Update next.js to ~15.2.8 (RooCodeInc#10140)

* fix(deepseek): preserve reasoning_content during tool call sequences (RooCodeInc#10141)

Co-authored-by: Roo Code <[email protected]>

* feat: add gemini-3-flash-preview model (RooCodeInc#10151)

* Release v3.36.10 (RooCodeInc#10153)

* Changeset version bump (RooCodeInc#10154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>

* fix(bedrock): convert tool_result to XML text when native tools disabled (RooCodeInc#10155)

* fix: remove dots and colons from MCP tool names for Bedrock compatibility (RooCodeInc#10152)

* fix: improve terminal process error handling and abort operation

* fix(ROO-202): refresh Roo models cache with session token on auth state change (RooCodeInc#10156)

* fix: support AWS GovCloud and China region ARNs in Bedrock provider (RooCodeInc#10157)

Co-authored-by: Roo Code <[email protected]>

* feat: enable native tool calling by default for Z.ai models (RooCodeInc#10158)

Co-authored-by: Roo Code <[email protected]>

* [feat] Claude Code Provider Native Tool Calling (RooCodeInc#10077)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix: normalize MCP tool schemas for Bedrock and OpenAI strict mode (RooCodeInc#10148)

* fix: enable native tools by default for OpenAI compatible provider (RooCodeInc#10159)

* Release v3.36.11 (RooCodeInc#10161)

* Changeset version bump (RooCodeInc#10162)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <[email protected]>

* feat(telemetry): extract error messages from JSON payloads for better PostHog grouping (RooCodeInc#10163)

* fix: add userAgentAppId to Bedrock embedder for code indexing (RooCodeInc#10166)

Adds userAgentAppId configuration to the BedrockRuntimeClient in the
code indexing embedder, matching the implementation pattern already
used in the main Bedrock API provider.

This enables proper user agent identification in CloudTrail AWS requests
when using Bedrock for code indexing embeddings.

Fixes