refactor: analysis workflow architecture
fix: NEXTAUTH_URL fix: prevent project model edits from affecting default model
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import OpenAI, { toFile } from 'openai'
|
||||
import { getProviderConfig } from '@/lib/api-config'
|
||||
import { getInternalBaseUrl } from '@/lib/env'
|
||||
import { getImageBase64Cached } from '@/lib/image-cache'
|
||||
import type { OpenAICompatClientConfig } from '../types'
|
||||
|
||||
function toAbsoluteUrlIfNeeded(value: string): string {
|
||||
if (!value.startsWith('/')) return value
|
||||
const baseUrl = process.env.NEXTAUTH_URL || 'http://localhost:3000'
|
||||
const baseUrl = getInternalBaseUrl()
|
||||
return `${baseUrl}${value}`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user