Skip to content

feat: add pluggable transport interface for SageMaker support#492

Open
GregHolmes wants to merge 1 commit intomainfrom
gh/pluggable-transport-sagemaker
Open

feat: add pluggable transport interface for SageMaker support#492
GregHolmes wants to merge 1 commit intomainfrom
gh/pluggable-transport-sagemaker

Conversation

@GregHolmes
Copy link
Copy Markdown
Contributor

@GregHolmes GregHolmes commented May 1, 2026

Proposed changes

  • Adds a hand-maintained DeepgramTransport / DeepgramTransportFactory interface for replacing the default streaming transport in the JS SDK
  • Wires transportFactory into CustomDeepgramClient so listen.v1, listen.v2, speak.v1, and agent.v1 can use custom transports without modifying Fern-generated clients
  • Exports the new transport types, adds unit coverage for the adapter path, and freezes the new hand-maintained surface in .fernignore

Context

  • This follows the same integration boundary used in the Python and Java SDKs for SageMaker support
  • REST behavior stays unchanged; only the streaming connection layer becomes pluggable
  • The transport factory keeps the Python/Java-style factory(url, headers) shape and adds JS-specific request metadata as a third argument

Testing

  • pnpm build
  • pnpm vitest run tests/unit/transport-factory.test.ts
  • pnpm vitest run tests/unit/custom-client.test.ts

Types of changes

What types of changes does your code introduce to the community JavaScript SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@GregHolmes GregHolmes requested a review from lukeocodes as a code owner May 1, 2026 10:19
@GregHolmes GregHolmes self-assigned this May 1, 2026
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.

1 participant