OAuth (Claude Code keychain) + 2025-01-24 tool versions#9
Open
beemusicco wants to merge 3 commits into
Open
Conversation
Standalone-runnable refresh of @PallavAg's repo on Apple Silicon Python 3.14 / anthropic SDK 0.109+ / haiku-4-5 / sonnet-4-5. CHANGES 1. Auth: prefer Claude Code OAuth token from macOS keychain ('Claude Code-credentials' -> claudeAiOauth.accessToken). Falls back to ANTHROPIC_API_KEY env var. Sets anthropic-beta: oauth-2025-04-20 when using OAuth. 2. Tool versions: computer_20241022 -> computer_20250124 bash_20241022 -> bash_20250124 text_editor_20241022 -> text_editor_20250728 editor name "str_replace_editor" -> "str_replace_based_edit_tool" Beta flag: computer-use-2024-10-22 -> computer-use-2025-01-24 3. Default model: claude-haiku-4-5-20251001 (claude-3-5-sonnet-20241022 returns 404 / not-found at console.anthropic.com now). Override with env CCU_MODEL. Note: claude-3-5-sonnet-20241022 is fully retired; computer_20241022 tool family is rejected by current models with "does not support tool types: computer_20241022, bash_20241022, text_editor_20241022".
wait, scroll, triple_click, hold_key, left_mouse_down, left_mouse_up. Also: left_click/right_click/middle_click/double_click/triple_click now accept optional coordinate (move-then-click). Tested end-to-end via OAuth + haiku-4-5: screenshot → wait 2s → scroll down 3 at (640,400) → screenshot. All actions execute, no errors. Safety caps: wait + hold_key duration clamped to 30s.
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
Refresh of the repo so it runs against the current Anthropic API on Apple Silicon (M-series) macOS in 2026.
Claude Code-credentials→claudeAiOauth.accessToken) before falling back toANTHROPIC_API_KEY. Useful for Pro/Max subscribers who don't want to provision a separate console API key. Addsanthropic-beta: oauth-2025-04-20when using OAuth.computer_20250124,bash_20250124,text_editor_20250728(with the renamedstr_replace_based_edit_tool), beta flagcomputer-use-2025-01-24. Current models (haiku-4-5, sonnet-4-5) reject the old*_20241022tool family.claude-3-5-sonnet-20241022returns 404 frommessages.createfor Claude.ai-OAuth tokens now. Default switched toclaude-haiku-4-5-20251001. Override withCCU_MODEL.Test plan
python main.py "Take exactly ONE screenshot and write a one-sentence description"— happy path, single-turn.scroll/triple_click/hold_key/waitthatcomputer_20250124exposes — the model currently uses the subset that maps onto pyautogui).Notes
CCU_MODELwhen there's headroom.screencapturePATH fix is in the operator's local launcher, not inmain.py(it's a downstream environment concern, not upstream-relevant).