diff --git a/registry/coder-labs/modules/codex/README.md b/registry/coder-labs/modules/codex/README.md index 2ce186b32..d17618611 100644 --- a/registry/coder-labs/modules/codex/README.md +++ b/registry/coder-labs/modules/codex/README.md @@ -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 } @@ -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 @@ -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 @@ -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 @@ -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 } diff --git a/registry/coder-labs/modules/codex/main.test.ts b/registry/coder-labs/modules/codex/main.test.ts index da82621a5..f6d37f3b2 100644 --- a/registry/coder-labs/modules/codex/main.test.ts +++ b/registry/coder-labs/modules/codex/main.test.ts @@ -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({ diff --git a/registry/coder-labs/modules/codex/main.tf b/registry/coder-labs/modules/codex/main.tf index 7deb46452..6ad5e3a54 100644 --- a/registry/coder-labs/modules/codex/main.tf +++ b/registry/coder-labs/modules/codex/main.tf @@ -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 } @@ -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 diff --git a/registry/coder-labs/modules/codex/main.tftest.hcl b/registry/coder-labs/modules/codex/main.tftest.hcl index 3bcd681ac..37aec6941 100644 --- a/registry/coder-labs/modules/codex/main.tftest.hcl +++ b/registry/coder-labs/modules/codex/main.tftest.hcl @@ -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 {