feat: added openai proxy
What does this merge request do and why?
Added openai proxy to support Codex integration. This would allow customers to use codex in both delegated mode and from the CLI using GitLab credentials.
Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/563278
How to set up and validate locally
- Run the AI Gateway
poetry run ai-gateway - Test using the following curl message
curl "http://localhost:5052/v1/proxy/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "x-gitlab-unit-primitive: ai_gateway_model_provider_proxy" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "user",
"content": "Write a one-sentence bedtime story about a unicorn."
}
]
}'
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed. -
If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Edited by Shekhar Patnaik