File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export class PearAiHandler extends BaseProvider implements SingleCompletionHandl
6464
6565 if ( modelId . startsWith ( "pearai" ) ) {
6666 try {
67+ // TODO: For some reason, if we move this fetch to above this if statement, it breaks everything)
6768 const response = await fetch ( `${ PEARAI_URL } /getPearAIAgentModels` )
6869 if ( ! response . ok ) {
6970 throw new Error ( `Failed to fetch models: ${ response . statusText } ` )
@@ -117,6 +118,7 @@ export class PearAiHandler extends BaseProvider implements SingleCompletionHandl
117118 }
118119
119120 getModel ( ) : { id : string ; info : ModelInfo } {
121+ // TODO: this.pearAiModelsResponse is always undefined so we curretly have to just use client side model info
120122 if ( this . options . apiModelId ) {
121123 let modelInfo = null
122124 if ( this . options . apiModelId . startsWith ( "pearai" ) ) {
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ export class PearAIGenericHandler extends BaseProvider implements SingleCompleti
3838 constructor ( options : OpenAiHandlerOptions ) {
3939 super ( )
4040 this . options = options
41+ console . dir ( "Model ID" )
42+ console . dir ( this . options . openAiModelId )
4143
4244 const baseURL = this . options . openAiBaseUrl ?? "https://api.openai.com/v1"
4345 const apiKey = this . options . openAiApiKey ?? "not-provided"
You can’t perform that action at this time.
0 commit comments