File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export abstract class BaseOpenAiCompatibleProvider<ModelName extends string>
6666 systemPrompt : string ,
6767 messages : Anthropic . Messages . MessageParam [ ] ,
6868 metadata ?: ApiHandlerCreateMessageMetadata ,
69+ requestOptions ?: OpenAI . RequestOptions ,
6970 ) {
7071 const {
7172 id : model ,
@@ -85,10 +86,7 @@ export abstract class BaseOpenAiCompatibleProvider<ModelName extends string>
8586 params . temperature = this . options . modelTemperature
8687 }
8788
88- return this . client . chat . completions . create (
89- params ,
90- metadata ?. taskId ? { headers : { "X-Roo-Task-ID" : metadata . taskId } } : undefined ,
91- )
89+ return this . client . chat . completions . create ( params , requestOptions )
9290 }
9391
9492 override async * createMessage (
Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ export class RooHandler extends BaseOpenAiCompatibleProvider<RooModelId> {
3838 messages : Anthropic . Messages . MessageParam [ ] ,
3939 metadata ?: ApiHandlerCreateMessageMetadata ,
4040 ) : ApiStream {
41- const stream = await this . createStream ( systemPrompt , messages , metadata )
41+ const stream = await this . createStream (
42+ systemPrompt ,
43+ messages ,
44+ metadata ,
45+ metadata ?. taskId ? { headers : { "X-Roo-Task-ID" : metadata . taskId } } : undefined ,
46+ )
4247
4348 for await ( const chunk of stream ) {
4449 const delta = chunk . choices [ 0 ] ?. delta
You can’t perform that action at this time.
0 commit comments