Migrating from Portkey
Igris is a governance-first LLM gateway. If you’re coming from Portkey, most of your mental model transfers directly — virtual keys, a unified API endpoint, provider routing. The differences are in the policy engine, observability depth, and architectural philosophy. This guide covers SDK migration, virtual key mapping, and a feature-by-feature comparison.Why Igris
| Dimension | Portkey | Igris |
|---|---|---|
| Governance focus | Observability + caching | Policy enforcement + audit trail |
| Policy engine | Basic budget limits | Discriminated union rules, per-user conditions |
| Content inspection | None | PII patterns, keyword blocklist, content logging |
| Anomaly detection | None | 5 signals: cost spike, token burn, response length, model shift, error rate |
| Credential storage | Cloud-only | Self-hosted option (Docker / Kubernetes) |
| Open source | No | Core proxy open source |
| Compliance docs | No | EU AI Act compliance engine (@igris/comply) |
SDK migration
The SDK surface is intentionally similar to Portkey. In most cases, migration is three lines:- Package name:
portkey-ai→@igris-security/sdk - Class name:
new Portkey()→new Igris() - Virtual key slugs: Portkey uses
@slug/model— Igris uses the same syntax. Your existing slug names can be reused.
Streaming
Both use the same streaming pattern:Using existing OpenAI / Anthropic clients
If you’re using theportkey-ai package’s withPortkey() wrapper or a manual baseURL override,
the Igris equivalent is the connectLlm() method or a subpath adapter:
Virtual key migration
Portkey virtual keys map directly to Igris virtual keys. The slug syntax is the same — only the creation UI and API differ.| Concept | Portkey | Igris |
|---|---|---|
| Create | Dashboard → Virtual Keys | Dashboard → Virtual Keys → New Virtual Key → LLM type |
| Slug | Auto-assigned | You choose (or auto-generated) |
| Credential storage | Portkey cloud | Igris cloud or self-hosted |
| Supported providers | 250+ | 59 (growing) |
| Custom base URL | Yes | Yes (customBaseUrl on the virtual key) |
| Model restrictions | No | Yes (model allowlist per virtual key) |
@slug/model
syntax works identically.
Policy mapping
Portkey has budget limits and basic guardrails. Igris has a structured policy engine with more granular control.| Portkey concept | Igris equivalent |
|---|---|
| Budget limit | limit.dollars on a PolicyRule |
| Request rate limit | limit.requests on a PolicyRule |
| Guardrail hooks | contentGuard on a PolicyRule |
| Metadata filtering | conditions on a PolicyRule |
| Model allowlist | Virtual key model restrictions + llm_model deny rules |
Feature parity table
| Feature | Portkey v1 | Igris v1 |
|---|---|---|
| Core routing | ||
| OpenAI-compatible unified API | ✅ | ✅ |
| 50+ provider support | ✅ | ✅ (59 providers) |
| Streaming (SSE) | ✅ | ✅ |
| Embeddings | ✅ | ✅ |
| Images / audio | ✅ | ✅ (passthrough) |
| Virtual keys | ||
| Encrypted credential storage | ✅ | ✅ |
| Model restrictions | ❌ | ✅ |
| Self-hosted credential vault | ❌ | ✅ |
| Policies & governance | ||
| Request/token/dollar rate limits | ✅ | ✅ |
| Per-user conditions | ❌ | ✅ |
| Metadata-based rules | ❌ | ✅ |
| Content guards (PII, keywords) | ✅ (limited) | ✅ |
| Deny-by-default policy engine | ❌ | ✅ |
| Observability | ||
| Request logs | ✅ | ✅ |
| Token + cost tracking | ✅ | ✅ |
| Full prompt/response logging | ✅ (always) | ✅ (opt-in per rule) |
| Anomaly detection | ❌ | ✅ (5 signals) |
| CISO dashboard + PDF reports | ❌ | ✅ |
| Compliance | ||
| EU AI Act doc generation | ❌ | ✅ |
| SOC 2 audit trail | ❌ | ✅ |
| Infrastructure | ||
| Semantic caching | ✅ | ❌ (roadmap) |
| Load balancing / fallbacks | ✅ | ❌ (roadmap) |
| Self-hosted deployment | ❌ | ✅ (Docker) |
| Open source | ❌ | ✅ (core) |
Known differences
These Portkey features are not available in Igris v1: Routing strategies (fallback / load balance): Portkey supports fallback chains and weighted load balancing across multiple providers. Igris v1 routes to a single virtual key per request. Multi-key routing is on the roadmap. Semantic caching: Portkey offers vector-similarity caching for identical or near-identical prompts. Igris v1 does not cache. This is planned for a future release. Prompt management: Portkey has a prompt library with versioning and A/B testing. Igris does not include prompt management — use a dedicated prompt registry or keep prompts in your application. Webhook retries: Portkey’s webhook delivery includes automatic retries. Igris alert webhooks are fire-and-forget in v1.Migration checklist
- Install
@igris-security/sdkand removeportkey-ai - Create a new Igris account at app.igris.dev/signup
- Re-create your virtual keys in the Igris dashboard (same slugs are fine)
- Update
new Portkey(...)→new Igris(...)with your Igris API key - Update
@portkey-slug/model→@igris-slug/modelif slugs differ - Migrate budget limits to Igris policy rules
- Verify audit trail in the Igris dashboard
- Remove any
portkey-airesidual code
Getting help
- Docs: igris.dev/docs
- GitHub Issues: github.com/cybertron288/igris/issues
- Dashboard: app.igris.dev