Skip to content

Conversation

@Artuomka
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 23, 2026 13:16
@Artuomka Artuomka enabled auto-merge January 23, 2026 13:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request implements version 3 of the AI table request handling endpoint, which introduces AWS Bedrock as an AI provider alongside the existing OpenAI-based v2 endpoint. The PR also refactors the Bedrock provider's tool call argument handling to fix partial JSON accumulation issues.

Changes:

  • Added v3 AI request endpoint (/ai/v3/request/:connectionId) that explicitly uses AWS Bedrock as the AI provider
  • Refactored Bedrock provider's tool call handling to accumulate arguments as strings before parsing, preventing partial JSON parsing errors
  • Updated timeout interceptor to support the new v3 endpoint with the same extended timeout as v2

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
backend/src/interceptors/timeout.interceptor.ts Updated to include v3 endpoint in AI endpoint list; improved from url.includes to path.startsWith for more precise matching
backend/src/entities/ai/user-ai-requests-v2.controller.ts Added new v3 endpoint handler that uses the V6 use case implementation with Bedrock provider
backend/src/entities/ai/use-cases/request-info-from-table-with-ai-v6.use.case.ts New use case implementation that explicitly uses Bedrock provider and builds full conversation history (vs. OpenAI Responses API pattern in V5)
backend/src/entities/ai/ai.module.ts Registered V6 use case as provider for V3 token and added v3 endpoint to authentication middleware
backend/src/common/data-injection.tokens.ts Added REQUEST_INFO_FROM_TABLE_WITH_AI_V3 token for dependency injection
backend/src/ai-core/providers/langchain-bedrock.provider.ts Fixed tool call argument handling by accumulating as string before parsing, preventing partial JSON merge issues

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +38 to +39
@Inject(UseCaseType.REQUEST_INFO_FROM_TABLE_WITH_AI_V3)
private readonly requestInfoFromTableWithAIUseCaseV3: IRequestInfoFromTableV2,
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

The injected use case V3 is typed as IRequestInfoFromTableV2, which suggests a naming inconsistency. Since this is version 3 of the endpoint using version 6 of the use case, consider either creating a new interface IRequestInfoFromTableV3 or renaming the existing interface to be more generic (e.g., IRequestInfoFromTable). This would make the codebase more maintainable and less confusing.

Copilot uses AI. Check for mistakes.
@Artuomka Artuomka merged commit 5291568 into main Jan 23, 2026
25 checks passed
@Artuomka Artuomka deleted the backend_langchain branch January 23, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants