mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7314] [MERGED] fix(claude-subscription): use the installed Claude Code and its model catalog #7681
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7681
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7314
Author: @dariusjm290-code
Created: 10/8/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/claude-subscription-installed-cli📝 Commits (8)
8dc4c80fix(claude-subscription): use the installed Claude Code and its model catalogb13bacafix(claude-subscription): use the curated list only when Claude Code has no catalog3d56508fix(claude-subscription): keep the curated list for API-key connections01ef90afix(claude-subscription): skip the catalog without a known Claude Code version88ae21bfix(claude-subscription): address review on installed Claude Code selection852969afeat(claude-subscription): add CLAUDE_SUBSCRIPTION_USE_INSTALLED_CLI opt-out5cf7727fix(claude-subscription): keep the username out of the Claude Code debug logecdb5acMerge branch 'staging' of https://github.com/Pasta-Devs/Marinara-Engine into fix/claude-subscription-installed-cli📊 Changes
10 files changed (+308 additions, -19 deletions)
View changed files
📝
.env.example(+4 -0)📝
CHANGELOG.md(+1 -0)📝
docs/CONFIGURATION.md(+13 -12)📝
packages/server/src/config/runtime-config.ts(+11 -0)📝
packages/server/src/routes/connections.routes.ts(+20 -3)📝
packages/server/src/services/llm/providers/claude-subscription.provider.ts(+4 -0)➕
packages/server/src/services/llm/providers/claude-subscription/installed-cli.ts(+166 -0)📝
packages/shared/src/constants/model-lists.ts(+6 -3)➕
scripts/regressions/claude-subscription-installed-cli.regression.ts(+81 -0)📝
scripts/regressions/provider-compat.regression.ts(+2 -1)📄 Description
Linked issue
Closes #7313
Why this change
Claude (Subscription) runs the Claude Code build bundled with
@anthropic-ai/claude-agent-sdk(2.1.282 with SDK 0.3.282) and shows a hard-coded model list. New Claude models, most recently Claude Haiku 5.5, need a newer Claude Code than the bundled build and are missing from the list, so they can't be used until someone bumps the SDK and edits the list. That has already happened several times. The nativeclaudeinstall updates itself and Claude Code caches the account's model list locally, so Marinara can follow both instead of waiting for a release.What changed
claude-subscription/installed-cli.ts: finds the host's Claude Code (~/.local/bin/claude, thenclaudeon PATH;claude.exeon Windows), reads its version, and uses it only when it is at least as new as the SDK's bundled build (read from the SDK'smanifest.json). The result is cached for 5 minutes, so auto-updates are picked up without a restart.pathToClaudeCodeExecutable. Without a host install, or when it is older, the bundled build is used exactly as before (Docker, fresh hosts).<config dir>/cache/model-catalog/<org>-*-cc.json, honoringCLAUDE_CONFIG_DIR). It drops models whosemin_claude_code_versionis newer than the build in use and never reads another organization's catalog. The curated list remains the fallback when no catalog exists, the Claude Code version is unknown, or the connection bills an API key.claude-haiku-5-5andclaude-fable-5-1to the curated fallback list.scripts/regressions/claude-subscription-installed-cli.regression.ts(version compare, install selection and no-downgrade, catalog org/version filtering,CLAUDE_CONFIG_DIR).[Unreleased].Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran (not a substitute for the checks above):
pnpm checkpassed on the final commit.node ./scripts/run-regressions.mjs --filter scripts/regressions/claude-subscriptionpassed (new regression and the existing cache regression);claude-opus55andclaude-sonnet55regressions passed earlier on this branch.~/.local/bin/claudeover the bundled 2.1.282, the catalog listedclaude-haiku-5-5andclaude-fable-5-1, and realclaude-haiku-5-5requests succeeded for a single message and for a multi-turn chat (resume path).Still to verify by hand:
Local CodeRabbit review
Ran
coderabbit review --committed --base origin/stagingthree times (six findings):min_claude_code_versioncan't be checked.claude.cmdshim) is not detected. That case keeps the bundled build, same as before this PR; the native installer (claude.exe) is detected.claude --versionat most every 5 minutes, so it isn't worth the extra code.The last two fixes were not re-reviewed locally because the free OSS CodeRabbit limit was reached; GitHub CodeRabbit will review the full PR.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Only
CHANGELOG.mdchanged; no files underdocs/were touched.UI evidence (if applicable)
No UI changes; the existing model picker receives a different list.
🤖 Generated with Claude Code
Summary by CodeRabbit
Summary
CLAUDE_SUBSCRIPTION_USE_INSTALLED_CLI=falseto always use the bundled version.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.