The pendingNewTaskToolCallId was being set AFTER startSubtask() returned.
However, startSubtask() contains a 500ms delay during which the subtask
could complete. If the subtask completed during this window, completeSubtask()
would be called before pendingNewTaskToolCallId was set, causing it to
fall through to the XML protocol path and add a text message instead of
a proper tool_result block, breaking the API conversation structure.
This fix moves the pendingNewTaskToolCallId assignment to happen BEFORE
calling startSubtask(), ensuring the ID is set before the subtask starts.
If the subtask creation fails, the pending ID is cleared.
* feat: add AWS Bedrock support for codebase indexing
- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support
Closes#8658
* fix: add missing bedrockOptions to loadConfiguration return type
* Fix various issues that the original PR missed.
* Remove debug logs
* Rename AWS Bedrock -> Amazon Bedrock
* Remove some 'as any's
* Revert README changes
* Add translations
* More translations
* Remove leftover code from a debugging session.
* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override
- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues
* Improvements to AWS Bedrock embeddings support
- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies
* Restore openrouter config
* Remove debug log
* Fix config-manager.spec.ts unit test.
* Add translations for "optional"
* Revert unnecessary change related to open ia embedder
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.
Fixes#9567
Co-authored-by: Roo Code <roomote@roocode.com>