Skip to content

Commit d63942f

Browse files
committed
Progress
1 parent ca9e0a1 commit d63942f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

src/api/providers/pearai/pearai.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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")) {

src/api/providers/pearai/pearaiGeneric.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)