File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed
Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,8 @@ import { claudeModelReference } from './models.js';
3333export async function listActions (
3434 client : Anthropic
3535) : Promise < ActionMetadata [ ] > {
36- const clientModels = ( await client . models . list ( ) ) . data ;
36+ // Use beta.models.list to get the list of ALL (stable and beta) models
37+ const clientModels = ( await client . beta . models . list ( ) ) . data ;
3738 const seenNames = new Set < string > ( ) ;
3839
3940 return clientModels
Original file line number Diff line number Diff line change @@ -190,11 +190,11 @@ describe('Anthropic Plugin', () => {
190190 assert . ok ( experimentalMetadata , 'Experimental model metadata should exist' ) ;
191191
192192 // Verify mock was called
193- const listStub = mockClient . models . list as any ;
193+ const listStub = mockClient . beta . models . list as any ;
194194 assert . strictEqual (
195195 listStub . mock . calls . length ,
196196 1 ,
197- 'models.list should be called once'
197+ 'beta. models.list should be called once'
198198 ) ;
199199 } ) ;
200200
@@ -224,11 +224,11 @@ describe('Anthropic Plugin', () => {
224224 ) ;
225225
226226 // Verify models.list was only called once due to caching
227- const listStub = mockClient . models . list as any ;
227+ const listStub = mockClient . beta . models . list as any ;
228228 assert . strictEqual (
229229 listStub . mock . calls . length ,
230230 1 ,
231- 'models.list should only be called once due to caching'
231+ 'beta. models.list should only be called once due to caching'
232232 ) ;
233233 } ) ;
234234} ) ;
Original file line number Diff line number Diff line change @@ -134,10 +134,10 @@ export function createMockAnthropicClient(
134134 create : createStub ,
135135 stream : streamStub ,
136136 } ,
137- models : {
138- list : listStub ,
139- } ,
140137 beta : {
138+ models : {
139+ list : listStub ,
140+ } ,
141141 messages : {
142142 create : betaCreateStub ,
143143 stream : betaStreamStub ,
You can’t perform that action at this time.
0 commit comments