Skip to content

Conversation

@sestinj
Copy link
Contributor

@sestinj sestinj commented Jun 2, 2025

Description

Bedrock OpenAI adapter for use in proxy. Purposefully re-implemented existing Bedrock.ts as that should eventually just use the openai-adapters implementation

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

Some test were added outside the usual oai-adapters tests, but this was also tested locally with the usual test suite in main.test.ts. Won't be running in CI though

@cubic-dev-ai
Copy link
Contributor

cubic-dev-ai bot commented Jun 2, 2025

Your cubic subscription is currently inactive. Please reactivate your subscription to receive AI reviews and use cubic.

@netlify
Copy link

netlify bot commented Jun 2, 2025

Deploy Preview for continuedev canceled.

Name Link
🔨 Latest commit a3f6d47
🔍 Latest deploy log https://app.netlify.com/projects/continuedev/deploys/683d2884d99da50008bc6610

type: "tool_use" as const,
id: toolCall.id,
name: toolCall.function?.name,
input: JSON.parse(toolCall.function?.arguments || "{}"),
Copy link

Choose a reason for hiding this comment

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

Unsafe JSON parsing: The code directly parses potentially malformed JSON without error handling. If toolCall.function.arguments contains invalid JSON, this will throw an unhandled runtime error. Should wrap in try-catch and handle parsing failures gracefully.

📚 Relevant Docs


React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)

env: z.object({
region: z.string().optional(),
profile: z.string().optional(),
modelArn: z.string().optional(),
Copy link

Choose a reason for hiding this comment

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

The modelArn field is marked as optional but it is required for AWS Bedrock to know which foundation model to use. Making this optional will lead to runtime errors when the field is not provided. The schema should make this field required by removing .optional().

📚 Relevant Docs


React with 👍 to tell me that this comment was useful, or 👎 if not (and I'll stop posting more comments like this in the future)

@recurseml
Copy link

recurseml bot commented Jun 13, 2025

😱 Found 2 issues. Time to roll up your sleeves! 😱

@sestinj
Copy link
Contributor Author

sestinj commented Jun 30, 2025

closing since no plans to complete this for now. can always re-open

@sestinj sestinj closed this Jun 30, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs Jun 30, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2025
@sestinj sestinj deleted the nate/bedrock-oai-adapter branch October 17, 2025 22:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants