Skip to main content

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

CapabilityMechanism (planned)Notes
Request transformPortkey hooks / guardrailsPOST {OPTIMIZER}/v1/optimizeNeeds verification that the hook can rewrite model/messages/tools.
Cache hit (canShortCircuit)hooks / guardrailsPartial — to verify whether the hook can return a cached response.
Response transformpost-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.