refactor(ui): 移除空壳行业资讯 Tab + Provider URL 去重
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- SimpleSidebar: 移除空壳"行业资讯" Tab 和 Newspaper icon import - ModelsAPI.tsx: AVAILABLE_PROVIDERS 引用 LLM_PROVIDER_URLS 常量 - models.ts: PROVIDER_DEFAULTS 引用 api-urls.ts,消除重复 URL 定义 - 所有 Provider URL 现在统一在 api-urls.ts 维护
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* Backend (Rust) should use the same values in kernel_commands.rs
|
||||
*/
|
||||
|
||||
import { LLM_PROVIDER_URLS } from './api-urls';
|
||||
|
||||
// === Default Model Configuration ===
|
||||
|
||||
/**
|
||||
@@ -31,58 +33,58 @@ export const DEFAULT_TEMPERATURE = 0.7 as const;
|
||||
/**
|
||||
* Default base URL for OpenAI API
|
||||
*/
|
||||
export const DEFAULT_OPENAI_BASE_URL = 'https://api.openai.com/v1' as const;
|
||||
export const DEFAULT_OPENAI_BASE_URL = LLM_PROVIDER_URLS.OPENAI as string;
|
||||
|
||||
/**
|
||||
* Default base URL for Anthropic API
|
||||
*/
|
||||
export const DEFAULT_ANTHROPIC_BASE_URL = 'https://api.anthropic.com' as const;
|
||||
export const DEFAULT_ANTHROPIC_BASE_URL = LLM_PROVIDER_URLS.ANTHROPIC as string;
|
||||
|
||||
// === Provider-Specific Defaults ===
|
||||
|
||||
export const PROVIDER_DEFAULTS = {
|
||||
openai: {
|
||||
baseUrl: 'https://api.openai.com/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.OPENAI,
|
||||
defaultModel: 'gpt-4o-mini',
|
||||
},
|
||||
anthropic: {
|
||||
baseUrl: 'https://api.anthropic.com',
|
||||
baseUrl: LLM_PROVIDER_URLS.ANTHROPIC,
|
||||
defaultModel: 'claude-sonnet-4-20250514',
|
||||
},
|
||||
zhipu: {
|
||||
baseUrl: 'https://open.bigmodel.cn/api/paas/v4',
|
||||
baseUrl: LLM_PROVIDER_URLS.ZHIPU,
|
||||
defaultModel: 'glm-4-flash-250414',
|
||||
},
|
||||
zhipu_coding: {
|
||||
baseUrl: 'https://open.bigmodel.cn/api/coding/paas/v4',
|
||||
baseUrl: LLM_PROVIDER_URLS.ZHIPU_CODING,
|
||||
defaultModel: 'glm-4-flash-250414',
|
||||
},
|
||||
kimi: {
|
||||
baseUrl: 'https://api.moonshot.cn/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.KIMI,
|
||||
defaultModel: 'moonshot-v1-8k',
|
||||
},
|
||||
kimi_coding: {
|
||||
baseUrl: 'https://api.kimi.com/coding/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.KIMI_CODING,
|
||||
defaultModel: 'kimi-for-coding',
|
||||
},
|
||||
qwen: {
|
||||
baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.QWEN,
|
||||
defaultModel: 'qwen-turbo',
|
||||
},
|
||||
qwen_coding: {
|
||||
baseUrl: 'https://coding.dashscope.aliyuncs.com/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.QWEN_CODING,
|
||||
defaultModel: 'qwen3-coder-next',
|
||||
},
|
||||
deepseek: {
|
||||
baseUrl: 'https://api.deepseek.com/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.DEEPSEEK,
|
||||
defaultModel: 'deepseek-chat',
|
||||
},
|
||||
gemini: {
|
||||
baseUrl: 'https://generativelanguage.googleapis.com/v1beta',
|
||||
baseUrl: LLM_PROVIDER_URLS.GEMINI,
|
||||
defaultModel: 'gemini-2.0-flash',
|
||||
},
|
||||
local: {
|
||||
baseUrl: 'http://localhost:11434/v1',
|
||||
baseUrl: LLM_PROVIDER_URLS.OLLAMA,
|
||||
defaultModel: 'llama3',
|
||||
},
|
||||
} as const;
|
||||
|
||||
Reference in New Issue
Block a user