[PR #2043] [CLOSED] Fix Claude subscription model catalog #5408

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2043
Author: @cha1latte
Created: 6/3/2026
Status: ❌ Closed

Base: refactor ← Head: fix/issue-2032-claude-subscription-models


📝 Commits (1)

  • fb4183c Fix Claude subscription model catalog

📊 Changes

4 files changed (+122 additions, -21 deletions)

View changed files

📝 src-tauri/crates/llm/src/lib.rs (+83 -11)
📝 src-tauri/src/commands/storage/llm.rs (+4 -4)
➕ src/engine/contracts/constants/model-lists.test.ts (+24 -0)
📝 src/engine/contracts/constants/model-lists.ts (+11 -6)

📄 Description

Linked issue

Closes #2032

Why this change

  • Claude (Subscription) users need the local Claude Code model picker to expose the current subscription choices, including Opus 4.8 and explicit 1M-context options, without forwarding [1m] as a fake Claude model id.

What changed

  • Updated the frontend Claude Subscription static catalog to match the requested selector order, add the [1m] Opus entries, mark legacy Opus entries, and remove retired 4.5 subscription aliases.
  • Updated the Rust model fallback catalog for Claude Subscription so API-backed model lookup returns the same ids.
  • Added Claude Subscription runtime mapping that strips a [1m] suffix before --model and adds --betas context-1m-2025-08-07 for Claude Code.
  • Added regression coverage for the catalog order, stale alias removal, and [1m]/plain model CLI arg behavior.

Refactor impact

Primary owner:

  • runtime generation / Rust storage

Impact areas reviewed:

  • Claude Subscription connection model catalog
  • Claude Code generation command construction
  • Claude Subscription diagnosis command construction

Boundary notes:

  • Engine constants remain React-free.
  • Feature UI continues to consume MODEL_LISTS; no new raw Tauri calls or remote-runtime fetch paths.
  • Rust runtime changes stay inside the existing Claude Subscription provider path.
  • Independent implementation from upstream/refactor; existing PR #2031 was not used as source material.

Pressure points touched:

  • None of the mode surfaces, command registration, imports, or remote-runtime routing paths were changed.

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

  • Codex proof: node scratch\issue-2032-repro.mjs failed before the fix and passed after the fix.
  • Codex proof: pnpm exec vitest run src\engine\contracts\constants\model-lists.test.ts passed.
  • Codex proof: cargo test --manifest-path src-tauri\Cargo.toml -p marinara-llm claude_subscription_ passed.
  • Codex proof: pnpm typecheck passed.
  • Codex proof: cargo check --manifest-path src-tauri\Cargo.toml --workspace passed.
  • Codex proof: pnpm check passed.
  • Live Claude Code generation was not run because it requires authenticated external provider usage; the app-owned contract proof covers the emitted CLI args and catalog options.

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:

  • This only refreshes an existing provider's model choices and request mapping.

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

UI evidence

  • N/A; this is a catalog/runtime mapping fix. Raw command proof is recorded under scratch/issue-2032-proof.txt in the local worktree.

🔄 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/2043 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/3/2026 **Status:** ❌ Closed **Base:** `refactor` ← **Head:** `fix/issue-2032-claude-subscription-models` --- ### 📝 Commits (1) - [`fb4183c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fb4183cef69a0ce350e4e9eac424a3de7c14038a) Fix Claude subscription model catalog ### 📊 Changes **4 files changed** (+122 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/crates/llm/src/lib.rs` (+83 -11) 📝 `src-tauri/src/commands/storage/llm.rs` (+4 -4) ➕ `src/engine/contracts/constants/model-lists.test.ts` (+24 -0) 📝 `src/engine/contracts/constants/model-lists.ts` (+11 -6) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2032 ## Why this change - Claude (Subscription) users need the local Claude Code model picker to expose the current subscription choices, including Opus 4.8 and explicit 1M-context options, without forwarding `[1m]` as a fake Claude model id. ## What changed - Updated the frontend Claude Subscription static catalog to match the requested selector order, add the `[1m]` Opus entries, mark legacy Opus entries, and remove retired 4.5 subscription aliases. - Updated the Rust model fallback catalog for Claude Subscription so API-backed model lookup returns the same ids. - Added Claude Subscription runtime mapping that strips a `[1m]` suffix before `--model` and adds `--betas context-1m-2025-08-07` for Claude Code. - Added regression coverage for the catalog order, stale alias removal, and `[1m]`/plain model CLI arg behavior. ## Refactor impact Primary owner: - runtime generation / Rust storage Impact areas reviewed: - Claude Subscription connection model catalog - Claude Code generation command construction - Claude Subscription diagnosis command construction Boundary notes: - Engine constants remain React-free. - Feature UI continues to consume `MODEL_LISTS`; no new raw Tauri calls or remote-runtime fetch paths. - Rust runtime changes stay inside the existing Claude Subscription provider path. - Independent implementation from `upstream/refactor`; existing PR #2031 was not used as source material. Pressure points touched: - None of the mode surfaces, command registration, imports, or remote-runtime routing paths were changed. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] 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 - Codex proof: `node scratch\issue-2032-repro.mjs` failed before the fix and passed after the fix. - Codex proof: `pnpm exec vitest run src\engine\contracts\constants\model-lists.test.ts` passed. - Codex proof: `cargo test --manifest-path src-tauri\Cargo.toml -p marinara-llm claude_subscription_` passed. - Codex proof: `pnpm typecheck` passed. - Codex proof: `cargo check --manifest-path src-tauri\Cargo.toml --workspace` passed. - Codex proof: `pnpm check` passed. - Live Claude Code generation was not run because it requires authenticated external provider usage; the app-owned contract proof covers the emitted CLI args and catalog options. ## 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: - This only refreshes an existing provider's model choices and request mapping. ## 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 ## UI evidence - N/A; this is a catalog/runtime mapping fix. Raw command proof is recorded under `scratch/issue-2032-proof.txt` in the local worktree. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16: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#5408
No description provided.