-
Notifications
You must be signed in to change notification settings - Fork 92
feat(coder-labs/modules/codex): add support for aibridge #655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Atif Ali <[email protected]>
…o 35C4n0r/feat-codex-aibridge
| description = "The model for Codex to use. Defaults to gpt-5.1-codex-max." | ||
| default = "" | ||
| description = "The model for Codex to use. Defaults to gpt-5.2-codex." | ||
| default = "gpt-5.2-codex" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it is not yet available for the API billing we use. So maybe use next best gpt-5.1-codex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matifali @DevelopmentCats imo, we should leave the default as empty and not mention this either
Defaults to gpt-5.1-codex-max.
And make passing the model mandatory in the case of enable_aibridge = true.
lmk your thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One issue that I notice with using these codex models with aibridge, is that the openai codex modules only support the v1/responses endpoint, and not v1/chat/completions
Currently from what I can see aibridge does not currently log v1/responses and only v1/chat/completions in the current release of aibridge, but I can see there has been work on this and it will be in soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. It will be supported by next release. We will release this until we bring the interception functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. It will be supported by next release. We will release this until we bring the interception functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine. It will be supported by next release. We will release this until we bring the interception functionality
|
I'm not familiar with modules/templates enough to confidently review this but from my shallow understanding it looks good, codex config changes look good. |
|
I will go ahead and give this a test today but everything looks good after looking through this again. |
| ```toml | ||
| [model_providers.aibridge] | ||
| name = "AI Bridge" | ||
| base_url = "https://dev.coder.com/api/v2/aibridge/openai/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| base_url = "https://dev.coder.com/api/v2/aibridge/openai/v1" | |
| base_url = "https://coder.example.com/api/v2/aibridge/openai/v1" |
I would use an example url here since we dont need to expose our aibridge endpoint, and this uses the deployment url from whatever coder deployment its running from if im not mistaken
| module "codex" { | ||
| source = "registry.coder.com/coder-labs/codex/coder" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| module "codex" { | |
| source = "registry.coder.com/coder-labs/codex/coder" | |
| module "codex" { | |
| count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0 | |
| source = "registry.coder.com/coder-labs/codex/coder" |
The count needs to be included here since this is a reference for tasks
| ```tf | ||
| resource "coder_ai_task" "task" { | ||
| count = data.coder_workspace.me.start_count | ||
| app_id = module.codex.task_app_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| app_id = module.codex.task_app_id | |
| app_id = module.codex[count.index].task_app_id |
This needs to be changed here as well
|
|
||
| ```tf | ||
| resource "coder_ai_task" "task" { | ||
| count = data.coder_workspace.me.start_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| count = data.coder_workspace.me.start_count | |
| count = data.coder_task.me.enabled ? data.coder_workspace.me.start_count : 0 |
This needs to be changed as well

Description
Type of Change
Module Information
Path:
registry/coder-labs/modules/codexNew version:
v4.1.0Breaking change: [ ] Yes [x] No
Testing & Validation
bun test)bun fmt)Related Issues
Closes: #650