fix(proxy): unify preview/runtime URL rules and proxy checks

- align Codex preview URL building with runtime /v1 normalization

- align Claude full-url detection with runtime adapter patterns

- reflect Claude ?beta=true in proxy preview and avoid query-only mismatch false positives

- enforce openai_chat proxy requirement even when baseUrl is missing

- wire Codex api format selector through ProviderForm and persist meta/config

- fix EndpointField stale async preview race on clear

- add pending feedback for ProxyToggle pre-disable checks

- deduplicate provider baseUrl extraction into a shared util
This commit is contained in:
YoVinchen
2026-02-11 23:37:38 +08:00
parent fd2793abc4
commit 246ec65789
8 changed files with 297 additions and 164 deletions
+6 -2
View File
@@ -140,10 +140,14 @@ export interface ProviderMeta {
costMultiplier?: string;
// 供应商计费模式来源
pricingModelSource?: string;
// Claude API 格式(仅 Claude 供应商使用)
// 供应商 API 格式
// Claude:
// - "anthropic": 原生 Anthropic Messages API 格式,直接透传
// - "openai_chat": OpenAI Chat Completions 格式,需要格式转换
apiFormat?: "anthropic" | "openai_chat";
// Codex:
// - "responses": OpenAI Responses API
// - "chat": OpenAI Chat Completions API
apiFormat?: "anthropic" | "openai_chat" | "responses" | "chat";
}
// Skill 同步方式