refactor: analysis workflow architecture

fix: NEXTAUTH_URL

fix: prevent project model edits from affecting default model
This commit is contained in:
saturn
2026-03-16 21:48:57 +08:00
parent ecbd183a77
commit 9aff44e37a
58 changed files with 2753 additions and 7985 deletions

View File

@@ -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}`
}