Skip to content

Fix OpenAI reasoning effort capabilities - #31

Merged
rafaeelricco merged 4 commits into
mainfrom
rafaeelricco/fix-openai-effort-capabilities
Jul 25, 2026
Merged

Fix OpenAI reasoning effort capabilities#31
rafaeelricco merged 4 commits into
mainfrom
rafaeelricco/fix-openai-effort-capabilities

Conversation

@rafaeelricco

Copy link
Copy Markdown
Owner

Motivation

■ Failed to create OpenAI response: 400 Unsupported value: minimal is not supported with the gpt-5.6-sol model. Supported values are: none, low, medium, high, and xhigh.

What's New

Model-Aware Effort Selection

  • Preserve OpenAI OAuth catalog capabilities and expose only reasoning efforts supported by both the selected model and installed SDK.
  • Carry the selected model through setup and model flows so the effort picker excludes unsupported values and normalizes stale selections to the model default.
  • Refresh OpenAI OAuth capabilities in commit effort; API-key OpenAI and other providers retain their offline behavior.

Resilient OpenAI Requests

  • Retry only effort-specific OpenAI 400 responses once without reasoning, allowing the provider default.
  • Record the effective effort in request metadata so fallback requests report provider default.

OpenAI Effort Selection Flow

graph TD
    A[OpenAI OAuth model catalog] --> B[Model capabilities]
    B --> C[Effort picker]
    C --> D[Responses request]
    D --> E{Unsupported effort 400?}
    E -->|No| F[Use selected effort]
    E -->|Yes, once| G[Retry without reasoning]
    G --> H[Provider default effort]
    style B fill:#808080,stroke:#333,stroke-width:2px
    style G fill:#808080,stroke:#333,stroke-width:2px
Loading

Testing & Feedback

  • Cover catalog capability filtering, stale-picker normalization, legacy minimal config decoding, OAuth refresh behavior, narrow fallback, and effective-effort metadata.
  • Verify with pnpm test, pnpm typecheck, pnpm lint, and pnpm build.

If you find any bugs or have recommendations for improvements, please open an issue and assign it to me.

@rafaeelricco rafaeelricco self-assigned this Jul 10, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95229a70b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/infra/llm/openai.ts Outdated
- Accept single, double, and backtick delimiters in message-only unsupported-effort responses.
- Cover the message-only backtick fallback with OpenAI stream tests.
@rafaeelricco

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 1ab236f460

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rafaeelricco
rafaeelricco merged commit 7936c06 into main Jul 25, 2026
4 checks passed
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