From 78c3ce419eff0abef1dc0c80a66ccf8d5988f7f0 Mon Sep 17 00:00:00 2001 From: Robby Cochran Date: Fri, 18 Sep 2026 19:34:41 -0700 Subject: [PATCH] fix: force Codex inference over HTTP --- tasks/github-pr-reviewer/workflow/codex-harness.yaml | 9 ++++++++- test/pr_review_test.go | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tasks/github-pr-reviewer/workflow/codex-harness.yaml b/tasks/github-pr-reviewer/workflow/codex-harness.yaml index d3f472b..a15cbb0 100644 --- a/tasks/github-pr-reviewer/workflow/codex-harness.yaml +++ b/tasks/github-pr-reviewer/workflow/codex-harness.yaml @@ -24,11 +24,18 @@ payloads: - source: ${REVIEW_SKILL} destination: /sandbox/review/skills/pr-review/SKILL.md - content: | - openai_base_url = "https://inference.local/v1" model = "${CODEX_MODEL}" + model_provider = "openshell" model_reasoning_effort = "xhigh" approval_policy = "never" sandbox_mode = "danger-full-access" + + [model_providers.openshell] + name = "OpenShell inference" + base_url = "https://inference.local/v1" + wire_api = "responses" + supports_websockets = false + requires_openai_auth = false destination: /sandbox/.codex/config.toml outputs: - source: /sandbox/review/codex-final.txt diff --git a/test/pr_review_test.go b/test/pr_review_test.go index 7df3aeb..d09ea17 100644 --- a/test/pr_review_test.go +++ b/test/pr_review_test.go @@ -430,7 +430,7 @@ func TestGitHubAppTokenIsHostOnly(t *testing.T) { t.Fatal("review workflow passes the GitHub token into the sandbox configuration") } codex := string(mustRead(t, "../tasks/github-pr-reviewer/workflow/codex-harness.yaml")) - for _, required := range []string{"type: codex", "CODEX_INFERENCE_PROVIDER", "CODEX_MODEL", "${CODEX_MODEL}", "model_reasoning_effort = \"xhigh\"", "approval_policy = \"never\"", "sandbox_mode = \"danger-full-access\"", "inference.local/v1", "codex-final.txt"} { + for _, required := range []string{"type: codex", "CODEX_INFERENCE_PROVIDER", "CODEX_MODEL", "${CODEX_MODEL}", "model_provider = \"openshell\"", "model_reasoning_effort = \"xhigh\"", "approval_policy = \"never\"", "sandbox_mode = \"danger-full-access\"", "base_url = \"https://inference.local/v1\"", "supports_websockets = false", "codex-final.txt"} { if !strings.Contains(codex, required) { t.Fatalf("Codex workflow is missing %s", required) }