Skip to content

Conversation

@chrisehlee
Copy link

added support for openai's responses api and realtime api with webrtc.

responses api works the same as other endpoints - just pass model and input and it routes to the provider.

for realtime added the webrtc call endpoints. most importantly the create calls endpoint accepts both multipart form data (with session + sdp fields) or direct sdp data with model in query param. also added client secrets for ephemeral tokens and accept/reject/hangup calls.

updated proxy middleware to handle formdata properly and added the openai-beta header for realtime endpoints.

@vercel
Copy link

vercel bot commented Oct 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
ws-gpt-port Ready Ready Preview Oct 13, 2025 8:43am

@chrisehlee chrisehlee requested a review from tomasmcm October 7, 2025 09:23
@tomasmcm
Copy link
Member

tomasmcm commented Oct 7, 2025

Also, from the build logs:

- info Linting and checking validity of types...
Failed to compile.
./src/server/routes/proxy.route.ts:101:48
Type error: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.
   99 |     model = session.model
  100 | 
> 101 |     const sdpText = sdpData instanceof File || sdpData instanceof Blob
      |                                                ^
  102 |       ? await sdpData.text()
  103 |       : sdpData.toString()
  104 |     formData.set('sdp', sdpText)
 ELIFECYCLE  Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1

export const processRequest = async (c:Context) => {
const result = await c.req.valid('json')
export const processRequest = async (c: Context) => {
const result = (c.req as any).valid('json')
Copy link
Member

Choose a reason for hiding this comment

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

are you sure about removing await here?

@chrisehlee
Copy link
Author

chrisehlee commented Oct 13, 2025 via email

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