mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
feat(image): 接入 ChatGPT Web 生图反代
This commit is contained in:
@@ -86,7 +86,7 @@ export async function updateProvider(
|
||||
providerId: string,
|
||||
data: Partial<{
|
||||
name: string
|
||||
provider_type: 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'gemini_cli' | 'antigravity' | 'kiro'
|
||||
provider_type: 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'chatgpt_web' | 'gemini_cli' | 'antigravity' | 'kiro'
|
||||
description: string | null
|
||||
website: string
|
||||
provider_priority: number
|
||||
@@ -120,7 +120,7 @@ export async function updateProvider(
|
||||
export async function createProvider(
|
||||
data: {
|
||||
name: string
|
||||
provider_type?: 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'gemini_cli' | 'antigravity' | 'kiro'
|
||||
provider_type?: 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'chatgpt_web' | 'gemini_cli' | 'antigravity' | 'kiro'
|
||||
description?: string
|
||||
website?: string
|
||||
billing_type?: 'monthly_quota' | 'pay_as_you_go' | 'free_tier'
|
||||
|
||||
@@ -480,7 +480,7 @@ export interface PublicEndpointStatusMonitorResponse {
|
||||
formats: PublicEndpointStatusMonitor[]
|
||||
}
|
||||
|
||||
export type ProviderType = 'custom' | 'claude_code' | 'codex' | 'gemini_cli' | 'antigravity' | 'kiro' | 'vertex_ai'
|
||||
export type ProviderType = 'custom' | 'claude_code' | 'codex' | 'chatgpt_web' | 'gemini_cli' | 'antigravity' | 'kiro' | 'vertex_ai'
|
||||
|
||||
export interface ClaudeCodeAdvancedConfig {
|
||||
// 会话数量控制:null/undefined 表示不限制
|
||||
|
||||
@@ -854,6 +854,7 @@ const PROVIDER_TYPE_LABELS: Record<string, string> = {
|
||||
vertex_ai: 'Vertex AI',
|
||||
claude_code: 'ClaudeCode',
|
||||
codex: 'Codex',
|
||||
chatgpt_web: 'ChatGPT Web',
|
||||
gemini_cli: 'Gemini CLI',
|
||||
antigravity: 'Antigravity',
|
||||
kiro: 'Kiro',
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
<SelectItem value="codex">
|
||||
Codex
|
||||
</SelectItem>
|
||||
<SelectItem value="chatgpt_web">
|
||||
ChatGPT Web
|
||||
</SelectItem>
|
||||
<SelectItem value="gemini_cli">
|
||||
Gemini CLI
|
||||
</SelectItem>
|
||||
@@ -78,6 +81,9 @@
|
||||
<SelectItem value="codex">
|
||||
Codex
|
||||
</SelectItem>
|
||||
<SelectItem value="chatgpt_web">
|
||||
ChatGPT Web
|
||||
</SelectItem>
|
||||
<SelectItem value="gemini_cli">
|
||||
Gemini CLI
|
||||
</SelectItem>
|
||||
@@ -340,7 +346,7 @@ const defaultPriority = computed(() => {
|
||||
// 表单数据
|
||||
const form = ref({
|
||||
name: '',
|
||||
provider_type: 'custom' as 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'gemini_cli' | 'antigravity' | 'kiro',
|
||||
provider_type: 'custom' as 'custom' | 'vertex_ai' | 'claude_code' | 'codex' | 'chatgpt_web' | 'gemini_cli' | 'antigravity' | 'kiro',
|
||||
description: '',
|
||||
website: '',
|
||||
// 计费配置
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { isKeyManagedProviderType, isOAuthAccountProviderType } from '../providerTypeUtils'
|
||||
|
||||
describe('providerTypeUtils', () => {
|
||||
it('treats ChatGPT-Web as an OAuth account provider', () => {
|
||||
expect(isOAuthAccountProviderType('chatgpt_web')).toBe(true)
|
||||
expect(isOAuthAccountProviderType('ChatGPT_Web')).toBe(true)
|
||||
expect(isKeyManagedProviderType('chatgpt_web')).toBe(false)
|
||||
})
|
||||
})
|
||||
@@ -7,6 +7,7 @@
|
||||
const oauthAccountProviderTypes = new Set([
|
||||
'claude_code',
|
||||
'codex',
|
||||
'chatgpt_web',
|
||||
'gemini_cli',
|
||||
'antigravity',
|
||||
'kiro',
|
||||
|
||||
Reference in New Issue
Block a user