From bd663519ff31ba5f4a0f46f7b5aecbd652eb3850 Mon Sep 17 00:00:00 2001 From: Corie Watson Date: Fri, 12 Dec 2025 15:20:15 +0000 Subject: [PATCH 1/3] fix(anthropic): use `beta.models.list` for listing --- js/plugins/anthropic/src/list.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/plugins/anthropic/src/list.ts b/js/plugins/anthropic/src/list.ts index 6124fd4392..128209b875 100644 --- a/js/plugins/anthropic/src/list.ts +++ b/js/plugins/anthropic/src/list.ts @@ -33,7 +33,8 @@ import { claudeModelReference } from './models.js'; export async function listActions( client: Anthropic ): Promise { - const clientModels = (await client.models.list()).data; + // Use beta.models.list to get the list of ALL (stable and beta) models + const clientModels = (await client.beta.models.list()).data; const seenNames = new Set(); return clientModels From 603ffbe3108fec93681d03920299cdc97736b5e7 Mon Sep 17 00:00:00 2001 From: Corie Watson Date: Fri, 12 Dec 2025 15:43:28 +0000 Subject: [PATCH 2/3] fix(anthropic): updated tests to reflect changes --- js/plugins/anthropic/tests/index_test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/plugins/anthropic/tests/index_test.ts b/js/plugins/anthropic/tests/index_test.ts index 62ef06b5fc..9a5271e131 100644 --- a/js/plugins/anthropic/tests/index_test.ts +++ b/js/plugins/anthropic/tests/index_test.ts @@ -190,11 +190,11 @@ describe('Anthropic Plugin', () => { assert.ok(experimentalMetadata, 'Experimental model metadata should exist'); // Verify mock was called - const listStub = mockClient.models.list as any; + const listStub = mockClient.beta.models.list as any; assert.strictEqual( listStub.mock.calls.length, 1, - 'models.list should be called once' + 'beta.models.list should be called once' ); }); @@ -224,11 +224,11 @@ describe('Anthropic Plugin', () => { ); // Verify models.list was only called once due to caching - const listStub = mockClient.models.list as any; + const listStub = mockClient.beta.models.list as any; assert.strictEqual( listStub.mock.calls.length, 1, - 'models.list should only be called once due to caching' + 'beta.models.list should only be called once due to caching' ); }); }); From 8ab976e7ae097dbd8ae425f98c53b0165789e14f Mon Sep 17 00:00:00 2001 From: Corie Watson Date: Mon, 15 Dec 2025 10:09:22 +0000 Subject: [PATCH 3/3] fix(anthropic): tests --- js/plugins/anthropic/tests/mocks/anthropic-client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/plugins/anthropic/tests/mocks/anthropic-client.ts b/js/plugins/anthropic/tests/mocks/anthropic-client.ts index 321df8f24f..7fe29eceb2 100644 --- a/js/plugins/anthropic/tests/mocks/anthropic-client.ts +++ b/js/plugins/anthropic/tests/mocks/anthropic-client.ts @@ -134,10 +134,10 @@ export function createMockAnthropicClient( create: createStub, stream: streamStub, }, - models: { - list: listStub, - }, beta: { + models: { + list: listStub, + }, messages: { create: betaCreateStub, stream: betaStreamStub,