Skip to content

Commit 3af98ba

Browse files
committed
test(webview): cover Anthropic Opus 1M tier
1 parent 7e3228d commit 3af98ba

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,20 @@ describe("useSelectedModel", () => {
442442
expect(result.current.info?.outputPrice).toBe(22.5)
443443
})
444444

445+
it("should apply 1M pricing tier for Claude Opus 4.6 when enabled", () => {
446+
const apiConfiguration: ProviderSettings = {
447+
apiProvider: "anthropic",
448+
apiModelId: "claude-opus-4-6",
449+
anthropicBeta1MContext: true,
450+
}
451+
452+
const wrapper = createWrapper()
453+
const { result } = renderHook(() => useSelectedModel(apiConfiguration), { wrapper })
454+
455+
expect(result.current.id).toBe("claude-opus-4-6")
456+
expect(result.current.info?.contextWindow).toBe(1_000_000)
457+
})
458+
445459
it.each(["anthropic", "gemini-cli", "fake-ai"] as const)(
446460
"should explicitly resolve configured models for %s",
447461
(apiProvider) => {

0 commit comments

Comments
 (0)