Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 17, 2025

Related GitHub Issue

Closes: #10165

Description

This PR adds the userAgentAppId configuration to the BedrockRuntimeClient in the code indexing embedder, matching the implementation pattern already used in the main Bedrock API provider at src/api/providers/bedrock.ts:255.

Key changes:

  • Added import for Package from ../../../shared/package
  • Added userAgentAppId: \RooCode#${Package.version}`` to the BedrockRuntimeClient configuration

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

Test Procedure

  1. Ran existing bedrock embedder tests: cd src && npx vitest run services/code-index/embedders/__tests__/bedrock.spec.ts - all 25 tests pass
  2. Ran TypeScript type checking: cd src && npx tsc --noEmit --skipLibCheck - no errors
  3. All linters pass

To verify the fix:

  1. Enable Codebase Indexing
  2. Set up Amazon Bedrock as the embedding provider
  3. Observe the userAgent field in CloudTrail AWS requests - should now include app/RooCode#X.X.X

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Documentation Updates

  • No documentation updates are required.

Additional Notes

This is a simple two-line fix that matches the existing pattern used in the main Bedrock provider. Feedback and guidance are welcome.


Important

Adds userAgentAppId to BedrockRuntimeClient in bedrock.ts for user agent identification in AWS requests.

  • Behavior:
    • Adds userAgentAppId: RooCode#${Package.version}toBedrockRuntimeClientinbedrock.ts` for user agent identification in AWS requests.
  • Imports:
    • Adds import for Package from ../../../shared/package in bedrock.ts.

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

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
@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR correctly adds userAgentAppId to the BedrockRuntimeClient in the code indexing embedder, following the same pattern already established in src/api/providers/bedrock.ts.

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

@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Dec 17, 2025
@hannesrudolph hannesrudolph marked this pull request as ready for review December 17, 2025 23:26
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Dec 17, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Dec 17, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found.

This PR correctly adds userAgentAppId to the BedrockRuntimeClient in the code indexing embedder, following the same pattern already established in src/api/providers/bedrock.ts.

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

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 18, 2025
@mrubens mrubens merged commit f899de1 into main Dec 18, 2025
31 checks passed
@mrubens mrubens deleted the fix/bedrock-embedder-useragent-appid branch December 18, 2025 01:20
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 18, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Dec 18, 2025
@cte cte mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Preliminary Review size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG] userAgentAppId missing from Code Indexing Bedrock Embedder

4 participants