@@ -48,19 +48,21 @@ const claudeToolPrefix = ""
4848// oauthToolRenameMap maps OpenCode-style (lowercase) tool names to Claude Code-style
4949// (TitleCase) names. Anthropic uses tool name fingerprinting to detect third-party
5050// clients on OAuth traffic. Renaming to official names avoids extra-usage billing.
51- // Tools without a Claude Code equivalent (e.g. "question", "skill") are removed entirely .
51+ // All tools are mapped to TitleCase equivalents to match Claude Code naming patterns .
5252var oauthToolRenameMap = map [string ]string {
53- "bash" : "Bash" ,
54- "read" : "Read" ,
55- "write" : "Write" ,
56- "edit" : "Edit" ,
57- "glob" : "Glob" ,
58- "grep" : "Grep" ,
59- "task" : "Task" ,
60- "webfetch" : "WebFetch" ,
61- "todowrite" : "TodoWrite" ,
62- "ls" : "LS" ,
63- "todoread" : "TodoRead" ,
53+ "bash" : "Bash" ,
54+ "read" : "Read" ,
55+ "write" : "Write" ,
56+ "edit" : "Edit" ,
57+ "glob" : "Glob" ,
58+ "grep" : "Grep" ,
59+ "task" : "Task" ,
60+ "webfetch" : "WebFetch" ,
61+ "todowrite" : "TodoWrite" ,
62+ "question" : "Question" ,
63+ "skill" : "Skill" ,
64+ "ls" : "LS" ,
65+ "todoread" : "TodoRead" ,
6466 "notebookedit" : "NotebookEdit" ,
6567}
6668
@@ -73,12 +75,9 @@ var oauthToolRenameReverseMap = func() map[string]string {
7375 return m
7476}()
7577
76- // oauthToolsToRemove lists tool names that have no Claude Code equivalent and must
77- // be stripped from OAuth requests to avoid third-party fingerprinting.
78- var oauthToolsToRemove = map [string ]bool {
79- "question" : true ,
80- "skill" : true ,
81- }
78+ // oauthToolsToRemove lists tool names that must be stripped from OAuth requests
79+ // even after remapping. Currently empty — all tools are mapped instead of removed.
80+ var oauthToolsToRemove = map [string ]bool {}
8281
8382// Anthropic-compatible upstreams may reject or even crash when Claude models
8483// omit max_tokens. Prefer registered model metadata before using a fallback.
0 commit comments