Skip to content

fix(codex): remove invalid xhigh effort option for gpt-5.5#2727

Draft
vdekrijger wants to merge 1 commit into
mainfrom
posthog-code/remove-codex-xhigh-effort
Draft

fix(codex): remove invalid xhigh effort option for gpt-5.5#2727
vdekrijger wants to merge 1 commit into
mainfrom
posthog-code/remove-codex-xhigh-effort

Conversation

@vdekrijger

Copy link
Copy Markdown
Contributor

Problem

xhigh ("Extra High") is not a valid reasoning_effort value for the GPT 5.5 family in OpenAI's Codex API, but our app was advertising it as a selectable option — so picking it would fail.

Changes

Removed the xhigh reasoning-effort tier from the Codex adapter; it now caps at high for all models. Claude models (Opus/Fable) still support xhigh, so that path is unchanged.

How did you test this?

  • pnpm --filter @posthog/agent test for the codex models, reasoning-effort, and agent suites
  • pnpm --filter @posthog/workspace-server test for the agent service suite
  • pnpm --filter @posthog/agent typecheck

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code from a Slack thread

OpenAI's reasoning_effort does not accept "xhigh" for the gpt-5.5 family, so the Codex adapter should not offer it. Cap Codex reasoning effort at "high" for all models.

Claude models (opus/fable) still support xhigh — that path is unchanged.

Generated-By: PostHog Code
Task-Id: f3fede9e-830a-4fe9-ba3f-d8024f37ff79
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 898d170.

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/agent/src/adapters/reasoning-effort.test.ts, line 5-13 (link)

    P2 The three assertions are testing the same property (xhigh rejection) across different model IDs. The codebase preference is for parameterised tests — it.each would also make it easier to add new model IDs in the future, consistent with the pattern already used in models.test.ts.

    Context Used: Do not attempt to comment on incorrect alphabetica... (source)

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: packages/agent/src/adapters/reasoning-effort.test.ts
    Line: 5-13
    
    Comment:
    The three assertions are testing the same property (`xhigh` rejection) across different model IDs. The codebase preference is for parameterised tests — `it.each` would also make it easier to add new model IDs in the future, consistent with the pattern already used in `models.test.ts`.
    
    
    
    **Context Used:** Do not attempt to comment on incorrect alphabetica... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/agent/src/adapters/reasoning-effort.test.ts:5-13
The three assertions are testing the same property (`xhigh` rejection) across different model IDs. The codebase preference is for parameterised tests — `it.each` would also make it easier to add new model IDs in the future, consistent with the pattern already used in `models.test.ts`.

```suggestion
  it.each(["gpt-5.5", "gpt-5.5-codex", "gpt-5.3-codex"])(
    "rejects xhigh for codex models, including the gpt-5.5 family (%s)",
    (modelId) => {
      expect(isSupportedReasoningEffort("codex", modelId, "xhigh")).toBe(false);
    },
  );
```

Reviews (1): Last reviewed commit: "fix(codex): remove invalid xhigh effort ..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant