[PR #1495] [MERGED] Fix OpenAI ChatGPT connection setup guidance #5115

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/1489-openai-chatgpt-helptext


📝 Commits (4)

  • f5d2ca9 fix chatgpt connection setup guidance
  • 751b736 fix stale chatgpt embedding override
  • 4ea2356 Fix stale embedding override cleanup
  • a1f4837 Merge remote-tracking branch 'origin/refactor' into fix/1489-openai-chatgpt-helptext

📊 Changes

8 files changed (+199561 additions, -199422 deletions)

View changed files

📝 graphify-out/.graphify_labels.json (+18 -7)
📝 graphify-out/GRAPH_REPORT.md (+745 -694)
📝 graphify-out/cache/stat-index.json (+1 -1)
📝 graphify-out/graph.json (+198462 -198661)
📝 graphify-out/manifest.json (+17 -17)
📝 src-tauri/crates/llm/src/lib.rs (+11 -1)
📝 src-tauri/src/commands/storage/prompts.rs (+142 -6)
📝 src/features/shell/connections/components/ConnectionEditor.tsx (+165 -35)

📄 Description

Linked issue

Closes #1489

Why this change

OpenAI (ChatGPT) connections in the refactor UI were missing the setup guidance from main, so users saw generic API key/base URL fields even though this provider uses the local Codex ChatGPT login instead of a provider API key.

What changed

  • Added the OpenAI (ChatGPT) local Codex auth help panel to the connection editor.
  • Disabled and scrubbed API Key and Base URL for ChatGPT connections so stale saved provider credentials are not reused.
  • Forced ChatGPT provider transport to ignore any configured base URL and always use the ChatGPT Codex endpoint.
  • Blocked ChatGPT connections from being used directly as embedding providers, while preserving the separate embedding connection escape hatch.
  • Clamped stale embedding connection overrides when the referenced connection is no longer an allowed embedding provider.
  • Added focused Rust tests for ChatGPT base URL routing and embedding rejection/selection paths.

Refactor impact

Primary owner:

Shell connections UI, Rust LLM provider transport, and Rust prompt embedding storage behavior.

Impact areas reviewed:

  • Connection editor provider switching, save payloads, disabled input state, and test copy.
  • OpenAI-compatible provider base URL routing.
  • Lorebook embedding connection resolution and provider dispatch.
  • Non-ChatGPT provider behavior around API keys, base URLs, and embedding connection options.

Boundary notes:

  • UI behavior stays in src/features/shell/connections.
  • ChatGPT provider transport stays in src-tauri/crates/llm.
  • Embedding safety stays in src-tauri/src/commands/storage/prompts.rs.
  • No engine, shared API, command registration, or remote-runtime route changes were needed.

Pressure points touched:

  • None of the named broad pressure points were touched.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Ran pnpm typecheck.
  • Ran pnpm build; it passed with the existing Vite large chunk warning.
  • Ran pnpm check:architecture.
  • Ran cargo check --manifest-path src-tauri/Cargo.toml --workspace.
  • Ran cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_chatgpt_base_url_ignores_configured_endpoint.
  • Ran cargo test --manifest-path src-tauri/Cargo.toml openai_chatgpt.
  • Ran pnpm exec prettier --check src/features/shell/connections/components/ConnectionEditor.tsx.
  • Ran git diff --check; only CRLF warnings were reported.
  • Ran native Tauri UI QA before the final Bunny picker clamp: opened the Connections panel, selected OpenAI (ChatGPT), verified the help panel was visible, verified API Key and Base URL were disabled, and deleted the temporary test connection.
  • Did not run a live ChatGPT provider call; that requires a valid local codex login session.
  • Did not rerun native UI after the final embedding picker clamp.

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 changelog update was made because this refactor branch checkout does not contain CHANGELOG.md.

UI evidence

Native UI behavior was checked locally as described above. No public screenshot or recording is attached.

Summary by CodeRabbit

  • New Features

    • Added support for OpenAI ChatGPT provider with local Codex login authentication, replacing API key-based auth.
    • Updated connection editor UI to show Codex-specific authentication guidance.
  • Bug Fixes

    • Prevented OpenAI ChatGPT from being used as an embedding provider; embeddings must now use a separate dedicated connection.

Review Change Stack


🔄 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/1495 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/1489-openai-chatgpt-helptext` --- ### 📝 Commits (4) - [`f5d2ca9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f5d2ca9bd0fdfa250efcb1b7afee0e242c8023d5) fix chatgpt connection setup guidance - [`751b736`](https://github.com/Pasta-Devs/Marinara-Engine/commit/751b73659aa29aca7fb6a9b3b3a499eb61e5e833) fix stale chatgpt embedding override - [`4ea2356`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4ea23560727a87ebf5a531c01926e1de783f4f64) Fix stale embedding override cleanup - [`a1f4837`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a1f4837bbfe064d62b4e27565c6da72eeb6c49e4) Merge remote-tracking branch 'origin/refactor' into fix/1489-openai-chatgpt-helptext ### 📊 Changes **8 files changed** (+199561 additions, -199422 deletions) <details> <summary>View changed files</summary> 📝 `graphify-out/.graphify_labels.json` (+18 -7) 📝 `graphify-out/GRAPH_REPORT.md` (+745 -694) 📝 `graphify-out/cache/stat-index.json` (+1 -1) 📝 `graphify-out/graph.json` (+198462 -198661) 📝 `graphify-out/manifest.json` (+17 -17) 📝 `src-tauri/crates/llm/src/lib.rs` (+11 -1) 📝 `src-tauri/src/commands/storage/prompts.rs` (+142 -6) 📝 `src/features/shell/connections/components/ConnectionEditor.tsx` (+165 -35) </details> ### 📄 Description ## Linked issue Closes #1489 ## Why this change OpenAI (ChatGPT) connections in the refactor UI were missing the setup guidance from main, so users saw generic API key/base URL fields even though this provider uses the local Codex ChatGPT login instead of a provider API key. ## What changed - Added the OpenAI (ChatGPT) local Codex auth help panel to the connection editor. - Disabled and scrubbed API Key and Base URL for ChatGPT connections so stale saved provider credentials are not reused. - Forced ChatGPT provider transport to ignore any configured base URL and always use the ChatGPT Codex endpoint. - Blocked ChatGPT connections from being used directly as embedding providers, while preserving the separate embedding connection escape hatch. - Clamped stale embedding connection overrides when the referenced connection is no longer an allowed embedding provider. - Added focused Rust tests for ChatGPT base URL routing and embedding rejection/selection paths. ## Refactor impact Primary owner: Shell connections UI, Rust LLM provider transport, and Rust prompt embedding storage behavior. Impact areas reviewed: - Connection editor provider switching, save payloads, disabled input state, and test copy. - OpenAI-compatible provider base URL routing. - Lorebook embedding connection resolution and provider dispatch. - Non-ChatGPT provider behavior around API keys, base URLs, and embedding connection options. Boundary notes: - UI behavior stays in `src/features/shell/connections`. - ChatGPT provider transport stays in `src-tauri/crates/llm`. - Embedding safety stays in `src-tauri/src/commands/storage/prompts.rs`. - No engine, shared API, command registration, or remote-runtime route changes were needed. Pressure points touched: - None of the named broad pressure points were touched. ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Ran `pnpm typecheck`. - Ran `pnpm build`; it passed with the existing Vite large chunk warning. - Ran `pnpm check:architecture`. - Ran `cargo check --manifest-path src-tauri/Cargo.toml --workspace`. - Ran `cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_chatgpt_base_url_ignores_configured_endpoint`. - Ran `cargo test --manifest-path src-tauri/Cargo.toml openai_chatgpt`. - Ran `pnpm exec prettier --check src/features/shell/connections/components/ConnectionEditor.tsx`. - Ran `git diff --check`; only CRLF warnings were reported. - Ran native Tauri UI QA before the final Bunny picker clamp: opened the Connections panel, selected OpenAI (ChatGPT), verified the help panel was visible, verified API Key and Base URL were disabled, and deleted the temporary test connection. - Did not run a live ChatGPT provider call; that requires a valid local `codex login` session. - Did not rerun native UI after the final embedding picker clamp. ## 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 changelog update was made because this refactor branch checkout does not contain `CHANGELOG.md`. ## UI evidence Native UI behavior was checked locally as described above. No public screenshot or recording is attached. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for OpenAI ChatGPT provider with local Codex login authentication, replacing API key-based auth. * Updated connection editor UI to show Codex-specific authentication guidance. * **Bug Fixes** * Prevented OpenAI ChatGPT from being used as an embedding provider; embeddings must now use a separate dedicated connection. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1495?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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:13:26 +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#5115
No description provided.