PageSourceSearch

https://hebo.ai/assets/260127-hebo-gateway-RHBRRWxT.js

js hebo.ai collected 2026-10-05 06:15:43 UTC 29,576 bytes, 113 lines download raw bytes

1import{D as e,M as t,t as n}from"./jsx-runtime-DL2O8Srs.js";import{t as r}from"./mdx-components-DxVHPFid.js";var i=t({default:()=>c,handle:()=>o}),a=n(),o={title:`Yet Another AI Gateway?`,description:`Roll your own AI gateway with full control over models, providers, routing logic, guardrails, observability and more …`,date:`Jan 27, 2026`};function s(e){let t={a:`a`,code:`code`,em:`em`,h2:`h2`,h3:`h3`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,...r(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(t.p,{children:[`There’s no shortage of AI gateways today. If you just want something that works, cloud options like `,(0,a.jsx)(t.strong,{children:`OpenRouter`}),` or `,(0,a.jsx)(t.strong,{children:`Vercel AI Gateway`}),` get you moving fast. If you need a more enterprise-ready setup, self-hosted solutions like `,(0,a.jsx)(t.strong,{children:`LiteLLM`}),` and `,(0,a.jsx)(t.strong,{children:`Portkey`}),` are well-established.`]}),`
2`,(0,a.jsxs)(t.p,{children:[`The problem we kept running into: they’re still `,(0,a.jsx)(t.strong,{children:`off-the-shelf gateways`}),`. You can tweak settings, but once you want to extend them in a meaningful way, you hit a wall.`]}),`
3`,(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:`Hebo Gateway exists for teams that want the gateway to be part of their app`}),`, teams that need full extensibility.`]}),`
4`,(0,a.jsxs)(t.p,{children:[`This is the `,(0,a.jsx)(t.strong,{children:`v0.1 release of Hebo Gateway`}),`, an open-source, self-hostable AI gateway designed to be `,(0,a.jsx)(t.em,{children:`embedded`}),` as a framework into your own app. You fully own your providers, model catalog, routing logic, and request lifecycle without forking or fighting a vendor.`]}),`
5`,(0,a.jsxs)(t.p,{children:[`It’s not trying to replace the established gateway solutions. It’s for the cases where those tools are almost right — `,(0,a.jsx)(t.strong,{children:`but not quite flexible enough`}),`.`]}),`
6`,(0,a.jsxs)(t.p,{children:[`If you know `,(0,a.jsx)(t.strong,{children:`better-auth`}),`, this should feel familiar: better-auth is “auth you embed in your app,” not a hosted auth platform you integrate around. `,(0,a.jsx)(t.strong,{children:`Hebo Gateway applies the same idea to AI gateways`}),` — an embeddable, composable core that puts you in full control.`]}),`
7`,(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:`UPDATE:`}),` Since `,(0,a.jsx)(t.strong,{children:`v0.9`}),`, Hebo Gateway also supports the `,(0,a.jsx)(t.strong,{children:`OpenAI Responses API`}),` via the `,(0,a.jsx)(t.code,{children:`/responses`}),` endpoint.`]}),`
8`,(0,a.jsx)(t.h2,{children:`What Hebo Gateway provides`}),`
9`,(0,a.jsxs)(t.p,{children:[`Hebo Gateway is a `,(0,a.jsx)(t.strong,{children:`configurable AI gateway`}),`. You can use it (i) as a standalone self-hosted gateway service, (ii) embedded inside an existing API / backend or just (iii) for its low-level schema and converter helpers. It includes:`]}),`
10`,(0,a.jsxs)(t.ul,{children:[`
11`,(0,a.jsxs)(t.li,{children:[`🌐 OpenAI-compatible `,(0,a.jsx)(t.code,{children:`/chat/completions`}),`, `,(0,a.jsx)(t.code,{children:`/embeddings`}),`, and `,(0,a.jsx)(t.code,{children:`/models`})]}),`
12`,(0,a.jsx)(t.li,{children:`🔌 Works with any Vercel AI SDK provider`}),`
13`,(0,a.jsx)(t.li,{children:`🧭 Canonical model IDs and normalized parameters`}),`
14`,(0,a.jsx)(t.li,{children:`🗂️ Extensible model catalog with rich metadata`}),`
15`,(0,a.jsx)(t.li,{children:`🪝 Hook system for auth, routing, rate limits, and observability`}),`
16`,(0,a.jsx)(t.li,{children:`🧩 Framework-native integration (Elysia, Hono, Next.js, TanStack, WinterCG)`}),`
17`,(0,a.jsx)(t.li,{children:`👁️ Observability via OTel GenAI semantic conventions (Langfuse-compatible)`}),`
18`]}),`
19`,(0,a.jsx)(t.h2,{children:`Quick Start`}),`
20`,(0,a.jsx)(t.h3,{children:`Install NPM Package`}),`
21`,(0,a.jsx)(t.p,{children:`We love Bun, but if you really want to go with NPM or others, you can of course.`}),`
22`,(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(t.pre,{className:`shiki vitesse-light`,style:{backgroundColor:`#ffffff`,color:`#393a34`},tabIndex:`0`,children:(0,a.jsx)(t.code,{className:`language-bash`,children:(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`bun`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:` install`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:` @hebo-ai/gateway`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:` @ai-sdk/groq`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:` elysia`})]})})})}),`
23`,(0,a.jsx)(t.h3,{children:`Configure Providers and Models`}),`
24`,(0,a.jsx)(t.p,{children:`This sets up a provider registry, a canonical model catalog and OpenAI-compatible endpoints.`}),`
25`,(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(t.pre,{className:`shiki vitesse-light`,style:{backgroundColor:`#ffffff`,color:`#393a34`},tabIndex:`0`,children:(0,a.jsxs)(t.code,{className:`language-ts`,children:[(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` createGroq`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`@ai-sdk/groq`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
26`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` gateway`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` defineModelCatalog`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`@hebo-ai/gateway`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
27`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` withCanonicalIdsForGroq`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`@hebo-ai/gateway/providers/groq`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
28`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` gptOss20b`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`@hebo-ai/gateway/models/openai`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
29`,(0,a.jsx)(t.span,{className:`line`}),`
30`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`export`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` const `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`gw`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` =`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:` gateway`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
31`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`    providers`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: {`})]}),`
32`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`        groq`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`withCanonicalIdsForGroq`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`})]}),`
33`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`            createGroq`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
34`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`                apiKey`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`process`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`.`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`env`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`.`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`GROQ_API_KEY`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`})]}),`
35`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`            }),`})}),`
36`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        ),`})}),`
37`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`    },`})}),`
38`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`    models`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`defineModelCatalog`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
39`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        gptOss20b`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
40`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`            providers`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: [`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`groq`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`]`})]}),`
41`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        })`})}),`
42`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#999999`},children:`    }),`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:"`"})]}),`
43`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`});`})})]})})}),`
44`,(0,a.jsx)(t.h2,{children:`Mount the gateway`}),`
45`,(0,a.jsxs)(t.p,{children:[`Hebo Gateway exposes a `,(0,a.jsx)(t.strong,{children:`WinterCG-compatible handler`}),`. You mount it where it makes sense.`]}),`
46`,(0,a.jsx)(t.h3,{children:`ElysiaJS example`}),`
47`,(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(t.pre,{className:`shiki vitesse-light`,style:{backgroundColor:`#ffffff`,color:`#393a34`},tabIndex:`0`,children:(0,a.jsxs)(t.code,{className:`language-ts`,children:[(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` Elysia`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`elysia`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
48`,(0,a.jsx)(t.span,{className:`line`}),`
49`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`const `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`app`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` =`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` new `}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`Elysia`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`().`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`mount`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`/v1/gateway/`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` gw`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`.`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`handler`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`).`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`listen`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`}),(0,a.jsx)(t.span,{style:{color:`#2F798A`},children:`3000`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`);`})]}),`
50`,(0,a.jsx)(t.span,{className:`line`}),`
51`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`console`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`.`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`log`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`🐒 Hebo Gateway running on http://localhost:3000`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`);`})]})]})})}),`
52`,(0,a.jsx)(t.p,{children:`No new server model. No framework lock-in. Also works with Hono, Next.js, TanStack Start and almost any other framework.`}),`
53`,(0,a.jsx)(t.h2,{children:`Call it like OpenAI`}),`
54`,(0,a.jsx)(t.p,{children:`Since Hebo Gateway exposes OpenAI-compatible endpoints, you can use most existing AI SDKs unchanged (including Vercel AI SDK and OpenAI's own SDK).`}),`
55`,(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(t.pre,{className:`shiki vitesse-light`,style:{backgroundColor:`#ffffff`,color:`#393a34`},tabIndex:`0`,children:(0,a.jsxs)(t.code,{className:`language-ts`,children:[(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` createOpenAICompatible`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`@ai-sdk/openai-compatible`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
56`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`import`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` {`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` generateText`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` from`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:` "`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`ai`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
57`,(0,a.jsx)(t.span,{className:`line`}),`
58`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`const `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`hebo`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` =`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:` createOpenAICompatible`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
59`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`  name`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},chil
59dren:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`hebo`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`})]}),`
60`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`  baseURL`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`http://localhost:3000/v1/gateway`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`})]}),`
61`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`});`})}),`
62`,(0,a.jsx)(t.span,{className:`line`}),`
63`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`const `}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`{`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:` text`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` =`}),(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:` await`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:` generateText`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
64`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`  // Notice how this is using 'openai/gpt-oss-20b' instead of 'gpt-oss-20b'`})}),`
65`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`  // The gateway automatically maps model IDs to the upstream provider ones`})}),`
66`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`  model`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`hebo`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`openai/gpt-oss-20b`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`),`})]}),`
67`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`  prompt`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#B56959`},children:`Tell me a joke about monkeys`}),(0,a.jsx)(t.span,{style:{color:`#B5695977`},children:`"`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`,`})]}),`
68`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`});`})}),`
69`,(0,a.jsx)(t.span,{className:`line`}),`
70`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`console`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`.`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`log`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`(`}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`text`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`);`})]})]})})}),`
71`,(0,a.jsx)(t.h2,{children:`Hooks: where the flexibility lives`}),`
72`,(0,a.jsxs)(t.p,{children:[`Hooks let you plug into the gateway lifecycle `,(0,a.jsx)(t.strong,{children:`without modifying the core`}),`. You can enforce authentication, implement custom rate limits, route dynamically between providers, resolve model aliases, add observability or logging, and transform requests and responses.`]}),`
73`,(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(t.pre,{className:`shiki vitesse-light`,style:{backgroundColor:`#ffffff`,color:`#393a34`},tabIndex:`0`,children:(0,a.jsxs)(t.code,{className:`language-ts`,children:[(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`const `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`gw`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` =`}),(0,a.jsx)(t.span,{style:{color:`#59873A`},children:` gateway`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`({`})]}),`
74`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`    providers`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: { ... },`})]}),`
75`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`    models`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: { ... },`})]}),`
76`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#998418`},children:`    hooks`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: {`})]}),`
77`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        onRequest`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`request`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }) => {`})]}),`
78`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // auth, rate limits`})}),`
79`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
80`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        }`})}),`
81`,(0,a.jsx)(t.span,{className:`line`}),`
82`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`        before`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`operation`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`, `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`body`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }) => {`})]}),`
83`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // request shaping`})}),`
84`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
85`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        },`})}),`
86`,(0,a.jsx)(t.span,{className:`line`}),`
87`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        resolveModelId`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`operation`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`, `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`modelId`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }) => {`})]}),`
88`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // alias → canonical ID`})}),`
89`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
90`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        },`})}),`
91`,(0,a.jsx)(t.span,{className:`line`}),`
92`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        resolveProvider`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`providers`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`, `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`models`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`, `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`operation`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`, `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`resolvedModelId`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`  }) => {`})]}),`
93`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // custom routing logic`})}),`
94`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
95`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        },`})}),`
96`,(0,a.jsx)(t.span,{className:`line`}),`
97`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        after`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`result`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }) => {`})]}),`
98`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // response transformation`})}),`
99`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
100`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        },`})}),`
101`,(0,a.jsx)(t.span,{className:`line`}),`
102`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#59873A`},children:`        onResponse`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`: `}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:`async`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` ({ `}),(0,a.jsx)(t.span,{style:{color:`#B07D48`},children:`response`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:` }) => {`})]}),`
103`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#A0ADA0`},children:`            // response logging`})}),`
104`,(0,a.jsxs)(t.span,{className:`line`,children:[(0,a.jsx)(t.span,{style:{color:`#1E754F`},children:`            return`}),(0,a.jsx)(t.span,{style:{color:`#AB5959`},children:` undefined`}),(0,a.jsx)(t.span,{style:{color:`#999999`},children:`;`})]}),`
105`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`        },`})}),`
106`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`    },`})}),`
107`,(0,a.jsx)(t.span,{className:`line`,children:(0,a.jsx)(t.span,{style:{color:`#999999`},children:`});`})})]})})}),`
108`,(0,a.jsxs)(t.p,{children:[`For the full documentation and advanced scenarios, see the `,(0,a.jsx)(t.a,{href:`https://github.com/8monkey-ai/hebo-gateway/`,children:`README.md`}),` on our GitHub project.`]}),`
109`,(0,a.jsx)(t.h2,{children:`What’s Next`}),`
110`,(0,a.jsxs)(t.p,{children:[`v0.1 was focused on `,(0,a.jsx)(t.strong,{children:`getting the foundation`}),` right. The goal was to provide a solid, composable core that teams can confidently build on without committing to a rigid gateway runtime.`]}),`
111`,(0,a.jsxs)(t.p,{children:[`Looking ahead, our immediate focus is on hardening that core. We’re working to ensure `,(0,a.jsx)(t.strong,{children:`full OpenAI compatibility`}),` across all request types and edge cases, including streaming behavior, reasoning modes, and less-common API paths. After that we'll probably move on to include support for the recently announced `,(0,a.jsx)(t.a,{href:`https://www.openresponses.org/`,children:`Open Responses API`}),`.`]}),`
112`,(0,a.jsxs)(t.p,{children:[(0,a.jsx)(t.strong,{children:`UPDATE:`}),` Since `,(0,a.jsx)(t.strong,{children:`v0.9`}),`, Hebo Gateway now supports the `,(0,a.jsx)(t.strong,{children:`OpenAI Responses API`}),`.`]}),`
113`,(0,a.jsxs)(t.p,{children:[`Hebo Gateway is early and evolving quickly. You can follow the progress and report any issues on `,(0,a.jsx)(t.a,{href:`https://github.com/8monkey-ai/hebo-gateway/`,children:`GitHub`}),`, talk to the team on `,(0,a.jsx)(t.a,{href:`https://discord.com/invite/cCJtXZRU5p`,children:`Discord`}),`, or follow updates on X (`,(0,a.jsx)(t.a,{href:`https://x.com/heboai`,children:`@heboai`}),`).`]})]})}var c=e(function(e={}){let{wrapper:t}={...r(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(s,{...e})}):s(e)});export{i as n,o as r,c as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.