Commit graph

6365 commits

Author SHA1 Message Date
Hannes Rudolph
706138e7fe Handle terminal failures in background resume/poll 2025-12-10 00:50:28 -07:00
Hannes Rudolph
8f5e2ed304 fix: track currentRequestResponseId in SSE fallback path for background mode resume 2025-12-09 19:00:06 -07:00
Hannes Rudolph
f138361e87 fix: fix type errors - add metadata to ClineMessage, fix getResponseId method name 2025-12-09 18:49:05 -07:00
Hannes Rudolph
f988dee5ca fix: use hyphen instead of em dash in GPT-5 Pro description, remove unused imports 2025-12-09 18:46:35 -07:00
Hannes Rudolph
9803d434a6 fix(types/openai): correct GPT-5 Pro description typos/grammar; perf(core/task): avoid full-state refresh on each background status chunk to reduce re-renders 2025-12-09 18:43:26 -07:00
Hannes Rudolph
50242b4ee9 fix(openai-native): add logging for background resume and polling; classify permanent vs transient errors; chore(task): remove temporary debug log 2025-12-09 18:43:26 -07:00
Hannes Rudolph
49f90b98f5 webview-ui: use standard API Request icons for background mode; keep background labels; fix deps warning in ChatRow useMemo 2025-12-09 18:43:26 -07:00
Hannes Rudolph
d552cce01f fix(openai): update reasoning effort default to high and improve model description for clarity 2025-12-09 18:43:25 -07:00
Hannes Rudolph
7cff4db96c fix(webview): define chevron icon via codicon and add missing isExpanded dep to useMemo; test: remove duplicate GPT-5 Pro background-mode test; chore(core): remove temp debug log 2025-12-09 18:43:25 -07:00
Hannes Rudolph
e118846aa5 fix: Address PR review feedback - fix stale resume IDs, update model description, remove duplicate test, revert gitignore 2025-12-09 18:43:25 -07:00
Hannes Rudolph
c6b7681622 feat(chat): enhance background status handling and UI updates for terminal states 2025-12-09 18:41:02 -07:00
Hannes Rudolph
cb975a2e7b feat(openai-models): update maxTokens for gpt-5-pro-2025-10-06 from 272000 to 128000 2025-12-09 18:38:36 -07:00
Hannes Rudolph
f3b654d320 chore: remove TEMP_OPENAI_BACKGROUND_TASK_DOCS.DM and ignore temp docs 2025-12-09 18:38:36 -07:00
Hannes Rudolph
3949621cf1 feat(openai-native): background mode + auto-resume and poll fallback
Enable OpenAI Responses background mode with resilient streaming for GPT‑5 Pro and any model flagged via metadata.

Key changes:

- Background mode enablement

  • Auto-enable for models with info.backgroundMode === true (e.g., gpt-5-pro-2025-10-06) defined in [packages/types/src/providers/openai.ts](packages/types/src/providers/openai.ts).

  • Also respects manual override (openAiNativeBackgroundMode) from ProviderSettings/ApiHandlerOptions.

- Request shape (Responses API)

  • background:true, stream:true, store:true set in [OpenAiNativeHandler.buildRequestBody()](src/api/providers/openai-native.ts:224).

- Streaming UX and status events

  • New ApiStreamStatusChunk in [src/api/transform/stream.ts](src/api/transform/stream.ts) with statuses: queued, in_progress, completed, failed, canceled, reconnecting, polling.

  • Provider emits status chunks in SDK + SSE paths via [OpenAiNativeHandler.processEvent()](src/api/providers/openai-native.ts:1100) and [OpenAiNativeHandler.handleStreamResponse()](src/api/providers/openai-native.ts:651).

  • UI spinner shows background lifecycle labels in [webview-ui/src/components/chat/ChatRow.tsx](webview-ui/src/components/chat/ChatRow.tsx) using [webview-ui/src/utils/backgroundStatus.ts](webview-ui/src/utils/backgroundStatus.ts).

- Resilience: auto-resume + poll fallback

  • On stream drop for background tasks, attempt SSE resume using response.id and last sequence_number with exponential backoff in [OpenAiNativeHandler.attemptResumeOrPoll()](src/api/providers/openai-native.ts:1215).

  • If resume fails, poll GET /v1/responses/{id} every 2s until terminal and synthesize final output/usage.

  • Deduplicate resumed events via resumeCutoffSequence in [handleStreamResponse()](src/api/providers/openai-native.ts:737).

- Settings (no new UI switch)

  • Added optional provider settings and ApiHandlerOptions: autoResume, resumeMaxRetries, resumeBaseDelayMs, pollIntervalMs, pollMaxMinutes in [packages/types/src/provider-settings.ts](packages/types/src/provider-settings.ts) and [src/shared/api.ts](src/shared/api.ts).

- Cleanup

  • Removed VS Code contributes toggle for background mode; behavior now model-driven + programmatic override.

- Tests

  • Provider: coverage for background status emission, auto-resume success, resume→poll fallback, non-background negative in [src/api/providers/__tests__/openai-native.spec.ts](src/api/providers/__tests__/openai-native.spec.ts).

  • Usage parity unchanged validated in [src/api/providers/__tests__/openai-native-usage.spec.ts](src/api/providers/__tests__/openai-native-usage.spec.ts).

  • UI: label mapping tests for background statuses in [webview-ui/src/utils/__tests__/backgroundStatus.spec.ts](webview-ui/src/utils/__tests__/backgroundStatus.spec.ts).

Notes:

- Aligns with TEMP_OPENAI_BACKGROUND_TASK_DOCS.DM: background requires store=true; supports streaming resume via response.id + sequence_number.

- Default behavior unchanged for non-background models; no breaking changes.
2025-12-09 18:38:13 -07:00
Hannes Rudolph
d73bdf36d7 revert: per-model disableTimeout implementation; remove flag from gpt-5-pro model entry (server-side timeouts). Prep for background mode approach. 2025-12-09 18:30:16 -07:00
Hannes Rudolph
9ecd7bb1ec feat(openai-models): add gpt-5-pro-2025-10-06 with timeout disabled and non‑streaming notice
- Add GPT‑5 Pro to model registry with:
  - contextWindow: 400k, maxTokens: 272k
  - supportsImages: true, supportsPromptCache: true, supportsVerbosity: true, supportsTemperature: false
  - reasoningEffort: high (Responses API only)
  - pricing: $15/1M input tokens, $120/1M output tokens
- Set disableTimeout: true to avoid requiring a global timeout override
- Description clarifies: this is a slow, reasoning‑focused model designed for tough problems; requests may take several minutes; it does not stream (UI may appear idle until completion)
2025-12-09 18:30:02 -07:00
Hannes Rudolph
84f58cd518 feat(models): add per-model timeout disable to avoid global override for long-running models (e.g., gpt-5-pro)
- Introduce ModelInfo.disableTimeout to opt out of request timeouts on a per-model basis
- Apply in OpenAI-compatible, Ollama, and LM Studio providers (timeout=0 when flag is true)
- Preserve global “API Request Timeout” behavior (0 still disables globally); per-model flag takes precedence for that model
- Motivation: gpt-5-pro often requires longer runtimes; per-model override avoids forcing a global setting that impacts all models
- Add/extend unit tests to validate provider behavior
2025-12-09 18:29:12 -07:00
Daniel
24eb6ae984
feat: add API error telemetry to OpenRouter provider (#9953)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-09 16:30:29 -08:00
Hannes Rudolph
29d6f6d281
fix: always show tool protocol selector for openai-compatible (#9966) 2025-12-09 16:22:58 -08:00
Matt Rubens
ada7411cd3
Tweaks to baseten model definitions (#9866) 2025-12-09 16:17:52 -08:00
Matt Rubens
721b02e58c
Add a way to save screenshots from the browser tool (#9963)
* Add a way to save screenshots from the browser tool

* fix: use cross-platform paths in BrowserSession screenshot tests

* fix: validate screenshot paths to prevent filesystem escape

---------

Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-09 16:12:36 -08:00
Hannes Rudolph
1898848d95
feat(deepseek): update DeepSeek models to V3.2 with new pricing (#9962)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
2025-12-09 15:46:04 -08:00
Hannes Rudolph
4608c979e0
fix: return undefined instead of 0 for disabled API timeout (#9960) 2025-12-09 15:32:26 -07:00
Matt Rubens
0068d1fee3
Revert "feat: change defaultToolProtocol default from xml to native" (#9956) 2025-12-09 13:09:28 -08:00
Hannes Rudolph
83787a76ef
feat(roo): add versioned settings support with minPluginVersion gating (#9934) 2025-12-09 12:54:15 -08:00
Hannes Rudolph
f89a6bef30
fix: display actual API error message instead of generic text on retry (#9954) 2025-12-09 12:53:20 -08:00
Hannes Rudolph
e142906e7d
feat: add announcement support CTA and social icons (#9945) 2025-12-09 11:09:15 -08:00
Bruno Bergher
8a98f140dc
feat: Make Architect save to /plans and gitignore it (#9944)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-09 06:51:43 -08:00
Hannes Rudolph
c103a4a639
feat: streaming tool stats + token usage throttling (#9926)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-12-08 19:40:12 -08:00
roomote[bot]
54a52655ac
feat: forbid time estimates in architect mode (#9931)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-08 19:06:07 -08:00
Matt Rubens
5bde2e52de
Remove defaultTemperature from Roo provider configuration (#9932)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-08 18:31:49 -08:00
Daniel
2efebf5da9
fix: add finish_reason processing to xai.ts provider (#9929) 2025-12-08 18:03:40 -08:00
Dennise Bartlett
3356267aa0
Add timeout to OpenAI Compatible Provider Client (#9898) 2025-12-08 17:36:53 -08:00
Hannes Rudolph
de00ab10e2
refactor: consolidate ThinkingBudget components and fix disable handling (#9930) 2025-12-08 17:23:49 -08:00
Matt Rubens
93a43e427e
Try to make OpenAI errors more useful (#9639) 2025-12-08 17:21:29 -08:00
roomote[bot]
375c103bd3
fix: exclude apply_diff from native tools when diffEnabled is false (#9920)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-08 17:20:44 -08:00
Daniel
ee48b3a1ae
fix: suppress 'ask promise was ignored' error in handleError (#9914) 2025-12-08 17:19:45 -08:00
Daniel
88a0bed27f
fix: process finish_reason to emit tool_call_end events (#9927) 2025-12-08 13:27:55 -08:00
Hannes Rudolph
754b701cc8
feat: configure tool preferences for xAI models (#9923) 2025-12-08 11:33:55 -08:00
Chris Estreich
6f602fc88e
Improve cloud job error logging for RCC provider errors (#9924) 2025-12-08 11:15:34 -08:00
Hannes Rudolph
fba8508b10
feat: add search_replace native tool for single-replacement operations (#9918)
Adds a new search_replace tool that performs a single search and replace
operation on a file, requiring the old_string to uniquely identify the
target text with 3-5 lines of context.

Parameters:
- file_path: Path to file (relative or absolute)
- old_string: Text to find (must be unique in file)
- new_string: Replacement text (must differ from old_string)
2025-12-08 10:45:55 -08:00
Andrew Ginns
efbf427631
feat: add xhigh reasoning effort for gpt-5.1-codex-max (#9900)
* feat: add xhigh reasoning effort for gpt-5.1-codex-max

* fix: Address openai-native.spec.ts test failure

* chore: Localisation of 'Extra high'

* chore: revert unrelated CustomModesManager refactoring

---------

Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
2025-12-08 10:17:25 -08:00
Hannes Rudolph
1370cb04f7
fix: use foreground color for context-management icons (#9912) 2025-12-08 08:17:47 -07:00
roomote[bot]
bea7626a9d
fix: add Kimi, MiniMax, and Qwen model configurations for Bedrock (#9905)
* fix: add Kimi, MiniMax, and Qwen model configurations for Bedrock

- Add moonshot.kimi-k2-thinking with 32K max tokens and 256K context
- Add minimax.minimax-m2 with 16K max tokens and 230K context
- Add qwen.qwen3-next-80b-a3b with 8K max tokens and 262K context
- Add qwen.qwen3-coder-480b-a35b-v1:0 with 8K max tokens and 262K context

All models configured with native tool support and appropriate pricing.

Fixes #9902

* fix: add preserveReasoning flag and update Kimi K2 context window

- Added preserveReasoning: true to moonshot.kimi-k2-thinking model
- Added preserveReasoning: true to minimax.minimax-m2 model
- Updated Kimi K2 context window from 256_000 to 262_144

These changes ensure:
1. Reasoning traces are properly preserved for both models
2. Roo correctly recognizes task completion
3. Tool calls within reasoning traces are handled appropriately
4. Context window matches AWS Console specification

* fix: update MiniMax M2 context window to 196_608 for Bedrock

Based on AWS CLI testing, the actual context window limit for MiniMax M2
on Bedrock is 196,608 tokens, not 230,000 as initially configured.

* Update packages/types/src/providers/bedrock.ts

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
2025-12-08 10:16:43 -05:00
Matt Rubens
1f7e1ee630
Make eval runs deleteable (#9909) 2025-12-07 23:30:28 -05:00
Hannes Rudolph
8aa13467d3
Refactor: Unified context-management architecture with improved UX (#9795)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-12-07 17:43:48 -05:00
roomote[bot]
946fd0390f
feat: change defaultToolProtocol default from xml to native (#9892)
* feat: change defaultToolProtocol to default to native instead of xml

* fix: add missing getMcpHub mock to Subtask Rate Limiting tests

---------

Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-06 11:51:16 -05:00
Matt Rubens
2eae32104e
Default to using native tools when supported on openrouter (#9878) 2025-12-05 23:01:33 -05:00
Matt Rubens
4a5cbcba86
Stop making count_tokens requests (#9884) 2025-12-05 22:53:35 -05:00
Daniel
dd92453276
refactor: decouple tools from system prompt (#9784) 2025-12-05 16:26:47 -05:00