feat(providers): latest Claude models on Anthropic Subscription profile - #520
Open
SleepySML wants to merge 12 commits into
Open
feat(providers): latest Claude models on Anthropic Subscription profile#520SleepySML wants to merge 12 commits into
SleepySML wants to merge 12 commits into
Conversation
On an anthropic-subscription profile, AgentCLI records an explicit -m/--model in CODEMIE_CLI_MODEL and the provider's enrichArgs injects it into the claude binary args (dedup-guarded, never from the stored profile), so the user's model choice reaches Claude Code instead of being blanked. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
…bscription On an anthropic-subscription profile the newer-than-verified Claude Code prompt now defaults to continuing on the installed version instead of installing the older pinned one, and the older-but-supported prompt notes that newer models may be unavailable. Proxied providers keep the tested 'install' default; the minimum-version block is unchanged. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
The launch banner now shows the explicit --model on a subscription profile, or a per-session phrase (instead of 'unknown') when none was passed, since CODEMIE_MODEL is blanked for this provider. Other providers are unchanged. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
…f erroring `codemie models list` on an anthropic-subscription profile now prints where models come from (the user's Anthropic subscription + installed Claude Code) and how to switch in-session with /model, exiting 0 instead of the "not supported" error. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
Anthropic Subscription setup no longer prompts for a model (which was pre-filled with 'sonnet' and never took effect); it stores an empty model and the success summary states the model is chosen per session by Claude Code and the user's Anthropic subscription. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
Code review CR-001: setting CODEMIE_CLI_MODEL only when --model was passed let a value already present in the environment (e.g. shell-exported) survive into a no---model subscription launch and be injected as --model. Extract applyCliModelEnv, which deletes the var first, so it reflects only this launch's explicit --model. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
…pty string Code review CR-002: setup now passes an empty model for anthropic-subscription, but buildConfig still stored model:'' — spec CS6 says store no model. Omit the field when empty so the persisted profile has no model key (avoids an empty-string value on a get->update round-trip). Adds the buildConfig-empty test (plan test item 5). Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
…ough Code review CR-003 (plan test item 2): add a regression test asserting the CODEMIE_CLI_MODEL passthrough stays anthropic-subscription only — moonshot wires no claude enrichArgs and never injects --model even with CODEMIE_CLI_MODEL set. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
Spec, plan, technical analysis, complexity assessments, code-review verdicts, QA report, and gate/decision ledgers for EPMCDME-14341. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
Manual edge-case check found the dedup guard missed the `--model=value` form (reachable via raw passthrough, e.g. `-m X -- --model=Y`), which double-injected --model. Match both `--model` and `--model=` before injecting. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
…ides Knowledge-harvester: add an Anthropic Subscription Provider section to external-integrations.md covering the no-stored-model behavior, the CODEMIE_CLI_MODEL side-channel, and the subscription-scoped version-prompt policy; add a Service Overview row. Refs: EPMCDME-14341 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hbz7irf4enuYb3G5r3jdxi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On an Anthropic Subscription profile, CodeMie was removing model access from a user who already pays for it: the
-m/--modelflag was silently swallowed, and the newer-than-pinned version prompt defaulted to downgrading Claude Code below the newest models. This PR passes the user's--modelstraight through to Claude Code, stops setup from asking for/storing a model that never takes effect, makescodemie models listexplain (not error) the subscription model source, and flips the newer-than-verified prompt so its default continues on the installed version — subscription-scoped; the minimum-version block is unchanged.Ticket: EPMCDME-14341 — https://jiraeu.epam.com/browse/EPMCDME-14341
Changes
AgentCLIpublishes the explicit--modelasCODEMIE_CLI_MODEL(cleared first, so a stale shell value never leaks); theanthropic-subscriptionprovider'senrichArgsinjects--modelinto theclaudebinary (dedup-guarded). No--model→ Claude Code's own default. The shared env pipeline is untouched, so API-key/SSO/Bedrock/LiteLLM/moonshot are unaffected.newerVersionPromptDefault/olderSupportedModelNote); the older-but-supported prompt adds a "newer models may be unavailable" note and still offers the update; the below-minimum block is unchanged; proxied providers keep the testedinstalldefault.unknown.models liston a subscription profile prints where models come from and how to switch in-session (/model), exiting 0.Impact
Subscription users can now select and actually run the newest Claude models they're entitled to via
codemie-claude --model <id>, and accepting the version prompt's default no longer strips newer models by downgrading the binary. No entitlement logic is added — Claude Code owns any refusal, CodeMie relays it.Testing
enrichArgspassthrough incl. dedup +--plugin-dircomposition, version-prompt policy, launch-model-display, models-list message, setup summary,cli-model-envclear-before-set (incl. the shell-preset leak case),buildConfig('')→ no model, and a moonshot-subscription isolation guard.proxy-routing-guard(subscription proxy bypass) andmodel-tier-e2e(non-subscription env pipeline): pass. The fulltest:integration(cliproject) hangs locally on an unrelated subprocess/PTY test needing the live backend — CI runs it unconditionally.Checklist
🤖 Generated with Claude Code