Merge pull request #2474 from code-yeongyu/fix/regression-check-cleanup
fix: tighten Anthropic provider matching and fix look-at test isolation
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { describe, expect, test, mock } from "bun:test"
|
||||
import { afterEach, describe, expect, test, mock } from "bun:test"
|
||||
import type { ToolContext } from "@opencode-ai/plugin/tool"
|
||||
import { setVisionCapableModelsCache } from "../../shared/vision-capable-models-cache"
|
||||
import { clearVisionCapableModelsCache, setVisionCapableModelsCache } from "../../shared/vision-capable-models-cache"
|
||||
import { normalizeArgs, validateArgs, createLookAt } from "./tools"
|
||||
|
||||
describe("look-at tool", () => {
|
||||
afterEach(() => {
|
||||
clearVisionCapableModelsCache()
|
||||
})
|
||||
|
||||
describe("normalizeArgs", () => {
|
||||
// given LLM might use `path` instead of `file_path`
|
||||
// when called with path parameter
|
||||
|
||||
Reference in New Issue
Block a user