Portkey
:::info Status: roadmap (stub) The Portkey adapter is scaffolding. Capabilities below are intended scope, not yet implemented or verified. The reference adapter today is LiteLLM. :::
Intended integration
| Capability | Mechanism (planned) | Notes |
|---|---|---|
| Request transform | Portkey hooks / guardrails → POST {OPTIMIZER}/v1/optimize | Needs verification that the hook can rewrite model/messages/tools. |
Cache hit (canShortCircuit) | hooks / guardrails | Partial — to verify whether the hook can return a cached response. |
| Response transform | post-call hook → POST {OPTIMIZER}/v1/optimize-response (+ /v1/cache) | Expected to work. |
The adapter will map Portkey's hook to
Optimizer Protocol v1 (/v1/optimize,
/v1/optimize-response, /v1/cache), depend on Portkey's core (never fork it), and
fail open (pass through unchanged on any optimizer error). Spend is recorded by the
gateway's content-free spend store — no separate meter call.
Want this sooner?
The path to a working adapter is the same for every gateway — see
adding a new gateway. Track status in
integrations/README.md.