LlamaIndex's OpenAI integration accepts a custom api_base. Use it to route every embedding, completion, and chat call through AIgateway.
Use OpenAILike (not the OpenAI class — it rejects provider/slug model ids against a hardcoded map). is_chat_model=True is required, or it 404s on the completions route.
Same pattern — use OpenAILikeEmbedding with api_base set, then any embedding model from our catalog (e.g. baai/bge-m3).