gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Update deprecated hono methods and properties

Open VisargD opened this issue 1 year ago • 0 comments

In the next majore release (v4) of hono.dev, they will remove a few properties and methods. This repo uses couple of them. Here is the list of deprecated hono properties and methods:

  • c.runtime : Can be replaced with getRuntimeKey() https://github.com/Portkey-AI/gateway/blob/4a44fa0a1df3174854dc8ac9891b111dd3045f42/src/index.ts#L33

Image

  • c.req.headers: Can be replaced with c.req.raw.headers (Used at multiple places. Attaching just one example) https://github.com/Portkey-AI/gateway/blob/4a44fa0a1df3174854dc8ac9891b111dd3045f42/src/handlers/chatCompletionsHandler.ts#L15

Image

VisargD avatar Jan 20 '24 08:01 VisargD