[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73F5Z91ZPRYAQYSKDP88006":3,"skill-same:01M73F5Z91ZPRYAQYSKDP88006":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M73F5Z91ZPRYAQYSKDP88006","portkey",null,"Portkey AI gateway — unified LLM API, load balancing, fallbacks, caching, guardrails, observability","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fportkey\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: portkey\ndescription: Portkey AI gateway — unified LLM API, load balancing, fallbacks, caching, guardrails, observability\ntriggers:\n  - portkey\n  - portkey gateway\n  - llm gateway portkey\n  - portkey fallback\n  - portkey load balance\n  - portkey cache\n  - portkey guardrails\n  - unified llm api\n  - portkey virtual key\n  - portkey config\ndo_not_use_for:\n  - single model calls without routing — use litellm directly\n  - local model serving — use ollama\n  - evaluation — use ragas\u002Fdeepeval\nsee_also:\n  - litellm\n  - langfuse\n  - ollama-patterns\n---\n\n# Portkey — AI Gateway\n\n## Setup & Virtual Keys\n\n```python\nfrom portkey_ai import Portkey\n\n# Virtual keys abstract provider credentials\nclient = Portkey(\n    api_key=\"pk-...\",                   # Portkey API key\n    virtual_key=\"anthropic-vk-...\",     # Virtual key for provider\n)\n\n# Drop-in OpenAI replacement\nresponse = client.chat.completions.create(\n    model=\"claude-sonnet-4-6\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)\nprint(response.choices[0].message.content)\n```\n\n## Configs — Gateway Routing\n\n```python\nfrom portkey_ai import createHeaders, PORTKEY_GATEWAY_URL\nimport openai\n\n# Config-based routing — define in Portkey dashboard or inline\nconfig = {\n    \"strategy\": {\n        \"mode\": \"fallback\",             # fallback | loadbalance | single\n    },\n    \"targets\": [\n        {\n            \"virtual_key\": \"anthropic-vk\",\n            \"override_params\": {\"model\": \"claude-sonnet-4-6\"},\n            \"weight\": 0.7,\n        },\n        {\n            \"virtual_key\": \"openai-vk\",\n            \"override_params\": {\"model\": \"gpt-4o\"},\n            \"weight\": 0.3,\n        },\n    ],\n}\n\n# Use with openai client (Portkey as proxy)\nopenai_client = openai.OpenAI(\n    api_key=\"pk-...\",\n    base_url=PORTKEY_GATEWAY_URL,\n    default_headers=createHeaders(\n        api_key=\"pk-...\",\n        config=config,\n    ),\n)\n```\n\n## Load Balancing\n\n```python\nlb_config = {\n    \"strategy\": {\"mode\": \"loadbalance\"},\n    \"targets\": [\n        {\"virtual_key\": \"openai-vk-1\", \"weight\": 50},\n        {\"virtual_key\": \"openai-vk-2\", \"weight\": 30},\n        {\"virtual_key\": \"openai-vk-3\", \"weight\": 20},\n    ],\n}\n\nclient = Portkey(api_key=\"pk-...\", config=lb_config)\n```\n\n## Fallback with Retry\n\n```python\nfallback_config = {\n    \"strategy\": {\"mode\": \"fallback\"},\n    \"targets\": [\n        {\n            \"virtual_key\": \"primary-vk\",\n            \"override_params\": {\"model\": \"claude-opus-4-7\"},\n            \"retry\": {\"attempts\": 2, \"on_status_codes\": [429, 500, 502, 503]},\n        },\n        {\n            \"virtual_key\": \"backup-vk\",\n            \"override_params\": {\"model\": \"gpt-4o\"},\n        },\n    ],\n}\n\nclient = Portkey(api_key=\"pk-...\", config=fallback_config)\nresponse = client.chat.completions.create(\n    model=\"claude-opus-4-7\",            # overridden by config\n    messages=[{\"role\": \"user\", \"content\": \"Complex task\"}],\n)\n```\n\n## Caching\n\n```python\ncache_config = {\n    \"cache\": {\n        \"mode\": \"semantic\",             # simple | semantic\n        \"max_age\": 3600,                # seconds\n    },\n    \"virtual_key\": \"openai-vk\",\n}\n\nclient = Portkey(api_key=\"pk-...\", config=cache_config)\n# Second identical (or semantically similar) call served from cache\nr1 = client.chat.completions.create(model=\"gpt-4o\", messages=[...])\nr2 = client.chat.completions.create(model=\"gpt-4o\", messages=[...])\nprint(r2.extensions.cache_status)      # HIT\n```\n\n## Guardrails\n\n```python\n# Input\u002Foutput guardrails — defined in Portkey dashboard\nguardrail_config = {\n    \"virtual_key\": \"anthropic-vk\",\n    \"guardrails\": {\n        \"input_guardrails\": [\"no-pii\", \"topic-restriction\"],\n        \"output_guardrails\": [\"no-harmful-content\", \"length-check\"],\n        \"on_fail\": \"block\",             # block | warn | replace\n    },\n}\n\nclient = Portkey(api_key=\"pk-...\", config=guardrail_config)\ntry:\n    response = client.chat.completions.create(\n        model=\"claude-sonnet-4-6\",\n        messages=[{\"role\": \"user\", \"content\": user_input}],\n    )\nexcept Exception as e:\n    # Guardrail blocked the request\n    print(f\"Blocked: {e}\")\n```\n\n## Observability & Metadata\n\n```python\nclient = Portkey(\n    api_key=\"pk-...\",\n    virtual_key=\"anthropic-vk\",\n)\n\nresponse = client.with_options(\n    metadata={\n        \"user_id\": \"user-123\",\n        \"session_id\": \"sess-456\",\n        \"environment\": \"production\",\n        \"_prompt\": \"rag-v2\",            # prompt name for dashboard grouping\n    }\n).chat.completions.create(\n    model=\"claude-sonnet-4-6\",\n    messages=[{\"role\": \"user\", \"content\": query}],\n)\n# View traces at app.portkey.ai\u002Flogs\n```\n\n## Prompt Templates\n\n```python\n# Fetch and render prompts from Portkey dashboard\nfrom portkey_ai import Portkey\n\nclient = Portkey(api_key=\"pk-...\")\nprompt = client.prompts.completions.create(\n    prompt_id=\"pp-my-prompt-id\",\n    variables={\"context\": doc_context, \"question\": user_query},\n)\nprint(prompt.choices[0].message.content)\n```\n\n## Anti-Fake-Pass Checks\n\n- Virtual keys are created in Portkey dashboard — they proxy provider API keys server-side\n- `config` can be a dict (inline) or a string config ID from the dashboard\n- `strategy.mode: \"fallback\"` tries targets in order on error — not round-robin\n- Semantic cache requires sentence-transformer similarity — first call always misses\n- Guardrails must be created in dashboard first — referencing by name only\n- `with_options()` returns a new client instance — does not mutate the original\n","# Portkey — AI Gateway\n\n## Setup & Virtual Keys\n\n```python\nfrom portkey_ai import Portkey\n\n# Virtual keys abstract provider credentials\nclient = Portkey(\n    api_key=\"pk-...\",                   # Portkey API key\n    virtual_key=\"anthropic-vk-...\",     # Virtual key for provider\n)\n\n# Drop-in OpenAI replacement\nresponse = client.chat.completions.create(\n    model=\"claude-sonnet-4-6\",\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n)\nprint(response.choices[0].message.content)\n```\n\n## Configs — Gateway Routing\n\n```python\nfrom portkey_ai import createHeaders, PORTKEY_GATEWAY_URL\nimport openai\n\n# Config-based routing — define in Portkey dashboard or inline\nconfig = {\n    \"strategy\": {\n        \"mode\": \"fallback\",             # fallback | loadbalance | single\n    },\n    \"targets\": [\n        {\n            \"virtual_key\": \"anthropic-vk\",\n            \"override_params\": {\"model\": \"claude-sonnet-4-6\"},\n            \"weight\": 0.7,\n        },\n        {\n            \"virtual_key\": \"openai-vk\",\n            \"override_params\": {\"model\": \"gpt-4o\"},\n            \"weight\": 0.3,\n        },\n    ],\n}\n\n# Use with openai client (Portkey as proxy)\nopenai_client = openai.OpenAI(\n    api_key=\"pk-...\",\n    base_url=PORTKEY_GATEWAY_URL,\n    default_headers=createHeaders(\n        api_key=\"pk-...\",\n        config=config,\n    ),\n)\n```\n\n## Load Balancing\n\n```python\nlb_config = {\n    \"strategy\": {\"mode\": \"loadbalance\"},\n    \"targets\": [\n        {\"virtual_key\": \"openai-vk-1\", \"weight\": 50},\n        {\"virtual_key\": \"openai-vk-2\", \"weight\": 30},\n        {\"virtual_key\": \"openai-vk-3\", \"weight\": 20},\n    ],\n}\n\nclient = Portkey(api_key=\"pk-...\", config=lb_config)\n```\n\n## Fallback with Retry\n\n```python\nfallback_config = {\n    \"strategy\": {\"mode\": \"fallback\"},\n    \"targets\": [\n        {\n            \"virtual_key\": \"primary-vk\",\n            \"override_params\": {\"model\": \"claude-opus-4-7\"},\n            \"retry\": {\"attempts\": 2, \"on_status_codes\": [429, 500, 502, 503]},\n        },\n        {\n            \"virtual_key\": \"backup-vk\",\n            \"override_params\": {\"model\": \"gpt-4o\"},\n        },\n    ],\n}\n\nclient = Portkey(api_key=\"pk-...\", config=fallback_config)\nresponse = client.chat.completions.create(\n    model=\"claude-opus-4-7\",            # overridden by config\n    messages=[{\"role\": \"user\", \"content\": \"Complex task\"}],\n)\n```\n\n## Caching\n\n```python\ncache_config = {\n    \"cache\": {\n        \"mode\": \"semantic\",             # simple | semantic\n        \"max_age\": 3600,                # seconds\n    },\n    \"virtual_key\": \"openai-vk\",\n}\n\nclient = Portkey(api_key=\"pk-...\", config=cache_config)\n# Second identical (or semantically similar) call served from cache\nr1 = client.chat.completions.create(model=\"gpt-4o\", messages=[...])\nr2 = client.chat.completions.create(model=\"gpt-4o\", messages=[...])\nprint(r2.extensions.cache_status)      # HIT\n```\n\n## Guardrails\n\n```python\n# Input\u002Foutput guardrails — defined in Portkey dashboard\nguardrail_config = {\n    \"virtual_key\": \"anthropic-vk\",\n    \"guardrails\": {\n        \"input_guardrails\": [\"no-pii\", \"topic-restriction\"],\n        \"output_guardrails\": [\"no-harmful-content\", \"length-check\"],\n        \"on_fail\": \"block\",             # block | warn | replace\n    },\n}\n\nclient = Portkey(api_key=\"pk-...\", config=guardrail_config)\ntry:\n    response = client.chat.completions.create(\n        model=\"claude-sonnet-4-6\",\n        messages=[{\"role\": \"user\", \"content\": user_input}],\n    )\nexcept Exception as e:\n    # Guardrail blocked the request\n    print(f\"Blocked: {e}\")\n```\n\n## Observability & Metadata\n\n```python\nclient = Portkey(\n    api_key=\"pk-...\",\n    virtual_key=\"anthropic-vk\",\n)\n\nresponse = client.with_options(\n    metadata={\n        \"user_id\": \"user-123\",\n        \"session_id\": \"sess-456\",\n        \"environment\": \"production\",\n        \"_prompt\": \"rag-v2\",            # prompt name for dashboard grouping\n    }\n).chat.completions.create(\n    model=\"claude-sonnet-4-6\",\n    messages=[{\"role\": \"user\", \"content\": query}],\n)\n# View traces at app.portkey.ai\u002Flogs\n```\n\n## Prompt Templates\n\n```python\n# Fetch and render prompts from Portkey dashboard\nfrom portkey_ai import Portkey\n\nclient = Portkey(api_key=\"pk-...\")\nprompt = client.prompts.completions.create(\n    prompt_id=\"pp-my-prompt-id\",\n    variables={\"context\": doc_context, \"question\": user_query},\n)\nprint(prompt.choices[0].message.content)\n```\n\n## Anti-Fake-Pass Checks\n\n- Virtual keys are created in Portkey dashboard — they proxy provider API keys server-side\n- `config` can be a dict (inline) or a string config ID from the dashboard\n- `strategy.mode: \"fallback\"` tries targets in order on error — not round-robin\n- Semantic cache requires sentence-transformer similarity — first call always misses\n- Guardrails must be created in dashboard first — referencing by name only\n- `with_options()` returns a new client instance — does not mutate the original\n",{"name":5,"see_also":24,"triggers":28,"description":7,"do_not_use_for":38},[25,26,27],"litellm","langfuse","ollama-patterns",[5,29,30,31,32,33,34,35,36,37],"portkey gateway","llm gateway portkey","portkey fallback","portkey load balance","portkey cache","portkey guardrails","unified llm api","portkey virtual key","portkey config",[39,40,41],"single model calls without routing — use litellm directly","local model serving — use ollama","evaluation — use ragas\u002Fdeepeval","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fportkey",1,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-11 23:56:26",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill portkey",{"tool":58,"command":59},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill portkey",{"tool":61,"command":62},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill portkey","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fportkey\u002FSKILL.md",true,[],[67,75,82,90,98,106],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":71,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":86,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":94,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":102,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]