Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions registry/coder-labs/modules/codex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Install and configure the [Codex CLI](https://github.com/openai/codex) in your w
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.2.0"
version = "5.2.1"
agent_id = coder_agent.main.id
openai_api_key = var.openai_api_key
}
Expand All @@ -33,7 +33,7 @@ locals {

module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.2.0"
version = "5.2.1"
agent_id = coder_agent.main.id
workdir = local.codex_workdir
openai_api_key = var.openai_api_key
Expand Down Expand Up @@ -64,7 +64,7 @@ resource "coder_app" "codex" {
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.2.0"
version = "5.2.1"
agent_id = coder_agent.main.id
workdir = "/home/coder/project"
enable_ai_gateway = true
Expand All @@ -88,7 +88,7 @@ When `enable_ai_gateway = true`, the module configures Codex to use the `aigatew
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.2.0"
version = "5.2.1"
agent_id = coder_agent.main.id
workdir = "/home/coder/project"
openai_api_key = var.openai_api_key
Expand Down Expand Up @@ -117,7 +117,7 @@ The module exposes the `scripts` output: an ordered list of `coder exp sync` nam
```tf
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.2.0"
version = "5.2.1"
agent_id = coder_agent.main.id
openai_api_key = var.openai_api_key
}
Expand Down
2 changes: 1 addition & 1 deletion registry/coder-labs/modules/codex/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ describe("codex", async () => {
"[model_providers.aigateway]",
'name = "Custom AI Bridge"',
'base_url = "https://custom.example.com"',
'env_key = "CODER_AIBRIDGE_SESSION_TOKEN"',
'env_key = "OPENAI_CODER_AIGATEWAY_SESSION_TOKEN"',
'wire_api = "responses"',
].join("\n");
const { id, coderEnvVars, scripts } = await setup({
Expand Down
4 changes: 2 additions & 2 deletions registry/coder-labs/modules/codex/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ resource "coder_env" "openai_api_key" {
resource "coder_env" "ai_gateway_session_token" {
count = var.enable_ai_gateway ? 1 : 0
agent_id = var.agent_id
name = "CODER_AIBRIDGE_SESSION_TOKEN"
name = "OPENAI_CODER_AIGATEWAY_SESSION_TOKEN"
value = data.coder_workspace_owner.me.session_token
}

Expand All @@ -131,7 +131,7 @@ locals {
[model_providers.aigateway]
name = "AI Gateway"
base_url = "${data.coder_workspace.me.access_url}/api/v2/aibridge/openai/v1"
env_key = "CODER_AIBRIDGE_SESSION_TOKEN"
env_key = "OPENAI_CODER_AIGATEWAY_SESSION_TOKEN"
wire_api = "responses"

EOF
Expand Down
4 changes: 2 additions & 2 deletions registry/coder-labs/modules/codex/main.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ run "test_ai_gateway_enabled" {
}

assert {
condition = coder_env.ai_gateway_session_token[0].name == "CODER_AIBRIDGE_SESSION_TOKEN"
error_message = "CODER_AIBRIDGE_SESSION_TOKEN should be set"
condition = coder_env.ai_gateway_session_token[0].name == "OPENAI_CODER_AIGATEWAY_SESSION_TOKEN"
error_message = "OPENAI_CODER_AIGATEWAY_SESSION_TOKEN should be set"
}

assert {
Expand Down
Loading