File tree Expand file tree Collapse file tree
packages/opencode/test/session Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1351,7 +1351,7 @@ describe("session.llm.stream", () => {
13511351 await Instance . provide ( {
13521352 directory : tmp . path ,
13531353 fn : async ( ) => {
1354- const resolved = await getModel ( ProviderID . make ( "anthropic" ) , ModelID . make ( model . id ) )
1354+ const resolved = await Provider . getModel ( ProviderID . make ( "anthropic" ) , ModelID . make ( model . id ) )
13551355 const sessionID = SessionID . make ( "session-test-anthropic-tools" )
13561356 const agent = {
13571357 name : "test" ,
@@ -1456,12 +1456,13 @@ describe("session.llm.stream", () => {
14561456 } ,
14571457 ] as any [ ]
14581458
1459- await drain ( {
1459+ const stream = await LLM . stream ( {
14601460 user,
14611461 sessionID,
14621462 model : resolved ,
14631463 agent,
14641464 system : [ ] ,
1465+ abort : new AbortController ( ) . signal ,
14651466 messages : await MessageV2 . toModelMessages ( input as any , resolved ) ,
14661467 tools : {
14671468 read : tool ( {
@@ -1482,6 +1483,9 @@ describe("session.llm.stream", () => {
14821483 } ,
14831484 } )
14841485
1486+ for await ( const _ of stream . fullStream ) {
1487+ }
1488+
14851489 const capture = await request
14861490 const body = capture . body
14871491
You can’t perform that action at this time.
0 commit comments