Add pip fallback and update Claude model defaults#23
Merged
Conversation
6d05d19 to
1ebf7d4
Compare
ffc3c24 to
242d24e
Compare
9a1b953 to
71b69a8
Compare
…dd pip install fallback - Change default model from "sonnet" to "claude-sonnet-4-6" across all claude plugins (claudecode, claudecodeextract, claudecodecleanup, claudechrome) - Change default max_turns to 50 across all claude plugins - Add direct pip fallback in pip hook for when PipProvider/uv fails in sandboxed/CI environments (fixes papers-dl install failures) https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
…DMEs - Add --postinstall-scripts CLI flag to pip hook that uses direct pip install (bypassing uv/PipProvider) to ensure console_scripts entry points are created - Set postinstall_scripts: true in papersdl config.json required_binaries - Fix lock scope: move all _direct_pip_install fallbacks inside _locked_pip_venv - Pass min_version to _direct_pip_install fallback to preserve version contract - Update all claude plugin READMEs to reflect new model/max_turns defaults https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
…cripts abx-pkg>=1.9.23 natively supports postinstall_scripts, min_version, and min_release_age in Binary() and PipProvider(). Remove the custom _direct_pip_install fallback and pass these params through directly. - Remove _direct_pip_install function (~55 lines of dead code) - Remove all fallback logic from main() (3 separate fallback blocks) - Pass postinstall_scripts and min_release_age to PipProvider() constructor - Pass postinstall_scripts and min_release_age to Binary() constructor - Add --min-release-age CLI option for completeness - Pin abx-pkg>=1.9.23 in both pyproject.toml and script dependencies https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
The JS hook was using getEnv() with hardcoded fallbacks instead of hookConfig (which reads config.json defaults via loadConfig()). This meant config.json model default changes were ineffective. Also update MODEL_MAP to use current model IDs (claude-sonnet-4-6, claude-opus-4-6). https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
…ooks - Fix click.get_current_context() nullable return in all 9 hooks (use silent=True + None guard) - Fix pip hook overrides type annotation (add type: ignore for dict[str, dict[str, str]] -> BinaryOverrides covariance) - Fix custom hook binary_kwargs possibly unbound - Fix puppeteer _parse_override_install_args type narrowing (isinstance check for proper dict narrowing) - Add ty:ignore comments for **kwargs unpacking of request_kwargs (ty can't verify types through dict unpacking) - Remove unused SemVer import from npm hook - Fix claude.yml missing trailing newline https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
Binary() now defaults min_release_age=7.0 but apt, brew, cargo, npm, puppeteer, chromewebstore, and env providers either don't support it or don't need it. Set min_release_age=0 in request_kwargs to disable the security constraint check for these providers. https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
Both cleanup and extract now default to max_turns=50, so the claim that cleanup has a "higher default" is no longer accurate. https://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
71b69a8 to
635d8ca
Compare
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
This PR adds a direct pip installation fallback mechanism for the pip plugin and updates Claude model configuration defaults across multiple plugins to use the latest model identifiers.
Key Changes
Pip Plugin Enhancements
New
_direct_pip_install()function: Implements a fallback installation method that bypasses PipProvider/uv when they fail (e.g., in sandboxed or CI environments)--prefer-binaryflag to minimize build failurespip showFallback integration in main(): Added two fallback attempts:
Both fallback paths emit proper diagnostic messages and emit binary records before exiting
Claude Model Configuration Updates
Updated default model across all Claude plugins from short names (e.g., "sonnet") to full model identifiers:
claudecode: "sonnet" → "claude-sonnet-4-6"claudecodecleanup: "sonnet" → "claude-sonnet-4-6"claudecodeextract: "sonnet" → "claude-sonnet-4-6"claudechrome: "sonnet" → "claude-sonnet-4-6"Updated example descriptions to show full model identifiers (claude-sonnet-4-6, claude-opus-4-6, claude-haiku-4-5-20251001)
Increased default max_turns for better agentic reasoning:
claudecode: 10 → 50claudecodecleanup: 25 → 50claudecodeextract: 10 → 50Updated docstrings and test assertions to reflect new defaults
Implementation Details
pip showis unavailablehttps://claude.ai/code/session_017eYK4Gkxy3F4UwHwhy7j9D
Summary by cubic
Switches the pip installer to native
abx-pkg>=1.9.23support for post‑install scripts and release‑age checks, and updates Claude plugin defaults toclaude-sonnet-4-6withmax_turns=50. Fixesclaudechrometo use config defaults and refreshes model IDs.New Features
PipProvider/Binarywithpostinstall_scriptsandmin_release_age; add--postinstall-scriptsand--min-release-age; pinabx-pkg>=1.9.23.apt,brew,cargo,npm,puppeteer,chromewebstore,env): setmin_release_age: 0.claude-sonnet-4-6;max_turns=50; updateMODEL_MAPtoclaude-sonnet-4-6/claude-opus-4-6;claudechromereads defaults fromhookConfig; docs/tests updated (incl. cleanup test to allow equal max_turns).Migration
claude-sonnet-4-6forclaudecode,claudecodecleanup,claudecodeextract, andclaudechrome.max_turnsis now 50 forclaudecode,claudecodecleanup, andclaudecodeextract. Set model andmax_turnsin plugin config to keep prior behavior.Written for commit 635d8ca. Summary will update on new commits.