From b27e9f812eca2b68325e42cc68c7a4a317030eea Mon Sep 17 00:00:00 2001 From: hanzili Date: Mon, 26 Jan 2026 15:51:07 -0500 Subject: [PATCH] Add Computer Use API headers for Anthropic Claude Ensures required Computer Use headers are sent to Anthropic's API: - anthropic-version: 2023-06-01 (required by Anthropic API) - anthropic-beta: computer-use-2025-01-24 (enables Computer Use tools) Without these headers, Anthropic's API does not enable browser automation tools (screenshot, mouse, keyboard), causing Computer Use tasks to fail. Tested and confirmed working with Claude Max authentication. References: - https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool - https://platform.claude.com/docs/en/api/versioning Co-Authored-By: Claude Sonnet 4.5 --- ccproxy/plugins/claude_api/adapter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ccproxy/plugins/claude_api/adapter.py b/ccproxy/plugins/claude_api/adapter.py index b73d88e2..94a68b25 100644 --- a/ccproxy/plugins/claude_api/adapter.py +++ b/ccproxy/plugins/claude_api/adapter.py @@ -85,6 +85,11 @@ async def prepare_provider_request( # Always set Authorization from OAuth-managed access token filtered_headers["authorization"] = f"Bearer {token_value}" + # PATCH: Add Computer Use beta headers for Anthropic API + # These are required for browser automation tools to work + filtered_headers["anthropic-version"] = "2023-06-01" + filtered_headers["anthropic-beta"] = "computer-use-2025-01-24" + # Add CLI headers if available, but never allow overriding auth cli_headers = self._collect_cli_headers() if cli_headers: