fix(claude-code-plugin): improve SETUP.md + fix Anthropic temperature/top_p conflict#2
Open
lightzt99 wants to merge 1 commit into
Open
fix(claude-code-plugin): improve SETUP.md + fix Anthropic temperature/top_p conflict#2lightzt99 wants to merge 1 commit into
lightzt99 wants to merge 1 commit into
Conversation
lightzt99
force-pushed
the
doc/improve-claude-code-setup
branch
2 times, most recently
from
June 4, 2026 12:36
643b1c5 to
a5094b1
Compare
lightzt99
force-pushed
the
doc/improve-claude-code-setup
branch
from
June 4, 2026 12:45
a5094b1 to
3ad9507
Compare
…/top_p conflict SETUP.md improvements: - Step 2: add auto-detect flow reading LLM config from ~/.claude/settings.json - Step 2: document Anthropic model name normalization (dots → dashes, e.g. claude-sonnet-4.6 → claude-sonnet-4-6); settings.json uses dots, API requires dashes - Step 3a: move embedding model download to background immediately after pip install, so it runs in parallel with hook build and plugin staging - Step 3a: fix plugin uninstall idempotency — add `2>/dev/null || true` to swallow "not found" error when plugin was never installed - Error guide: add [E010] Anthropic temperature+top_p conflict — diagnosis and fix Bug fix: - AnthropicLLM.generate_response: pop top_p before sending to Anthropic API. Anthropic rejects requests where both temperature and top_p are specified (400). Verified with direct API call: temperature-only and top_p-only both succeed; sending both always returns 400 invalid_params. Co-Authored-By: Claude Sonnet 4 <[email protected]>
lightzt99
force-pushed
the
doc/improve-claude-code-setup
branch
from
June 4, 2026 13:17
3ad9507 to
2356383
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
~/.claude/settings.jsonin Step 2plugin uninstallidempotency (2>/dev/null || true)temperature+top_pconflictAnthropicLLM.generate_responsenow dropstop_pbefore calling the APIMotivation
Six failure modes were observed in the original PR. This update addresses three more
discovered during actual setup on macOS:
settings.jsonmodel names use dots (4.6) but Anthropic API requires dashes (4-6)plugin uninstallfails with exit code 1 when plugin not yet installedAnthropicLLMsends bothtemperatureandtop_pto Anthropic APIIssue 9 was verified by direct API call: sending both parameters always returns
400 - temperature and top_p cannot both be specified for this model.Changes
apps/claude-code-plugin/SETUP.md|| true, [E010] error entrysrc/powermem/integrations/llm/anthropic.pyparams.pop("top_p", None)beforeclient.messages.create()Test plan
try_to_load_from_cacherecognizestemperature+top_p→ 400;temperature-only → 200;top_p-only → 200dragonfruit-zx9, cleanup, global hook calls confirmed in server.log