External Codex Agent defaults to upsupported GitLab openai model

Problem to solve

When testing the following external agent codex model, I noticed that the latest codex installation used the latest gpt model. The issue is that the latest gpt-5-1 model is supported by the GitLab v1/openai/proxy

CI Runner logs

header_str
OpenAI Codex v0.65.0 (research preview)
--------
workdir: /builds/XXXX
model: gpt-5.1-codex-max
provider: gitlab
approval: never
sandbox: danger-full-access
reasoning effort: none
reasoning summaries: auto
session id: 019aeb3c-948e-7483-8cbe-a356036ae024
--------
user

Proposal

  1. Ensure that gpt-5.1-codex-max is either added as supported proxy endpoint model
  2. Default the model in the supported configuration by adding it to the header_str

https://staging.gitlab.com/usage-billing-11252025-premium/27663663-project1/-/jobs/142889569

Further details

Edited by Nathan Weinshenker