Skip to content

[Bug]: OpenWork does not send reasoning_effort for codex models #633

@iljaiass

Description

@iljaiass

Summary

Description

OpenWork UI allows selecting "Thinking" level for gpt-5.3-codex and other codex models, but the selected level is not applied when using CLIProxyAPIPlus as the provider.

Root Cause

OpenWork sends variant parameter (used by Claude models), but does not send reasoning_effort (required by codex models per CLIProxyAPIPlus PR #231).

Expected Behavior

When selecting gpt-5.3-codex model with Thinking level set to High in the UI:

  1. OpenWork should send reasoning_effort: "high" in the API request to the provider
  2. CLIProxyAPIPlus should receive and apply level=high reasoning
  3. The model should use high-level reasoning (visible in logs: thinking: ... level=high)
  4. Response quality should reflect the selected reasoning level

Example request body:

{
  "model": "gpt-5.3-codex",
  "messages": [...],
  "variant": "high",
  "reasoning_effort": "high"  // ← This should be present
}

Example CLIProxyAPIPlus logs (expected):

[debug] thinking: original config from request | provider=codex model=gpt-5.3-codex mode=level budget=0 level=high
[debug] thinking: processed config to apply | provider=codex model=gpt-5.3-codex mode=level budget=0 level=high

Actual Behavior

When selecting gpt-5.3-codex model with Thinking level set to High in the UI:

  1. OpenWork only sends variant: "high" in the API request
  2. CLIProxyAPIPlus does not receive reasoning_effort parameter
  3. CLIProxyAPIPlus falls back to default level=medium (ignores variant for codex models)
  4. The selected Thinking level has no effect on the model behavior

Actual request body:

{
  "model": "gpt-5.3-codex",
  "messages": [...],
  "variant": "high"  // ← Only this is sent, reasoning_effort is missing
}

Actual CLIProxyAPIPlus logs:

[debug] thinking: original config from request | provider=codex model=gpt-5.3-codex mode=level budget=0 level=medium
[debug] thinking: processed config to apply | provider=codex model=gpt-5.3-codex mode=level budget=0 level=medium

The Thinking level selector in the UI has no effect when using codex models with CLIProxyAPIPlus.

Proposed Fix

In packages/app/src/app/app.tsx, add reasoning_effort for codex models:

const selectedVariant = modelVariant() ?? undefined;
const codexReasoningEffort =
  model.modelID.includes("codex") && selectedVariant && selectedVariant !== "none"
    ? selectedVariant
    : undefined;

// In session.command and session.promptAsync:
{
  ...
  variant: selectedVariant,
  ...(codexReasoningEffort ? { reasoning_effort: codexReasoningEffort } : {}),
}

Environment

  • OpenWork version: v0.11.113
  • Provider: CLIProxyAPIPlus v6.8.23
  • Model: gpt-5.3-codex, gpt-5.2-codex
  • Platform: Windows 10

References

Steps to reproduce

  1. Configure OpenWork to use CLIProxyAPIPlus as provider:

    • Base URL: http://your-server:8317/v1
    • Provider: CLIProxyAPIPlus v6.8.23+
  2. Select model gpt-5.3-codex or gpt-5.2-codex in OpenWork UI

  3. Set Thinking level to High or X-High using the UI dropdown

  4. Send any test message to the model

  5. Check CLIProxyAPIPlus logs:

    tail -f /path/to/cliproxyplus/logs/main.log | grep "thinking:"
  6. Observe that the log shows level=medium instead of level=high

Expected behavior

When Thinking level is set to High in the OpenWork UI for a codex model:

  1. OpenWork should send reasoning_effort: "high" in the API request body
  2. CLIProxyAPIPlus should receive and apply high-level reasoning
  3. Logs should show: level=high (not level=medium)
  4. Model responses should reflect the selected reasoning level

Expected API request:

{
  "model": "gpt-5.3-codex",
  "messages": [...],
  "variant": "high",
  "reasoning_effort": "high"
}

Expected CLIProxyAPIPlus logs:

[debug] thinking: original config from request | provider=codex model=gpt-5.3-codex mode=level budget=0 level=high
[debug] thinking: processed config to apply | provider=codex model=gpt-5.3-codex mode=level budget=0 level=high

### Actual behavior

When Thinking level is set to `High` in the OpenWork UI for a codex model:

1. OpenWork only sends `variant: "high"` (but NOT `reasoning_effort`)
2. CLIProxyAPIPlus ignores `variant` for codex models
3. CLIProxyAPIPlus falls back to default: `level=medium`
4. The Thinking level selector has **no effect** on model behavior

**Actual API request:**
```json
{
  "model": "gpt-5.3-codex",
  "messages": [...],
  "variant": "high"
  // ❌ reasoning_effort is missing
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions