[GH-ISSUE #2440] [Issue]: 11-PROV-RUNTIME-chatgpt-local-auth skips live ChatGPT model discovery #1194

Closed
opened 2026-10-21 05:28:43 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Promansis on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2440

Originally assigned to: @SpicyMarinara on GitHub.

Summary

11-PROV-RUNTIME-chatgpt-local-auth parity gap: the refactor ChatGPT local auth path does not attempt live ChatGPT Codex model discovery.

Expected behavior

When listing models for an openai_chatgpt connection, Marinara should use local Codex ChatGPT auth to call the ChatGPT Codex models endpoint, normalize returned models, and fall back to the curated static catalog only if live discovery fails or returns no models.

Actual behavior

The refactor always returns the static openai_chatgpt catalog for connection_models / llm_list_models; it does not call the ChatGPT Codex /models endpoint.

Steps to reproduce

  1. Configure an openai_chatgpt connection using local Codex ChatGPT auth.
  2. Request available models for that connection.
  3. Observe that refactor returns the curated catalog rather than attempting live ChatGPT Codex model discovery.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor@09923989 parityscan context from #2410
  • Run mode: Tauri desktop / remote runtime provider transport
  • OS + version: not run
  • Node + pnpm versions: not run
  • Rust version, if relevant: not run
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: OpenAI ChatGPT local auth model discovery

Logs, screenshots, or video

Static proof only. No private auth files inspected.

Legacy evidence:

  • packages/server/src/services/llm/openai-chatgpt-auth.ts: fetchOpenAIChatGPTModels calls ${OPENAI_CHATGPT_CODEX_BASE_URL}/models?client_version=..., applies local ChatGPT headers, caps response size, and normalizes slug/id plus display names at lines 259-287.
  • packages/server/src/routes/connections.routes.ts: openai_chatgpt model listing tries live fetchOpenAIChatGPTModels() and falls back to MODEL_LISTS.openai_chatgpt only on failure or empty results at lines 392-400.

Refactor evidence:

  • src-tauri/src/commands/storage/llm.rs: fetch_provider_models returns provider_model_catalog(provider) immediately for openai_chatgpt at lines 942-952.
  • src-tauri/src/commands/storage/llm.rs: connection_models and llm_models use lookup_llm_models, so this static-only result feeds both model-list paths at lines 224-264 and 365-376.

Regression notes

Worked in legacy main per #2410 source definition for 11-PROV-RUNTIME-chatgpt-local-auth.

Additional context

Surface: 11-PROV-RUNTIME-chatgpt-local-auth.

Tracked from #2410 Batch 13.

Acceptance criteria:

  • Refactor attempts live ChatGPT Codex model discovery for openai_chatgpt using local Codex ChatGPT auth.
  • Returned live models are normalized with stable id and name fields.
  • Refactor falls back to the curated catalog only when live discovery fails or returns no models.
  • Fallback responses preserve provider error/fallback metadata already used by connection_models.
  • Focused Rust proof covers live success, empty live result fallback, and provider error fallback without using private auth files.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 6, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2440 Originally assigned to: @SpicyMarinara on GitHub. ## Summary `11-PROV-RUNTIME-chatgpt-local-auth` parity gap: the refactor ChatGPT local auth path does not attempt live ChatGPT Codex model discovery. ## Expected behavior When listing models for an `openai_chatgpt` connection, Marinara should use local Codex ChatGPT auth to call the ChatGPT Codex models endpoint, normalize returned models, and fall back to the curated static catalog only if live discovery fails or returns no models. ## Actual behavior The refactor always returns the static `openai_chatgpt` catalog for `connection_models` / `llm_list_models`; it does not call the ChatGPT Codex `/models` endpoint. ## Steps to reproduce 1. Configure an `openai_chatgpt` connection using local Codex ChatGPT auth. 2. Request available models for that connection. 3. Observe that refactor returns the curated catalog rather than attempting live ChatGPT Codex model discovery. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor@09923989 parityscan context from #2410 - Run mode: Tauri desktop / remote runtime provider transport - OS + version: not run - Node + pnpm versions: not run - Rust version, if relevant: not run - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: OpenAI ChatGPT local auth model discovery ## Logs, screenshots, or video Static proof only. No private auth files inspected. Legacy evidence: - `packages/server/src/services/llm/openai-chatgpt-auth.ts`: `fetchOpenAIChatGPTModels` calls `${OPENAI_CHATGPT_CODEX_BASE_URL}/models?client_version=...`, applies local ChatGPT headers, caps response size, and normalizes `slug`/`id` plus display names at lines 259-287. - `packages/server/src/routes/connections.routes.ts`: `openai_chatgpt` model listing tries live `fetchOpenAIChatGPTModels()` and falls back to `MODEL_LISTS.openai_chatgpt` only on failure or empty results at lines 392-400. Refactor evidence: - `src-tauri/src/commands/storage/llm.rs`: `fetch_provider_models` returns `provider_model_catalog(provider)` immediately for `openai_chatgpt` at lines 942-952. - `src-tauri/src/commands/storage/llm.rs`: `connection_models` and `llm_models` use `lookup_llm_models`, so this static-only result feeds both model-list paths at lines 224-264 and 365-376. ## Regression notes Worked in legacy `main` per #2410 source definition for `11-PROV-RUNTIME-chatgpt-local-auth`. ## Additional context Surface: `11-PROV-RUNTIME-chatgpt-local-auth`. Tracked from #2410 Batch 13. Acceptance criteria: - Refactor attempts live ChatGPT Codex model discovery for `openai_chatgpt` using local Codex ChatGPT auth. - Returned live models are normalized with stable `id` and `name` fields. - Refactor falls back to the curated catalog only when live discovery fails or returns no models. - Fallback responses preserve provider error/fallback metadata already used by `connection_models`. - Focused Rust proof covers live success, empty live result fallback, and provider error fallback without using private auth files. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:28:43 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jun 6, 2026):

Fixed in refactor with commit 3ddf471e.

Behavior changed:

  • openai_chatgpt model lookup now attempts live ChatGPT Codex /models discovery using local Codex ChatGPT auth.
  • Live ChatGPT models normalize slug/id into id and display_name/name into name, with provider=openai_chatgpt.
  • Empty live catalogs and provider errors now surface as model lookup errors so connection_models keeps the existing curated fallback metadata path.
  • Claude Subscription remains static-only.

Verification:

  • cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_chatgpt -- --nocapture
  • cargo test --manifest-path src-tauri/Cargo.toml -p marinara-engine openai_chatgpt_connection_models -- --nocapture
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace
  • pnpm check:architecture

Note: cleared generated Rust target artifacts after the first storage test compile hit no-space-left-on-device; no source files were removed.

<!-- gh-comment-id:4638229977 --> @SpicyMarinara commented on GitHub (Jun 6, 2026): Fixed in refactor with commit 3ddf471e. Behavior changed: - openai_chatgpt model lookup now attempts live ChatGPT Codex /models discovery using local Codex ChatGPT auth. - Live ChatGPT models normalize slug/id into id and display_name/name into name, with provider=openai_chatgpt. - Empty live catalogs and provider errors now surface as model lookup errors so connection_models keeps the existing curated fallback metadata path. - Claude Subscription remains static-only. Verification: - cargo test --manifest-path src-tauri/Cargo.toml -p marinara-llm openai_chatgpt -- --nocapture - cargo test --manifest-path src-tauri/Cargo.toml -p marinara-engine openai_chatgpt_connection_models -- --nocapture - cargo check --manifest-path src-tauri/Cargo.toml --workspace - pnpm check:architecture Note: cleared generated Rust target artifacts after the first storage test compile hit no-space-left-on-device; no source files were removed.
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#1194
No description provided.