File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -92,11 +92,11 @@ describe("callModel E2E Tests", () => {
9292
9393 it ( "should accept chat-style tools (ToolDefinitionJson)" , async ( ) => {
9494 const response = client . callModel ( {
95- model : "meta-llama/llama-3.2-1b -instruct" ,
95+ model : "qwen/qwen3-vl-8b -instruct" ,
9696 input : [
9797 {
9898 role : "user" ,
99- content : "Say hello " ,
99+ content : "What's the weather in Paris? Use the get_weather tool. " ,
100100 } ,
101101 ] ,
102102 tools : [
@@ -120,10 +120,12 @@ describe("callModel E2E Tests", () => {
120120 ] ,
121121 } ) ;
122122
123- // Just verify the request succeeds with chat-style tools
124- const text = await response . getText ( ) ;
125- expect ( text ) . toBeDefined ( ) ;
126- expect ( typeof text ) . toBe ( "string" ) ;
123+ const toolCalls = await response . getToolCalls ( ) ;
124+
125+ // Model should call the tool
126+ expect ( toolCalls . length ) . toBeGreaterThan ( 0 ) ;
127+ expect ( toolCalls [ 0 ] . name ) . toBe ( "get_weather" ) ;
128+ expect ( toolCalls [ 0 ] . arguments ) . toBeDefined ( ) ;
127129 } , 30000 ) ;
128130
129131 it ( "should work with chat-style messages and chat-style tools together" , async ( ) => {
You can’t perform that action at this time.
0 commit comments