fix: map claude model ids to active provider model in proxy#11
fix: map claude model ids to active provider model in proxy#11GlamgarOnDiscord wants to merge 3 commits intoLeonxlnx:mainfrom
Conversation
Adds CLAUDE.md with tool preferences for working on this codebase, AGENTS.md with quick-reference rules for AI agents, and a Claude Code PreToolUse hook that routes bash commands through rtk for 60–90% token reduction on common operations. CLAUDE.md covers all supported providers, recommended CLI tools (fd, rg, ast-grep, jq, sd, tokei), and usage patterns that reduce context noise. AGENTS.md is the short-form version for agent consumption. The .claude/settings.json hook is opt-in and only fires on Bash tool calls. No source files are modified.
When the bundled client sends a Claude model id (e.g. claude-sonnet-4-20250514) to a non-Anthropic provider, the proxy was passing it through unchanged. Gemini, Groq, OpenAI and others do not recognise Claude model names, causing a 404 NOT_FOUND error. Detect requests where the model starts with 'claude-' or is a plain alias (sonnet, opus, haiku) and remap them to ACTIVE_MODEL before forwarding. Provider-native model ids (gemini-2.5-flash, gpt-4.1, etc.) are still passed through unchanged. Fixes Leonxlnx#9
Reviewer's GuideMaps Claude model IDs and aliases to the active provider model in the Anthropic compatibility proxy so non-Anthropic providers don't receive unknown model names, and adds Claude/agent tooling docs plus an rtk command-rewrite hook for local Claude Code usage. Sequence diagram for model id remapping in Anthropic compatibility proxysequenceDiagram
actor Developer
participant Client
participant AnthropicCompatProxy
participant resolveRequestModel
participant ProviderAPI
Developer->>Client: Send chat request
Client->>AnthropicCompatProxy: POST /messages (model=claude-sonnet-4-20250514)
AnthropicCompatProxy->>resolveRequestModel: resolveRequestModel(body)
resolveRequestModel->>resolveRequestModel: Read requested model
resolveRequestModel->>resolveRequestModel: Detect claude-* or alias (sonnet/opus/haiku)
resolveRequestModel-->>AnthropicCompatProxy: ACTIVE_MODEL
AnthropicCompatProxy->>ProviderAPI: Forward request (model=ACTIVE_MODEL)
ProviderAPI-->>AnthropicCompatProxy: 200 OK
AnthropicCompatProxy-->>Client: Response
rect rgb(230,230,230)
Note over Developer,ProviderAPI: Provider native id path
end
Developer->>Client: Send chat request
Client->>AnthropicCompatProxy: POST /messages (model=gemini-2.5-flash)
AnthropicCompatProxy->>resolveRequestModel: resolveRequestModel(body)
resolveRequestModel->>resolveRequestModel: Model is not claude-* or alias
resolveRequestModel-->>AnthropicCompatProxy: gemini-2.5-flash
AnthropicCompatProxy->>ProviderAPI: Forward request (model=gemini-2.5-flash)
ProviderAPI-->>AnthropicCompatProxy: 200 OK
AnthropicCompatProxy-->>Client: Response
Sequence diagram for rtk rewrite Claude hook behaviorsequenceDiagram
participant ClaudeCode
participant RTKRewriteHook
participant jq
participant rtk
ClaudeCode->>RTKRewriteHook: PreToolUse event with tool_input
RTKRewriteHook->>jq: Parse tool_input.command
jq-->>RTKRewriteHook: Extracted command
RTKRewriteHook->>rtk: rtk rewrite command
rtk-->>RTKRewriteHook: Rewritten command
rtk-->>RTKRewriteHook: Exit code 0 or 3
alt Exit code 0 and command changed
RTKRewriteHook->>jq: Update tool_input.command
jq-->>RTKRewriteHook: Updated input JSON
RTKRewriteHook-->>ClaudeCode: hookSpecificOutput with<br/>hookEventName PreToolUse<br/>permissionDecision allow<br/>permissionDecisionReason RTK auto-rewrite<br/>updatedInput
else Exit code 3
RTKRewriteHook->>jq: Update tool_input.command
jq-->>RTKRewriteHook: Updated input JSON
RTKRewriteHook-->>ClaudeCode: hookSpecificOutput with<br/>hookEventName PreToolUse<br/>updatedInput
else Exit code 1,2,other or no command
RTKRewriteHook-->>ClaudeCode: No changes
end
Flow diagram for resolveRequestModel Claude id handlingflowchart TD
A[Start resolveRequestModel] --> B[Read requested model]
B --> C{Requested model is in default catalog?}
C -- Yes --> D[Return catalog model]
C -- No --> E{Provider is anthopic or provider-specific fast-return?}
E -- Yes --> F[Return requested model]
E -- No --> G{Is Claude id or alias?
startsWith claude-
or sonnet/opus/haiku}
G -- Yes --> H[Return ACTIVE_MODEL]
G -- No --> I{Provider allows custom model ids?}
I -- Yes --> J[Return requested model]
I -- No --> K[Return ACTIVE_MODEL or fallback]
D --> L[End]
F --> L
H --> L
J --> L
K --> L
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a Claude Code PreToolUse hook that rewrites/permits Bash tool requests via Changes
Sequence Diagram(s)sequenceDiagram
participant ClaudeCode as Claude Code
participant Hook as rtk-rewrite.sh
participant RTK as rtk rewrite
participant jq as jq (json)
participant User as User
ClaudeCode->>Hook: Invoke PreToolUse (tool_input.command)
Hook->>jq: validate/format hook output (if present)
Hook->>RTK: run `rtk rewrite --json` with command
RTK-->>Hook: exit code + rewritten command / metadata
alt exit code 0 and changed
Hook->>jq: emit JSON with updatedInput + permissionDecision:"allow"
Hook-->>ClaudeCode: auto-allow & updatedInput
else exit code 3
Hook->>jq: emit JSON with updatedInput (no permissionDecision)
Hook-->>ClaudeCode: trigger user prompt flow
ClaudeCode->>User: request permission
User-->>ClaudeCode: grant/deny
else other exit codes
Hook-->>ClaudeCode: pass-through unchanged input
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The Claude model detection in
resolveRequestModelis hardcoded to three aliases; consider centralizing these identifiers (and potential future ones) into a shared constant or configuration to avoid scattering provider-specific model names in logic. - In the
rtk-rewrite.shhook, it may be safer to handle non-zero exit codes fromrtk --versionandrtk rewritemore explicitly (e.g., logging a brief warning to stderr for unexpected failures) so that silent misconfigurations are easier to debug.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Claude model detection in `resolveRequestModel` is hardcoded to three aliases; consider centralizing these identifiers (and potential future ones) into a shared constant or configuration to avoid scattering provider-specific model names in logic.
- In the `rtk-rewrite.sh` hook, it may be safer to handle non-zero exit codes from `rtk --version` and `rtk rewrite` more explicitly (e.g., logging a brief warning to stderr for unexpected failures) so that silent misconfigurations are easier to debug.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
Fixes an Anthropic-compat proxy edge case where Claude model IDs (and common Claude family aliases) were being forwarded unchanged to non-Anthropic providers, causing “model not found” errors (e.g., Gemini 404).
Changes:
- Remap Claude model IDs / aliases (
claude-*,sonnet,opus,haiku) to the configuredACTIVE_MODELbefore forwarding to non-Anthropic providers. - Add developer/agent documentation and a Claude Code hook configuration under
.claude/.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/anthropicCompatProxy.ts | Maps Claude model identifiers to the active provider model to avoid downstream 404s. |
| CLAUDE.md | Adds a developer guide (providers, tools, test command). |
| AGENTS.md | Documents tool preferences/shortcuts for agents working in the repo. |
| .claude/settings.json | Adds a Claude Code PreToolUse hook configuration. |
| .claude/hooks/rtk-rewrite.sh | Hook script that delegates command rewriting/permission decisions to rtk rewrite. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| | Tool | Install | Replaces | Gain | | ||
| |------|---------|----------|------| | ||
| | **rtk** | `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh \| sh` | — | -60/90% tokens on bash output | |
There was a problem hiding this comment.
The install command shows a literal \| inside inline code. In a shell, \| escapes the pipe and will not pipe to sh, so copy/paste will fail. Use an unescaped | (or move the command into a fenced code block) so the command works as written.
| | **rtk** | `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh \| sh` | — | -60/90% tokens on bash output | | |
| | **rtk** | `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh` | — | -60/90% tokens on bash output | |
| | Find files | `fd -e ts src/` | `find src -name "*.ts"` | | ||
| | Search content | `rg 'pattern' src/ -t ts` | `grep -r` | | ||
| | Structural search | `ast-grep run --lang ts --pattern '...' src/` | complex regex | | ||
| | Query JSON | `jq '.key' file.json` | `cat file.json \| grep` | |
There was a problem hiding this comment.
The “Not” example uses \| inside inline code (e.g., cat file.json \| grep). In a shell this escapes the pipe, so the example is not equivalent to cat file.json | grep. Use an unescaped | (or describe the pipe in prose) to avoid misleading copy/paste.
| | Query JSON | `jq '.key' file.json` | `cat file.json \| grep` | | |
| | Query JSON | `jq '.key' file.json` | `cat file.json | grep` | |
| { | ||
| "hooks": { | ||
| "PreToolUse": [ | ||
| { | ||
| "matcher": "Bash", | ||
| "hooks": [ | ||
| { | ||
| "type": "command", | ||
| "command": ".claude/hooks/rtk-rewrite.sh" | ||
| } | ||
| ] | ||
| } |
There was a problem hiding this comment.
PR description focuses on model-id remapping in the proxy, but this PR also adds Claude Code/agent docs and hook configuration under .claude/ plus new guide files. If these additions are intentional, please mention them in the PR description; otherwise consider moving them to a separate PR to keep the fix scoped and easier to review/revert.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/anthropicCompatProxy.ts (1)
315-325: Normalize Claude-ID checks to be case-insensitive.Line 318–321 currently only match lowercase values. Inputs like
Claude-Sonnet-...orSONNETwill bypass remapping and can still hit provider-side model-not-found errors.Proposed patch
- const isClaudeModel = - requested.startsWith("claude-") || - requested === "sonnet" || - requested === "opus" || - requested === "haiku"; + const normalizedRequested = requested.toLowerCase(); + const isClaudeModel = + normalizedRequested.startsWith("claude-") || + normalizedRequested === "sonnet" || + normalizedRequested === "opus" || + normalizedRequested === "haiku";🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/anthropicCompatProxy.ts` around lines 315 - 325, The Claude model detection in the block using the variable requested and the isClaudeModel check is case-sensitive and misses variants like "Claude-Sonnet" or "SONNET"; update the logic to compare a normalized form (e.g., lowercased) of requested before doing startsWith("claude-") or the equality checks for "sonnet", "opus", "haiku" so that requested.toLowerCase() (or an equivalent normalized string) is used in the isClaudeModel condition and the existing return of ACTIVE_MODEL remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.claude/hooks/rtk-rewrite.sh:
- Around line 60-63: When the script hits the deny branch (the case labelled
"2)" where EXIT_CODE=2) it's currently exiting with 0 and no output, so the RTK
deny decision is ignored; change that branch to write the required JSON response
(e.g., {"permissionDecision":"deny","reason":"RTK denied"} or similar) to stdout
so Claude Code sees the deny, and then exit appropriately (keep the script’s
expected exit behavior but ensure the JSON is emitted). Update the "2)" case to
print the JSON object with permissionDecision:"deny" (using the same
variable/branch names EXIT_CODE and the case "2)") and then exit.
In `@CLAUDE.md`:
- Around line 3-13: The CLAUDE.md provider table is out of sync with runtime
validation (runtime currently only recognizes Anthropic and Gemini via the
provider whitelist in src/config.ts and src/providers.ts), so either update the
doc to list only Anthropic and Gemini with their correct env keys/defaults or
extend the runtime to accept the other providers; specifically, fix the
CLAUDE.md table rows (remove or correct OpenAI/Groq/Copilot/z.ai/Ollama entries)
to match the actual provider constants/allowedProviders in src/config.ts and the
provider resolution logic in src/providers.ts, or alternatively add the missing
provider entries and corresponding env key handling in the provider constants
and resolution functions so docs and runtime match.
---
Nitpick comments:
In `@src/anthropicCompatProxy.ts`:
- Around line 315-325: The Claude model detection in the block using the
variable requested and the isClaudeModel check is case-sensitive and misses
variants like "Claude-Sonnet" or "SONNET"; update the logic to compare a
normalized form (e.g., lowercased) of requested before doing
startsWith("claude-") or the equality checks for "sonnet", "opus", "haiku" so
that requested.toLowerCase() (or an equivalent normalized string) is used in the
isClaudeModel condition and the existing return of ACTIVE_MODEL remains
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 04789345-f3c4-45af-aa64-cfc2e32358ed
📒 Files selected for processing (5)
.claude/hooks/rtk-rewrite.sh.claude/settings.jsonAGENTS.mdCLAUDE.mdsrc/anthropicCompatProxy.ts
| 2) | ||
| # Deny rule matched — let Claude Code's native deny rule handle it. | ||
| exit 0 | ||
| ;; |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
For Claude Code PreToolUse hooks, is omitting permissionDecisiontreated as allow/pass-through, and is returningpermissionDecision: "deny" the correct way to enforce a deny decision from a hook?
💡 Result:
Yes, omitting permissionDecision (i.e., no JSON output from the PreToolUse hook, just exit 0) is treated as allow/pass-through to the native permission system. Returning permissionDecision: "deny" (in the correct format: {"hookSpecificOutput": {"hookEventName": "PreToolUse", "permissionDecision": "deny", "permissionDecisionReason": "..."} } with exit code 0) is the correct way to enforce a deny decision from a hook.
Citations:
- 1: [DOCS] PreToolUse hook permissionDecision "allow" silently bypasses native permission system anthropics/claude-code#28812
- 2: PreToolUse hook
permissionDecision: "deny"ignored for Edit tool — tool executes despite deny anthropics/claude-code#37210 - 3: https://code.claude.com/docs/en/hooks
- 4: http://code.claude.com/docs/en/hooks
RTK deny decision is not enforced in the deny branch.
On Line 60-63, when EXIT_CODE=2, the script exits with 0 and no output. This is treated as allow/pass-through by Claude Code's permission system. The RTK deny decision is effectively ignored.
To enforce the deny, output the correct JSON structure with permissionDecision: "deny":
🔒 Fix to enforce deny outcome
2)
- # Deny rule matched — let Claude Code's native deny rule handle it.
- exit 0
+ # Deny rule matched — explicitly deny in hook output.
+ jq -n \
+ '{
+ "hookSpecificOutput": {
+ "hookEventName": "PreToolUse",
+ "permissionDecision": "deny",
+ "permissionDecisionReason": "Blocked by RTK deny rule"
+ }
+ }'
+ exit 0
;;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.claude/hooks/rtk-rewrite.sh around lines 60 - 63, When the script hits the
deny branch (the case labelled "2)" where EXIT_CODE=2) it's currently exiting
with 0 and no output, so the RTK deny decision is ignored; change that branch to
write the required JSON response (e.g.,
{"permissionDecision":"deny","reason":"RTK denied"} or similar) to stdout so
Claude Code sees the deny, and then exit appropriately (keep the script’s
expected exit behavior but ensure the JSON is emitted). Update the "2)" case to
print the JSON object with permissionDecision:"deny" (using the same
variable/branch names EXIT_CODE and the case "2)") and then exit.
| ## Supported Providers | ||
|
|
||
| | Provider | Env Key | Default Model | | ||
| |----------|---------|---------------| | ||
| | Anthropic | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` | | ||
| | OpenAI | `OPENAI_API_KEY` | `gpt-4.1-mini` | | ||
| | Gemini | `GEMINI_API_KEY` | `gemini-2.5-flash` | | ||
| | Groq | `GROQ_API_KEY` | `openai/gpt-oss-20b` | | ||
| | GitHub Copilot | `COPILOT_TOKEN` | `openai/gpt-4.1-mini` | | ||
| | z.ai | `ZAI_API_KEY` | `glm-5` | | ||
| | Ollama | local | `qwen3` | |
There was a problem hiding this comment.
Provider support table is out of sync with actual runtime support.
On Line 5-Line 13, the guide documents OpenAI/Groq/Copilot/z.ai/Ollama as supported, but runtime currently only accepts anthropic and gemini (src/config.ts Line 7-Line 15, Line 23-Line 52; src/providers.ts Line 11). This will lead users to invalid .env setups and startup failures.
🛠️ Proposed doc correction
| Provider | Env Key | Default Model |
|----------|---------|---------------|
| Anthropic | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` |
-| OpenAI | `OPENAI_API_KEY` | `gpt-4.1-mini` |
| Gemini | `GEMINI_API_KEY` | `gemini-2.5-flash` |
-| Groq | `GROQ_API_KEY` | `openai/gpt-oss-20b` |
-| GitHub Copilot | `COPILOT_TOKEN` | `openai/gpt-4.1-mini` |
-| z.ai | `ZAI_API_KEY` | `glm-5` |
-| Ollama | local | `qwen3` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ## Supported Providers | |
| | Provider | Env Key | Default Model | | |
| |----------|---------|---------------| | |
| | Anthropic | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` | | |
| | OpenAI | `OPENAI_API_KEY` | `gpt-4.1-mini` | | |
| | Gemini | `GEMINI_API_KEY` | `gemini-2.5-flash` | | |
| | Groq | `GROQ_API_KEY` | `openai/gpt-oss-20b` | | |
| | GitHub Copilot | `COPILOT_TOKEN` | `openai/gpt-4.1-mini` | | |
| | z.ai | `ZAI_API_KEY` | `glm-5` | | |
| | Ollama | local | `qwen3` | | |
| ## Supported Providers | |
| | Provider | Env Key | Default Model | | |
| |----------|---------|---------------| | |
| | Anthropic | `ANTHROPIC_API_KEY` | `claude-sonnet-4-20250514` | | |
| | Gemini | `GEMINI_API_KEY` | `gemini-2.5-flash` | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CLAUDE.md` around lines 3 - 13, The CLAUDE.md provider table is out of sync
with runtime validation (runtime currently only recognizes Anthropic and Gemini
via the provider whitelist in src/config.ts and src/providers.ts), so either
update the doc to list only Anthropic and Gemini with their correct env
keys/defaults or extend the runtime to accept the other providers; specifically,
fix the CLAUDE.md table rows (remove or correct OpenAI/Groq/Copilot/z.ai/Ollama
entries) to match the actual provider constants/allowedProviders in
src/config.ts and the provider resolution logic in src/providers.ts, or
alternatively add the missing provider entries and corresponding env key
handling in the provider constants and resolution functions so docs and runtime
match.
There was a problem hiding this comment.
1 issue found across 5 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="CLAUDE.md">
<violation number="1" location="CLAUDE.md:29">
P2: Contributor docs recommend `curl | sh` from a mutable branch URL, creating avoidable remote code-execution/supply-chain risk.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
|
||
| | Tool | Install | Replaces | Gain | | ||
| |------|---------|----------|------| | ||
| | **rtk** | `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh \| sh` | — | -60/90% tokens on bash output | |
There was a problem hiding this comment.
P2: Contributor docs recommend curl | sh from a mutable branch URL, creating avoidable remote code-execution/supply-chain risk.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At CLAUDE.md, line 29:
<comment>Contributor docs recommend `curl | sh` from a mutable branch URL, creating avoidable remote code-execution/supply-chain risk.</comment>
<file context>
@@ -0,0 +1,78 @@
+
+| Tool | Install | Replaces | Gain |
+|------|---------|----------|------|
+| **rtk** | `curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh \| sh` | — | -60/90% tokens on bash output |
+| **rg** | `apt install ripgrep` / `brew install ripgrep` | grep | Fastest content search |
+| **fd** | `apt install fd-find` / `brew install fd` | find | -99% output on targeted search |
</file context>
Fixes #9
Problem
When the bundled client sends a Claude model id (e.g.
claude-sonnet-4-20250514) to a non-Anthropic provider, the proxy was passing it through unchanged. Gemini, Groq, OpenAI and others don't recognise Claude model names, causing a 404 NOT_FOUND error.Root cause
resolveRequestModelhad a fast-return for providers likegeminiandopenaithat allowed any unknown model id through — including Claude ids sent by the bundled client.Fix
Detect when the requested model starts with
claude-or is a plain alias (sonnet,opus,haiku) and remap toACTIVE_MODELbefore forwarding. Provider-native ids (gemini-2.5-flash,gpt-4.1, etc.) still pass through unchanged.Tested
claude-sonnet-4-20250514to Gemini proxy now returns a valid response instead of 404gemini-2.5-flashdirectly still worksSummary by Sourcery
Map Claude model identifiers to the active provider model in the Anthropic-compatible proxy and add local Claude/RTK tooling and documentation for contributors.
New Features:
Enhancements:
Documentation:
Chores:
Summary by cubic
Remaps Claude model ids to the active provider model in the proxy to prevent 404s on non-Anthropic providers. Adds a Claude Code hook and dev docs to streamline local tooling.
Bug Fixes
claude-*,sonnet,opus,haiku) and rewrites them toACTIVE_MODELbefore forwarding; provider-native ids (e.g.,gemini-2.5-flash,gpt-4.1) still pass through. Refactor: split detection intoisClaudeandisClaudeAliasfor clarity.New Features
.claude/settings.json,.claude/hooks/rtk-rewrite.sh) that rewrites Bash commands viartkto cut token usage, plus developer guides (CLAUDE.md,AGENTS.md).Written for commit 86c3310. Summary will update on new commits.
Summary by CodeRabbit
New Features
Bug Fixes
Documentation