fix: recognize google-vertex-anthropic as Claude provider (#1700)

This commit is contained in:
YeonGyu-Kim
2026-02-17 01:28:27 +09:00
parent 187c6b0700
commit 80746b63e0
9 changed files with 157 additions and 3 deletions
+5 -1
View File
@@ -23,6 +23,10 @@ interface CachedCompactionState {
tokens: TokenInfo
}
function isAnthropicProvider(providerID: string): boolean {
return providerID === "anthropic" || providerID === "google-vertex-anthropic"
}
type PluginInput = {
client: {
session: {
@@ -55,7 +59,7 @@ export function createPreemptiveCompactionHook(ctx: PluginInput) {
if (!cached) return
const actualLimit =
cached.providerID === "anthropic"
isAnthropicProvider(cached.providerID)
? ANTHROPIC_ACTUAL_LIMIT
: DEFAULT_ACTUAL_LIMIT