[PR #2270] [MERGED] Preserve xhigh reasoning for GPT-5.1-Codex-Max #5524

Closed
opened 2026-10-22 04:17:03 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2270
Author: @Xelvanis
Created: 6/5/2026
Status: ✅ Merged
Merged: 6/5/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/preserve-xhigh-reasoning


📝 Commits (1)

  • 9981b96 Preserve xhigh reasoning for GPT-5.1-Codex-Max

📊 Changes

2 files changed (+165 additions, -8 deletions)

View changed files

📝 src-tauri/crates/llm/src/lib.rs (+143 -4)
📝 src/engine/generation/provider-visible-parameters.ts (+22 -4)

📄 Description

Linked issue

Closes https://github.com/Pasta-Devs/Marinara-Engine/issues/2264

Why this change

  • gpt-5.1-codex-max supports xhigh reasoning, but Marinara's OpenAI request shaping still downgraded xhigh and the maximum alias to high.
  • That made the user-selected X High setting disagree with the actual OpenAI Responses payload and the visible prompt snapshot.

What changed

  • Added OpenAI model-id parsing and an xhigh support gate shared by the Rust OpenAI Responses body path.
  • Preserved xhigh for gpt-5.1-codex-max and gpt-5.2+ model ids while keeping gpt-5-pro and unsupported GPT-5.1 models on high.
  • Kept the TypeScript provider-visible-parameters mirror aligned with the Rust transport behavior.
  • Added Rust regression coverage for supported xhigh, maximum, unsupported downgrade, and OpenRouter Claude downgrade behavior.

Refactor impact

Primary owner:

Rust LLM provider transport and engine generation parameter visibility.

Impact areas reviewed:

  • OpenAI Responses request body shaping.
  • OpenRouter Claude reasoning parameter behavior.
  • Prompt snapshot and prompt-preview visible parameter mirrors.
  • Static model-list exposure for gpt-5.1-codex-max.

Boundary notes:

  • Product-level visible request metadata remains in src/engine/generation.
  • Provider transport behavior remains in src-tauri/crates/llm.
  • No React UI, shared API wrapper, command registration, storage, or remote-runtime route changes.

Pressure points touched:

  • None of the known broad UI or command-registration pressure points were touched.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_responses_body -- --nocapture passed.
  • cargo check --manifest-path src-tauri/Cargo.toml -p marinara-llm passed.
  • pnpm typecheck passed.
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check passed.
  • pnpm exec prettier --check src/engine/generation/provider-visible-parameters.ts passed.
  • git diff --check passed.
  • pnpm check passed.
  • No live provider/Tauri request was run.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix for existing generation parameter compatibility; no new discoverable feature or workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs changes needed for this provider compatibility bugfix.

UI evidence

N/A. No visible UI layout or interaction changed.

Summary by CodeRabbit

  • New Features

    • Added support for GPT-5 models including minor versions (e.g., gpt-5.2).
    • Implemented model-aware reasoning effort handling that intelligently adapts parameter values based on model capabilities.
  • Tests

    • Extended test coverage for reasoning effort parameter handling across different model types.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/2270 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 6/5/2026 **Status:** ✅ Merged **Merged:** 6/5/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/preserve-xhigh-reasoning` --- ### 📝 Commits (1) - [`9981b96`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9981b96002fade63007e453a922ffe6def0cdf06) Preserve xhigh reasoning for GPT-5.1-Codex-Max ### 📊 Changes **2 files changed** (+165 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/crates/llm/src/lib.rs` (+143 -4) 📝 `src/engine/generation/provider-visible-parameters.ts` (+22 -4) </details> ### 📄 Description ## Linked issue Closes https://github.com/Pasta-Devs/Marinara-Engine/issues/2264 ## Why this change - `gpt-5.1-codex-max` supports `xhigh` reasoning, but Marinara's OpenAI request shaping still downgraded `xhigh` and the `maximum` alias to `high`. - That made the user-selected X High setting disagree with the actual OpenAI Responses payload and the visible prompt snapshot. ## What changed - Added OpenAI model-id parsing and an `xhigh` support gate shared by the Rust OpenAI Responses body path. - Preserved `xhigh` for `gpt-5.1-codex-max` and `gpt-5.2+` model ids while keeping `gpt-5-pro` and unsupported GPT-5.1 models on `high`. - Kept the TypeScript provider-visible-parameters mirror aligned with the Rust transport behavior. - Added Rust regression coverage for supported `xhigh`, `maximum`, unsupported downgrade, and OpenRouter Claude downgrade behavior. ## Refactor impact Primary owner: Rust LLM provider transport and engine generation parameter visibility. Impact areas reviewed: - OpenAI Responses request body shaping. - OpenRouter Claude reasoning parameter behavior. - Prompt snapshot and prompt-preview visible parameter mirrors. - Static model-list exposure for `gpt-5.1-codex-max`. Boundary notes: - Product-level visible request metadata remains in `src/engine/generation`. - Provider transport behavior remains in `src-tauri/crates/llm`. - No React UI, shared API wrapper, command registration, storage, or remote-runtime route changes. Pressure points touched: - None of the known broad UI or command-registration pressure points were touched. ## Validation - [x] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [x] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - `cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_responses_body -- --nocapture` passed. - `cargo check --manifest-path src-tauri/Cargo.toml -p marinara-llm` passed. - `pnpm typecheck` passed. - `cargo fmt --manifest-path src-tauri/Cargo.toml --check` passed. - `pnpm exec prettier --check src/engine/generation/provider-visible-parameters.ts` passed. - `git diff --check` passed. - `pnpm check` passed. - No live provider/Tauri request was run. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix for existing generation parameter compatibility; no new discoverable feature or workflow. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims No docs changes needed for this provider compatibility bugfix. ## UI evidence N/A. No visible UI layout or interaction changed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for GPT-5 models including minor versions (e.g., gpt-5.2). * Implemented model-aware reasoning effort handling that intelligently adapts parameter values based on model capabilities. * **Tests** * Extended test coverage for reasoning effort parameter handling across different model types. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:17:03 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5524
No description provided.