Skip to content

Commit 31d1744

Browse files
mini2smrubensroomoteroomote-v0[bot]hannesrudolph
authored
Roo to main (#845)
* Remove defaultTemperature from Roo provider configuration (#9932) Co-authored-by: Roo Code <roomote@roocode.com> * feat: forbid time estimates in architect mode (#9931) Co-authored-by: Roo Code <roomote@roocode.com> * feat: streaming tool stats + token usage throttling (#9926) Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * 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> * feat: add announcement support CTA and social icons (#9945) * fix: display actual API error message instead of generic text on retry (#9954) * feat(roo): add versioned settings support with minPluginVersion gating (#9934) * Revert "feat: change defaultToolProtocol default from xml to native" (#9956) * fix: return undefined instead of 0 for disabled API timeout (#9960) * feat(deepseek): update DeepSeek models to V3.2 with new pricing (#9962) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> * 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> * Tweaks to baseten model definitions (#9866) * fix: always show tool protocol selector for openai-compatible (#9966) * feat: add API error telemetry to OpenRouter provider (#9953) Co-authored-by: Roo Code <roomote@roocode.com> * fix: validate and fix tool_result IDs before API requests (#9952) Co-authored-by: cte <cestreich@gmail.com> Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Hannes Rudolph <hrudolph@gmail.com> * fix: respect explicit supportsReasoningEffort array values (#9970) * v3.36.3 (#9972) * fix(activate): unify webview panel identifier to use consistent tabPanelId * feat(gemini): add minimal and medium reasoning effort levels (#9973) Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: cte <cestreich@gmail.com> * Delete changeset files (#9977) * Add missing release notes for v3.36.3 (#9979) * feat: add error details modal with on-demand display (#9985) * feat: add error details modal with on-demand display - Add errorDetails prop to ErrorRow component - Show Info icon on hover in error header when errorDetails is provided - Display detailed error message in modal dialog on Info icon click - Add Copy to Clipboard button in error details modal - Update generic error case to show localized message with details on demand - Add i18n translations for error details UI * UI Tweaks * Properly handles error details * i18n * Lighter visual treatment for errors --------- Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Bruno Bergher <bruno@roocode.com> * Fix: Correct TODO list display order in chat view (ROO-107) (#9991) Co-authored-by: Roo Code <roomote@roocode.com> * fix: prevent premature rawChunkTracker clearing for MCP tools (#9993) * fix: filter out 429 rate limit errors from API error telemetry (#9987) Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: cte <cestreich@gmail.com> * Release v3.36.4 (#9994) * Changeset version bump (#9995) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * feat(telemetry): add app version to exception captures and filter 402 errors (#9996) Co-authored-by: cte <cestreich@gmail.com> * Remove Glama provider (#9801) * @roo-code/types v1.90.0 (#9998) * fix: apply versioned settings on nightly builds (#9997) * feat: add toggle for Enter key behavior in chat input (#10002) * chore: remove list_code_definition_names tool (#10005) Co-authored-by: cte <cestreich@gmail.com> * Update roomotes.yml (#10008) * fix: add general API endpoints for Z.ai provider (#9894) Co-authored-by: Roo Code <roomote@roocode.com> * fix: handle empty Gemini responses and reasoning loops (#10007) * fix: add missing tool_result blocks to prevent API errors (#10015) * feat: add gpt-5.2 model to openai-native provider (#10024) * test: update built-in commands count to 9 * fix: filter orphaned tool_results when more results than tool_uses (#10027) * Release v3.36.5 (#10029) * Changeset version bump (#10032) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * fix: merge settings and versionedSettings for Roo provider models (#10030) * Revert "fix: merge settings and versionedSettings for Roo provider models" (#10034) * Revert the 3.6.5 release (we halted it) (#10036) * Release v3.36.5 (#10037) * Changeset version bump (#10038) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * test: adjust terminal count limits in TerminalRegistry tests * ux: improve auto-approve timer visibility in follow-up suggestions (#10048) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: Roo Code <roomote@roocode.com> * fix: cancel auto-approval timeout when user starts typing (#9937) Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * fix: extract raw error message from OpenRouter metadata (#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 (#9989) Co-authored-by: Hannes Rudolph <hrudolph@gmail.com> * fix: show tool protocol dropdown for LiteLLM provider (#10053) * feat: add WorkspaceTaskVisibility type for organization cloud settings (#10020) * feat: add WorkspaceTaskVisibility type and workspaceTaskVisibility property to OrganizationCloudSettings * refactor: create workspaceTaskVisibilitySchema and derive WorkspaceTaskVisibility type from it --------- Co-authored-by: Roo Code <roomote@roocode.com> * Release: v1.91.0 (#10055) chore: bump version to v1.91.0 * feat: sanitize MCP server/tool names for API compatibility (#10054) * Release v3.36.6 (#10057) * Changeset version bump (#10058) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * fix: use JavaScript-based hover for checkpoint menu visibility (#10056) * feat: remove auto-approve toggles for to-do and retry actions (#10062) * feat(openrouter): add improvements to openrouter provider (#10082) * feat: Add Amazon Nova 2 Lite model to Bedrock provider (#9830) Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * feat: add AWS Bedrock service tier support (#9955) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * Capture more of OpenRouter's provider specific error details (#10073) * Capture more of OpenRouter's provider specific error details * Actually match the openrouter structure * feat(web-evals): improve run logs and formatters (#10081) * Move isToolAllowedForMode out of shared directory (#10089) * chore: add changeset for v3.36.7 (#10091) * Changeset version bump (#10092) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * fix: prevent duplicate MCP tools error by deduplicating servers at source (#10096) * feat: add metadata to error details dialog (#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 <roomote@roocode.com> Co-authored-by: Bruno Bergher <bruno@roocode.com> * web: Fixes link to provider pricing page (#10107) * feat(read-file): implement incremental token-budgeted file reading (#10052) * Add config to control public sharing (#10105) Co-authored-by: Roo Code <roomote@roocode.com> * Release: v1.92.0 (#10116) * Remove the description from bedrock service tiers (#10118) * feat: remove strict ARN validation for Bedrock custom ARN users (#10110) Co-authored-by: Roo Code <roomote@roocode.com> * fix: prevent race condition from deleting wrong API messages (#10113) Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com> * feat(anthropic): enable native tools by default and add telemetry tracking (#10021) * feat: enable native tools by default for multiple providers (#10059) * Release v3.36.8 (#10119) * fix: add additionalProperties: false to nested MCP tool schemas (#10109) * fix: normalize tool call IDs for cross-provider compatibility via OpenRouter (#10102) * feat: add full error details to streaming failure dialog (#10131) Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: cte <cestreich@gmail.com> * fix: validate tool_result IDs in delegation resume flow (#10135) * feat(evals): improve evals UI with tool groups and duration fix (#10133) Co-authored-by: Roo Code <roomote@roocode.com> * Changeset version bump (#10120) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Release v3.36.9 (#10138) * Changeset version bump (#10137) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * fix: correct token counting for context truncation display (#9961) * feat(deepseek): implement interleaved thinking mode for deepseek-reasoner (#9969) * Update next.js to ~15.2.8 (#10140) * fix(deepseek): preserve reasoning_content during tool call sequences (#10141) Co-authored-by: Roo Code <roomote@roocode.com> * feat: add gemini-3-flash-preview model (#10151) * Release v3.36.10 (#10153) * Changeset version bump (#10154) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * fix(bedrock): convert tool_result to XML text when native tools disabled (#10155) * fix: remove dots and colons from MCP tool names for Bedrock compatibility (#10152) * fix: improve terminal process error handling and abort operation * fix(ROO-202): refresh Roo models cache with session token on auth state change (#10156) * fix: support AWS GovCloud and China region ARNs in Bedrock provider (#10157) Co-authored-by: Roo Code <roomote@roocode.com> * feat: enable native tool calling by default for Z.ai models (#10158) Co-authored-by: Roo Code <roomote@roocode.com> * [feat] Claude Code Provider Native Tool Calling (#10077) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> * fix: normalize MCP tool schemas for Bedrock and OpenAI strict mode (#10148) * fix: enable native tools by default for OpenAI compatible provider (#10159) * Release v3.36.11 (#10161) * Changeset version bump (#10162) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * feat(telemetry): extract error messages from JSON payloads for better PostHog grouping (#10163) * fix: add userAgentAppId to Bedrock embedder for code indexing (#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 #10165 Co-authored-by: Roo Code <roomote@roocode.com> * feat: update OpenAI and Gemini tool preferences (#10170) * Release v3.36.12 (#10181) * Changeset version bump (#10182) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * Revert "Revert "feat: change defaultToolProtocol default from xml to native"" (#10186) Co-authored-by: Roo Code <roomote@roocode.com> * fix(litellm): merge default model info with router models for NTC support (#10187) * feat(types): add defaultToolProtocol: native to providers - Added supportsNativeTools: true and defaultToolProtocol: native to all chutes models - Added defaultToolProtocol: native to moonshot models (already had supportsNativeTools) - Added defaultToolProtocol: native to litellm default model (already had supportsNativeTools) - Added defaultToolProtocol: native to minimax models (already had supportsNativeTools) This enables native tool calling by default for these providers, reducing the number of users falling back to XML tool protocol unnecessarily. * fix(litellm): merge only native tool defaults with router models Only merges supportsNativeTools and defaultToolProtocol from litellmDefaultModelInfo, not prices or other model-specific info that could be incorrect for different models. * Release: v1.93.0 (#10190) * feat(vscode-lm): add native tool support (#10191) * feat: Replace edit_file tool alias with edit_file tool (#9983) * feat: lock task tool protocol for consistent task resumption (#10192) Co-authored-by: Roo Code <roomote@roocode.com> * feat(telemetry): add PostHog exception tracking for consecutive mistake errors (#10193) * Release v3.36.13 (#10194) * Changeset version bump (#10195) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * feat: improve 'no tools used' error handling with grace retry (#10196) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * feat(vertex): add native tool calling for Claude models on Vertex AI (#10197) Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com> * fix: strip unsupported JSON Schema format values for OpenAI compatibility (#10198) * Release v3.36.14 (#10200) * Changeset version bump (#10201) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * feat(telemetry): add telemetry event handling through webview messages * fix: refresh models button not flushing cache properly (#9870) * feat(vertex): add 1M context window beta support for Claude Sonnet 4 (#10209) * feat(providers): add native tool calling support to LM Studio and Qwen-Code (#10208) * ux: improve API error handling and visibility (#10204) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com> * ux: add downloadable error diagnostics from chat errors (#10188) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * feat: merge native tool defaults for openai-compatible provider (#10213) * fix: force additionalProperties false for strict mode compatibility (#10210) * fix: enable native tool calls for Requesty provider (ROO-235) (#10211) * Release v3.36.15 (#10218) * Changeset version bump (#10219) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <cestreich@gmail.com> * fix: normalize tool schemas for VS Code LM API to fix error 400 (#10221) * Release v3.36.16 (#10224) * Changeset version bump (#10225) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * Custom tool calling (#10083) * Remove the "test" custom tools (#10255) Co-authored-by: Roo Code <roomote@roocode.com> * Add custom tool definitions to @roo-code/types (#10233) Co-authored-by: Roo Code <roomote@roocode.com> * fix(evals): add missing packages/core to Dockerfile.runner (#10272) * feat: add Cloud Team page with comprehensive team features (#10267) * feat: add Cloud Team page with features and pricing integration * Copy tweaks * Visual tweaks * Content adjustments * Update apps/web-roo-code/src/app/cloud/team/page.tsx Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> --------- Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: Bruno Bergher <bruno@roocode.com> Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> * feat: remove parallel_tool_calls parameter from litellm provider (#10274) Co-authored-by: Roo Code <roomote@roocode.com> * feat(build): add types package bundling and alias support * update(settings): change default tool protocol to XML * fix: enable Requesty refresh models with credentials (#10273) * fix: disable strict mode for MCP tools to preserve optional parameters (#10220) Co-authored-by: Roo Code <roomote@roocode.com> * fix: move array-specific properties into anyOf variant in normalizeToolSchema (#10276) * fix: move array-specific properties into anyOf variant in normalizeToolSchema Fixes read_file tool schema rejection with GPT-5-mini which requires items property to be inside the { type: 'array' } variant when using anyOf for nullable arrays. Resolves ROO-262 * refactor: extract array-specific properties constant and helper function * refactor(custom-tools): improve tool loading and instance consistency * fix(chutes): add graceful fallback for model parsing (#10279) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> * fix: emit tool_call_end events in OpenAI handler when streaming ends (#10280) * feat(core): add support for custom tool parsing in AssistantMessageParser * Merge remote-tracking branch 'upstream/main' into roo-to-main * feat: deprecate XML tool protocol selection, force native for new tasks (#10281) - Disable tool protocol selector UI in ApiOptions.tsx - Force native protocol for all new tasks in resolveToolProtocol() - Keep locked protocol support for resumed tasks that used XML - Remove models without supportsNativeTools: true from providers: - baseten.ts: removed 6 models - bedrock.ts: removed 2 embedding models - featherless.ts: removed 3 models, updated default - groq.ts: removed 5 models - sambanova.ts: removed 2 models - vertex.ts: removed 7 models - vercel-ai-gateway.ts: added supportsNativeTools: true - Update tests to expect native format output * feat(zai): add GLM-4.7 model with thinking mode support (#10282) Co-authored-by: Roo Code <roomote@roocode.com> * fix: improve reasoning_details accumulation and serialization (#10285) * feat(evals): add message log deduper utility (#10286) * feat(minimax): move environment_details to system message for thinking models (#10284) * fix: add CRLF line ending normalization to search_replace and search_and_replace tools (#10288) - Normalize file content to LF after reading to ensure consistent matching - Normalize search/replace strings to handle CRLF from model output - Add comprehensive CRLF normalization tests for both tools - Consistent with existing edit_file tool behavior * refactor(zai): merge environment_details into tool result instead of system message (#10289) * fix: emit tool_call_end events in BaseOpenAiCompatibleProvider (#10293) * fix: preserve reasoning_content in condense summary for DeepSeek-reasoner (#10292) * Release v3.37.0 (#10295) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Changeset version bump (#10296) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * feat: enable mergeToolResultText for Roo Code Cloud provider (#10301) * feat: add grace retry for empty assistant messages (#10297) Implements grace retry error handling for 'no assistant messages' API errors, following the same pattern as PR #10196 for 'no tools used'. - Add consecutiveNoAssistantMessagesCount counter to Task.ts - First failure: silent retry (grace retry) - After 2+ consecutive failures: show MODEL_NO_ASSISTANT_MESSAGES error - Add UI handling in ChatRow.tsx with ErrorRow component - Add localized strings to all 18 locale files - Add comprehensive tests for the grace retry behavior * Release: v1.95.0 (#10309) chore: bump version to v1.95.0 * feat(prompts): strengthen native tool-use guidance (#10311) * feat: enable mergeToolResultText for all OpenAI-compatible providers (#10299) * fix: preserve reasoning_details shape to prevent malformed responses (#10313) * fix(task): drain queued messages while waiting for ask (#10315) * fix(openai): send native tool definitions by default (#10314) Co-authored-by: Roo Code <roomote@roocode.com> * ux: Provider-centric signup (#10306) Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * chore: add changeset for v3.37.1 (#10316) * Changeset version bump (#10317) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> * refactor: simplify tool protocol resolution logic * refactor: optimize stream rendering and file reading limits * refactor(tools): simplify extractTextFromFile parameters * feat(chat): add tool protocol display to task header * fix(test): respect user toolProtocol preference over model capabilities * update(provider): update zgsm model handling and native tool protocol logic * feat: remove OpenRouter Transforms feature (#10341) - Remove openRouterUseMiddleOutTransform checkbox from settings UI - Remove openRouterUseMiddleOutTransform from TypeScript types - Remove transforms parameter logic from OpenRouter handler - Remove setting from EVALS_SETTINGS - Remove translation keys from all locale files (18 locales) Co-authored-by: Roo Code <roomote@roocode.com> * feat: remove simpleReadFileTool completely (#10254) - Delete simpleReadFileTool.ts file - Delete simple-read-file.ts prompt description file - Delete single-file-read-models.ts types file - Remove imports and usage from presentAssistantMessage.ts - Remove imports and usage from prompts/tools/index.ts - Remove export from packages/types/src/index.ts This removes all traces of the legacy single-file read tool implementation that was used for specific models. All models now use the standard read_file tool. Co-authored-by: Roo Code <roomote@roocode.com> --------- Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com> Co-authored-by: Roo Code <roomote@roocode.com> Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: Hannes Rudolph <hrudolph@gmail.com> Co-authored-by: Bruno Bergher <bruno@roocode.com> Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com> Co-authored-by: cte <cestreich@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: John Richmond <5629+jr@users.noreply.github.com> Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com> Co-authored-by: Patrick Decat <pdecat@gmail.com>
1 parent 0aa9040 commit 31d1744

File tree

19 files changed

+128
-488
lines changed

19 files changed

+128
-488
lines changed

packages/types/src/global-settings.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ export const isGlobalStateKey = (key: string): key is Keys<GlobalState> =>
310310
// Default settings when running evals (unless overridden).
311311
export const EVALS_SETTINGS: RooCodeSettings = {
312312
apiProvider: "openrouter",
313-
openRouterUseMiddleOutTransform: false,
314313
zgsmCodeMode: "vibe",
315314
lastShownAnnouncementId: "jul-09-2025-3-23-0",
316315

packages/types/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export * from "./message.js"
1818
export * from "./mode.js"
1919
export * from "./model.js"
2020
export * from "./provider-settings.js"
21-
export * from "./single-file-read-models.js"
2221
export * from "./task.js"
2322
export * from "./todo.js"
2423
export * from "./telemetry.js"

packages/types/src/provider-settings.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ const openRouterSchema = baseProviderSettingsSchema.extend({
222222
openRouterModelId: z.string().optional(),
223223
openRouterBaseUrl: z.string().optional(),
224224
openRouterSpecificProvider: z.string().optional(),
225-
openRouterUseMiddleOutTransform: z.boolean().optional(),
226225
})
227226

228227
const bedrockSchema = apiModelIdProviderModelSchema.extend({

packages/types/src/single-file-read-models.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/api/providers/__tests__/openrouter.spec.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -308,38 +308,11 @@ describe("OpenRouterHandler", () => {
308308
stream_options: { include_usage: true },
309309
temperature: 0,
310310
top_p: undefined,
311-
transforms: ["middle-out"],
312311
}),
313312
{ headers: { "x-anthropic-beta": "fine-grained-tool-streaming-2025-05-14" } },
314313
)
315314
})
316315

317-
it("supports the middle-out transform", async () => {
318-
const handler = new OpenRouterHandler({
319-
...mockOptions,
320-
openRouterUseMiddleOutTransform: true,
321-
})
322-
const mockStream = {
323-
async *[Symbol.asyncIterator]() {
324-
yield {
325-
id: "test-id",
326-
choices: [{ delta: { content: "test response" } }],
327-
}
328-
},
329-
}
330-
331-
const mockCreate = vitest.fn().mockResolvedValue(mockStream)
332-
;(OpenAI as any).prototype.chat = {
333-
completions: { create: mockCreate },
334-
} as any
335-
336-
await handler.createMessage("test", []).next()
337-
338-
expect(mockCreate).toHaveBeenCalledWith(expect.objectContaining({ transforms: ["middle-out"] }), {
339-
headers: { "x-anthropic-beta": "fine-grained-tool-streaming-2025-05-14" },
340-
})
341-
})
342-
343316
it("adds cache control for supported models", async () => {
344317
const handler = new OpenRouterHandler({
345318
...mockOptions,

src/api/providers/openrouter.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
293293
}
294294
}
295295

296-
const transforms = (this.options.openRouterUseMiddleOutTransform ?? true) ? ["middle-out"] : undefined
297-
298296
// https://openrouter.ai/docs/transforms
299297
const completionParams: OpenRouterChatCompletionParams = {
300298
model: modelId,
@@ -313,7 +311,6 @@ export class OpenRouterHandler extends BaseProvider implements SingleCompletionH
313311
allow_fallbacks: false,
314312
},
315313
}),
316-
...(transforms && { transforms }),
317314
...(reasoning && { reasoning }),
318315
...(metadata?.tools && { tools: this.convertToolsForOpenAI(metadata.tools) }),
319316
...(metadata?.tool_choice && { tool_choice: metadata.tool_choice }),

src/api/providers/zgsm.ts

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,6 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
554554
finishReason?: ChatCompletionChunk.Choice["finish_reason"]
555555
activeToolCallIds?: Set<string>
556556
}
557-
558557
// chunk
559558
for await (const chunk of stream) {
560559
// Check if request was aborted
@@ -580,29 +579,40 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
580579
) {
581580
const batchedContent = contentBuffer.join("")
582581
for (const processedChunk of matcher.update(batchedContent)) {
582+
if (this.abortController?.signal.aborted) {
583+
break
584+
}
585+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
586+
isDev &&
587+
this.logger.info(
588+
`[ResponseID ${this.options.zgsmModelId} sse rendering]:`,
589+
requestId,
590+
batchedContent,
591+
)
583592
yield processedChunk
584593
}
585594
contentBuffer.length = 0 // Clear buffer
586-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
587-
isDev &&
588-
this.logger.info(
589-
`[ResponseID ${this.options.zgsmModelId} sse rendering]:`,
590-
requestId,
591-
batchedContent,
592-
)
595+
593596
time = now
594597
}
595598
}
596599

597600
// Process reasoning content
598601
if ("reasoning_content" in delta && delta.reasoning_content) {
602+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
603+
isDev &&
604+
this.logger.warn(
605+
`[ResponseID ${this.options.zgsmModelId} sse "reasoning_content":`,
606+
requestId,
607+
delta.reasoning_content,
608+
)
599609
yield {
600610
type: "reasoning",
601-
text: (delta.reasoning_content as string | undefined) || "",
611+
text: delta.reasoning_content as string,
602612
}
603613
}
604614

605-
yield* this.processToolCalls(delta, finishReason, activeToolCallIds, contentBuffer.length > 0)
615+
yield* this.processToolCalls(delta, finishReason, activeToolCallIds, requestId, contentBuffer.length > 0)
606616

607617
// Cache usage information
608618
if (chunk.usage) {
@@ -618,25 +628,25 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
618628
// Process remaining content
619629
if (contentBuffer.length > 0) {
620630
const remainingContent = contentBuffer.join("")
621-
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
622-
isDev &&
623-
this.logger.info(
624-
`[ResponseID ${this.options.zgsmModelId} sse render end]:`,
625-
requestId,
626-
remainingContent,
627-
)
628631
for (const processedChunk of matcher.update(remainingContent)) {
632+
if (this.abortController?.signal.aborted) {
633+
break
634+
}
629635
yield processedChunk
630636
}
631637
contentBuffer.length = 0 // Clear buffer
632-
yield* this.processToolCalls(lastDeltaInfo.delta, lastDeltaInfo.finishReason, activeToolCallIds)
638+
yield* this.processToolCalls(lastDeltaInfo.delta, lastDeltaInfo.finishReason, activeToolCallIds, requestId)
633639
}
634640

635641
// Output final results
636642
for (const chunk of matcher.final()) {
643+
if (this.abortController?.signal.aborted) {
644+
break
645+
}
637646
yield chunk
638647
}
639-
648+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
649+
isDev && this.logger.info(`[ResponseID ${this.options.zgsmModelId} sse render end]:`, requestId)
640650
// Process usage metrics
641651
if (lastUsage) {
642652
yield this.processUsageMetrics(lastUsage, modelInfo)
@@ -666,6 +676,7 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
666676
delta: OpenAI.Chat.Completions.ChatCompletionChunk.Choice.Delta | undefined,
667677
finishReason: string | null | undefined,
668678
activeToolCallIds: Set<string>,
679+
requestId?: string,
669680
skip: boolean = false,
670681
): Generator<
671682
| { type: "tool_call_partial"; index: number; id?: string; name?: string; arguments?: string }
@@ -680,6 +691,14 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
680691
if (toolCall.id) {
681692
activeToolCallIds.add(toolCall.id)
682693
}
694+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
695+
isDev &&
696+
this.logger.warn(
697+
`[ResponseID ${this.options.zgsmModelId} sse "toolCall arguments":`,
698+
requestId,
699+
toolCall.function?.name,
700+
toolCall.function?.arguments,
701+
)
683702
yield {
684703
type: "tool_call_partial",
685704
index: toolCall.index,
@@ -892,6 +911,10 @@ export class ZgsmAiHandler extends BaseProvider implements SingleCompletionHandl
892911
}
893912

894913
private async *handleStreamResponse(stream: AsyncIterable<OpenAI.Chat.Completions.ChatCompletionChunk>): ApiStream {
914+
// Check if request was aborted
915+
if (this.abortController?.signal.aborted) {
916+
return
917+
}
895918
const activeToolCallIds = new Set<string>()
896919

897920
for await (const chunk of stream) {

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import { Task } from "../task/Task"
2020
import { fetchInstructionsTool } from "../tools/FetchInstructionsTool"
2121
import { listFilesTool } from "../tools/ListFilesTool"
2222
import { readFileTool } from "../tools/ReadFileTool"
23-
import { getSimpleReadFileToolDescription, simpleReadFileTool } from "../tools/simpleReadFileTool"
24-
import { shouldUseSingleFileRead, TOOL_PROTOCOL } from "@roo-code/types"
23+
import { TOOL_PROTOCOL } from "@roo-code/types"
2524
import { writeToFileTool } from "../tools/WriteToFileTool"
2625
import { applyDiffTool } from "../tools/MultiApplyDiffTool"
2726
import { searchAndReplaceTool } from "../tools/SearchAndReplaceTool"
@@ -369,18 +368,12 @@ export async function presentAssistantMessage(cline: Task) {
369368
case "execute_command":
370369
return `[${block.name} for '${block.params.command}']`
371370
case "read_file":
372-
// Check if this model should use the simplified description
373-
const modelId = cline.api.getModel().id
374-
if (shouldUseSingleFileRead(modelId)) {
375-
return getSimpleReadFileToolDescription(block.name, block.params)
376-
} else {
377-
// Prefer native typed args when available; fall back to legacy params
378-
// Check if nativeArgs exists (native protocol)
379-
if (block.nativeArgs) {
380-
return readFileTool.getReadFileToolDescription(block.name, block.nativeArgs)
381-
}
382-
return readFileTool.getReadFileToolDescription(block.name, block.params)
371+
// Prefer native typed args when available; fall back to legacy params
372+
// Check if nativeArgs exists (native protocol)
373+
if (block.nativeArgs) {
374+
return readFileTool.getReadFileToolDescription(block.name, block.nativeArgs)
383375
}
376+
return readFileTool.getReadFileToolDescription(block.name, block.params)
384377
case "fetch_instructions":
385378
return `[${block.name} for '${block.params.task}']`
386379
case "write_to_file":
@@ -931,29 +924,14 @@ export async function presentAssistantMessage(cline: Task) {
931924
})
932925
break
933926
case "read_file":
934-
// Check if this model should use the simplified single-file read tool
935-
// Only use simplified tool for XML protocol - native protocol works with standard tool
936-
const modelId = cline.api.getModel().id
937-
if (shouldUseSingleFileRead(modelId) && toolProtocol !== TOOL_PROTOCOL.NATIVE) {
938-
await simpleReadFileTool(
939-
cline,
940-
block,
941-
askApproval,
942-
handleError,
943-
pushToolResult,
944-
removeClosingTag,
945-
toolProtocol,
946-
)
947-
} else {
948-
// Type assertion is safe here because we're in the "read_file" case
949-
await readFileTool.handle(cline, block as ToolUse<"read_file">, {
950-
askApproval,
951-
handleError,
952-
pushToolResult,
953-
removeClosingTag,
954-
toolProtocol,
955-
})
956-
}
927+
// Type assertion is safe here because we're in the "read_file" case
928+
await readFileTool.handle(cline, block as ToolUse<"read_file">, {
929+
askApproval,
930+
handleError,
931+
pushToolResult,
932+
removeClosingTag,
933+
toolProtocol,
934+
})
957935
break
958936
case "fetch_instructions":
959937
await fetchInstructionsTool.handle(cline, block as ToolUse<"fetch_instructions">, {

src/core/prompts/responses.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ export const formatResponse = {
6262
return `Access to ${path} is blocked by the .rooignore file settings. You must try to continue in the task without using this file, or ask the user to update the .rooignore file.`
6363
},
6464

65-
noToolsUsed: (protocol?: ToolProtocol) => {
65+
noToolsUsed: (protocol?: ToolProtocol, preUserContent?: string, preAssistantMessage?: string) => {
6666
const instructions = getToolInstructionsReminder(protocol)
6767

6868
return `[ERROR] You did not use a tool in your previous response! Please retry with a tool use.
6969
70+
# Previous response history part of content
71+
${preUserContent ? `\nUser said: ${(preUserContent.length > 300 ? `${preUserContent.slice(0, 300)}...` : preUserContent).trim()}` : ""}
72+
${preAssistantMessage ? `\nAssistant said: ${(preAssistantMessage.length > 300 ? `${preAssistantMessage.slice(0, 300)}...` : preAssistantMessage).trim()}` : ""}
73+
7074
${instructions}
7175
7276
# Next Steps

src/core/prompts/tools/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { ToolName, ModeConfig } from "@roo-code/types"
2-
import { shouldUseSingleFileRead } from "@roo-code/types"
32

43
import { TOOL_GROUPS, ALWAYS_AVAILABLE_TOOLS, DiffStrategy } from "../../../shared/tools"
54
import { Mode, getModeConfig, getGroupName } from "../../../shared/modes"
@@ -12,7 +11,6 @@ import { CodeIndexManager } from "../../../services/code-index/manager"
1211
import { ToolArgs } from "./types"
1312
import { getExecuteCommandDescription } from "./execute-command"
1413
import { getReadFileDescription } from "./read-file"
15-
import { getSimpleReadFileDescription } from "./simple-read-file"
1614
import { getFetchInstructionsDescription } from "./fetch-instructions"
1715
import { getWriteToFileDescription } from "./write-to-file"
1816
import { getSearchFilesDescription } from "./search-files"
@@ -33,14 +31,7 @@ import { getGenerateImageDescription } from "./generate-image"
3331
// Map of tool names to their description functions
3432
const toolDescriptionMap: Record<string, (args: ToolArgs) => string | undefined> = {
3533
execute_command: (args) => getExecuteCommandDescription(args),
36-
read_file: (args) => {
37-
// Check if the current model should use the simplified read_file tool
38-
const modelId = args.settings?.modelId
39-
if (modelId && shouldUseSingleFileRead(modelId)) {
40-
return getSimpleReadFileDescription(args)
41-
}
42-
return getReadFileDescription(args)
43-
},
34+
read_file: (args) => getReadFileDescription(args),
4435
fetch_instructions: (args) => getFetchInstructionsDescription(args.settings?.enableMcpServerCreation),
4536
write_to_file: (args) => getWriteToFileDescription(args),
4637
search_files: (args) => getSearchFilesDescription(args),
@@ -164,7 +155,6 @@ export function getToolDescriptionsForMode(
164155
export {
165156
getExecuteCommandDescription,
166157
getReadFileDescription,
167-
getSimpleReadFileDescription,
168158
getFetchInstructionsDescription,
169159
getWriteToFileDescription,
170160
getSearchFilesDescription,

0 commit comments

Comments
 (0)