What problem does it solve?
Moving an LLM caller from PostHog's legacy Python services/llm-gateway to the new Go-based PostHog/ai-gateway involves many subtle contracts—URL shapes, credential scopes, header formats, billing attribution, and feature parity—that are easy to get wrong. This Skill guides the migration end to end so callers are converted correctly or stopped with a documented blocker when Go parity is missing.
Core Features & Use Cases
- Caller Inventory: Locates the production call site, client construction, settings, deployment wiring, and tests, recording credentials, billing ownership, model, streaming, and attribution requirements.
- Parity-Gated Migration: Checks every required contract against services/llm-gateway/PARITY.md and stops with an explicit blocker when a Go gap exists, keeping the Python path intact.
- Guided Implementation: Applies shared Go-capable client builders (build_openai_client, build_async_openai_client, build_async_anthropic_client), slugless base URLs, phs_/pha_ credentials, and X-PostHog-Properties attribution, with verified PR examples for Django, sandbox, and cross-repository patterns.
- Use Case: An engineer needs to route the Signals grouping workload through the AI gateway. The Skill inventories the caller, confirms parity, wires the opt-in client with correct headers and billing attribution, updates tests, and summarizes the migration.
Quick Start
Ask the agent to migrate a specific LLM caller, such as "migrate the eval-report agent from services/llm-gateway to the AI gateway," and it will inventory the caller, check parity, implement the migration, and update tests.