fix: tighten Anthropic provider matching and fix look-at test isolation

- Replace overly broad .includes('anthropic') with exact provider ID
  matching against known Anthropic providers (anthropic, google-vertex-
  anthropic, aws-bedrock-anthropic) in context-limit-resolver
- Add afterEach cleanup for vision-capable-models cache in look-at
  tool tests to prevent cross-test state leakage
This commit is contained in:
YeonGyu-Kim
2026-03-12 00:31:02 +09:00
parent c5c31873a2
commit f5b77e62d5
2 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -8,7 +8,8 @@ export type ContextLimitModelCacheState = {
}
function isAnthropicProvider(providerID: string): boolean {
return providerID.toLowerCase().includes("anthropic")
const normalized = providerID.toLowerCase()
return normalized === "anthropic" || normalized === "google-vertex-anthropic" || normalized === "aws-bedrock-anthropic"
}
function getAnthropicActualLimit(modelCacheState?: ContextLimitModelCacheState): number {