第二十七轮: 三线直传(/v1/messages,/v1/responses)+删除路由别名;第二十八轮: element-plus 按需引入+死代码清理+前端支持格式列/API Key 文档
This commit is contained in:
1 parent
bad8b43b22
commit
aad3f28589
28 files changed
+3016
-1263
No files matched your search
+40
-47
@@ -19,10 +19,10 @@ export default {
|
||||
control: 'Console',
|
||||
more: 'More',
|
||||
subdashboard: 'Gateway overview · refreshed every 8s',
|
||||
subchat: 'Vision-ready · route wjd picks the fastest provider',
|
||||
subchat: 'Vision-ready · multi-provider direct routing',
|
||||
subimages: 'Params on the left, history on the right · downloads proxied by the gateway',
|
||||
subvideos: '720P · 4–12s · async polling',
|
||||
submodels: 'Providers / models / route chains',
|
||||
submodels: 'Providers / models / protocol lines',
|
||||
submetrics: 'Usage & cost · isolated per account',
|
||||
subkeys: 'Up to 3 per account · stored in plaintext, copyable anytime',
|
||||
subusers: 'Accounts & roles · admin can inspect others’ logs and assets',
|
||||
@@ -86,8 +86,6 @@ export default {
|
||||
dashboard: {
|
||||
modelCount: 'Models',
|
||||
providers: 'Providers',
|
||||
routes: 'Route aliases',
|
||||
fallback: 'Fallbacks',
|
||||
inflight: 'In-flight',
|
||||
callsMix: 'Calls ok/fail',
|
||||
provShare: 'Provider success share',
|
||||
@@ -97,7 +95,6 @@ export default {
|
||||
circuit: 'Circuit',
|
||||
modelCountShort: 'Models',
|
||||
keySet: 'Key set',
|
||||
routeAlias: 'Route aliases',
|
||||
name: 'Name',
|
||||
modelChain: 'Model chain',
|
||||
gatewayInfo: 'Gateway info',
|
||||
@@ -114,7 +111,6 @@ export default {
|
||||
requests: 'Total requests',
|
||||
successRate: 'Success rate',
|
||||
avgLatency: 'Avg latency',
|
||||
fallbackShort: 'Fallbacks',
|
||||
noteOkFail: 'ok {ok} · fail {fail}',
|
||||
noteFail: '{n} failed',
|
||||
noteP95: 'highest P95 {v}s',
|
||||
@@ -127,22 +123,21 @@ export default {
|
||||
noModels: 'No calls recorded yet',
|
||||
share: 'Share',
|
||||
live: 'Live',
|
||||
routeChain: 'Availability + speed first',
|
||||
byProtocol: 'Protocol lines',
|
||||
byProtocolSub: 'Models per line',
|
||||
modelCountN: '{n} models',
|
||||
},
|
||||
metrics: {
|
||||
uptime: 'Uptime',
|
||||
inflight: 'In-flight/peak',
|
||||
fallback: 'Fallbacks',
|
||||
promptTokens: 'Prompt tokens',
|
||||
completionTokens: 'Completion tokens',
|
||||
callsTotal: 'Total calls (ok/fail)',
|
||||
modelCalls: 'Calls per model (success / fail)',
|
||||
provShare: 'Provider success share',
|
||||
routeVsProvider: 'Route vs provider (success / fail / fallback)',
|
||||
latency: 'Model latency P50 / P95 (s)',
|
||||
success: 'Success',
|
||||
fail: 'Fail',
|
||||
fallback2: 'Fallback',
|
||||
ok: 'ok',
|
||||
none: 'None',
|
||||
circuitStatus: 'Circuit breaker status',
|
||||
@@ -165,6 +160,7 @@ export default {
|
||||
failRateNote: 'failure rate {v}%',
|
||||
snapshot: 'Live snapshot',
|
||||
circuitCard: 'Circuit breakers',
|
||||
byProvider: 'Calls by provider (success / fail)',
|
||||
},
|
||||
logs: {
|
||||
all: 'All',
|
||||
@@ -226,20 +222,17 @@ export default {
|
||||
systemShort: 'System',
|
||||
visionReady: 'Vision ready · images supported',
|
||||
visionOff: 'This model does not accept images',
|
||||
chainLabel: '{id} ({chain})',
|
||||
emptyChain: 'empty',
|
||||
phDefault: 'Default',
|
||||
phOptional: 'Optional',
|
||||
totalTokens: 'Total {n}',
|
||||
uploadedImage: 'Uploaded image',
|
||||
reasoningTag: 'Reasoning',
|
||||
routeGroup: 'Routes (auto fallback)',
|
||||
textModels: 'Text models',
|
||||
params: 'Parameters',
|
||||
clear: 'Clear',
|
||||
generating: 'Generating…',
|
||||
empty: 'Start a conversation with the gateway (any text model or route wjd)',
|
||||
fallback: 'Fallback · by {provider}',
|
||||
empty: 'Start a conversation with the gateway (pick a model below)',
|
||||
servedBy: 'by {provider}',
|
||||
requestedTo: 'requested {req} → served {served}',
|
||||
reasoning: 'Reasoning',
|
||||
@@ -266,6 +259,7 @@ export default {
|
||||
streaming: 'Streaming output',
|
||||
system: 'System prompt (prepended to each conversation)',
|
||||
loadModelsErr: 'Failed to load models: {msg}',
|
||||
pickModel: 'Pick a model',
|
||||
},
|
||||
images: {
|
||||
historyTitle: 'History',
|
||||
@@ -363,10 +357,8 @@ export default {
|
||||
loadErr: 'Failed to load videos',
|
||||
},
|
||||
models: {
|
||||
routeAliasTitle: 'Route aliases (auto fallback chain)',
|
||||
modelListTitle: 'Model list',
|
||||
name: 'Name',
|
||||
chainLabel: 'Model chain (tried in order, auto fallback on failure)',
|
||||
providerCount: 'Providers',
|
||||
id: 'Model ID',
|
||||
type: 'Type',
|
||||
@@ -375,12 +367,10 @@ export default {
|
||||
text: 'Text',
|
||||
image: 'Image',
|
||||
video: 'Video',
|
||||
route: 'Route',
|
||||
model: 'Models',
|
||||
textModels: 'Text models',
|
||||
imageModels: 'Image models',
|
||||
videoModels: 'Video models',
|
||||
routes: 'Route aliases',
|
||||
providers: 'Providers',
|
||||
loadErr: 'Failed to load models',
|
||||
capability: 'Capability',
|
||||
@@ -391,10 +381,8 @@ export default {
|
||||
providerCard: 'Providers',
|
||||
keyOk: 'Key configured',
|
||||
keyMissing: 'Key missing',
|
||||
routeCount: '{n} routes',
|
||||
chainCount: '{n} models',
|
||||
providerCount2: '{n} providers',
|
||||
noRoute: 'No route alias configured',
|
||||
speedtest: 'Test speed',
|
||||
testing: 'Probing latency of every text model…',
|
||||
testingShort: 'Testing…',
|
||||
@@ -403,6 +391,16 @@ export default {
|
||||
failed: 'Failed',
|
||||
speedtestDone: 'Speed test done, {n} models',
|
||||
speedtestFail: 'Speed test failed',
|
||||
speedtestHint: 'Latency probed per protocol line',
|
||||
textModelCount: '{n} text models',
|
||||
// Round 27: the supported-formats column (three protocol lines). Line names are the
|
||||
// vendors' own endpoint names, so they are not translated.
|
||||
protocols: 'Supported formats',
|
||||
protocolHint: 'Which lines this model accepts: chat/completions (OpenAI-compatible), messages (Anthropic), responses (OpenAI Responses). Any other format is rejected with 400 at the gateway edge — the gateway never translates between formats and never silently swaps in another model',
|
||||
protocolNa: 'N/A',
|
||||
protocolNaHint: 'Image / video models use the dedicated /v1/images/generations and /v1/videos endpoints and are not tied to the three protocol lines',
|
||||
protocolHintRow: 'Supported formats: {lines} ',
|
||||
probedLine: 'probed via {p}',
|
||||
},
|
||||
history: {
|
||||
saveFail: 'History could not be saved to the gateway (it may be lost on refresh) — check your session or network',
|
||||
@@ -435,7 +433,7 @@ export default {
|
||||
logoutBtn: 'Sign out',
|
||||
chatDefaults: 'Chat default parameters',
|
||||
defsTip: 'Used as defaults for a new chat (already-adjusted params are untouched).',
|
||||
defaultModel: 'Default model / route',
|
||||
defaultModel: 'Default model',
|
||||
temperature: 'Temperature',
|
||||
topP: 'top_p',
|
||||
maxTokens: 'max_tokens (empty = gateway default)',
|
||||
@@ -448,7 +446,7 @@ export default {
|
||||
modelsCount: 'Models',
|
||||
userManagement: 'Account management (admin)',
|
||||
gwConfigBtn: 'Open',
|
||||
gwConfigSub: 'Tune gateway / providers / routes / pricing — applied on save',
|
||||
gwConfigSub: 'Tune gateway / providers / pricing — applied on save',
|
||||
gwConfig: 'Gateway config (admin)',
|
||||
userCol: 'User',
|
||||
roleCol: 'Role',
|
||||
@@ -504,38 +502,50 @@ export default {
|
||||
auth: 'Auth',
|
||||
authVal: 'Header: Authorization: Bearer <your API Key>',
|
||||
modelPick: 'Model selection',
|
||||
modelPickVal: 'model: wjd = route alias (auto-fallback by availability + speed, recommended); or a concrete model id to bypass fallback',
|
||||
modelPickVal: 'model takes a real model id (e.g. agnes-3.0-flash). Each of the three lines forwards its own native protocol and the gateway never translates formats, so a wrong line returns 400 (listing the lines that model supports)',
|
||||
formats: 'Supported formats',
|
||||
formatsVal: 'Which lines a model accepts is listed in the Supported formats column on the Providers & Models page: chat/completions, messages, responses. Each line is forwarded verbatim (no field rewriting, no cross-format translation), so write your URL and body exactly as the vendor SDK expects',
|
||||
ctype: 'Request format',
|
||||
ctypeVal: 'application/json; chat supports SSE streaming (stream: true)',
|
||||
endpoints: 'Endpoints',
|
||||
colMethod: 'Method',
|
||||
colPath: 'Path',
|
||||
colDesc: 'Description',
|
||||
epModels: 'Models and routes (with a vision flag)',
|
||||
epModels: 'Models (with vision flag and supported protocol lines)',
|
||||
epChat: 'Chat completions (OpenAI compatible, streaming + image input)',
|
||||
epMessages: 'Chat completions (Anthropic Messages format, forwarded verbatim)',
|
||||
epResponses: 'Chat completions (OpenAI Responses format, forwarded verbatim)',
|
||||
epImages: 'Image generation / image-to-image (n must be 1; call repeatedly for more)',
|
||||
epVideoCreate: 'Video generation (async, returns video_id immediately)',
|
||||
epVideoPoll: 'Poll a video task (every ~5s; returns throttled when upstream rate-limits)',
|
||||
epDownload: 'Download generated images / videos through the gateway (bypasses upstream hotlink protection and expiry; allow-listed hosts only)',
|
||||
epHistory: 'Read your own history (images / videos / chats)',
|
||||
epLogs: 'Your own call log',
|
||||
epMetrics: 'Metrics snapshot (incl. circuit breaker states)',
|
||||
epHealth: 'Health check (version / provider status)',
|
||||
exChat: 'Example · chat',
|
||||
exMessages: 'Example · chat (Anthropic Messages format)',
|
||||
exResponses: 'Example · chat (OpenAI Responses format)',
|
||||
exImg: 'Example · image generation',
|
||||
exVideo: 'Example · video generation + polling',
|
||||
exPy: 'Example · Python (OpenAI SDK compatible)',
|
||||
// Comments / sample payloads inside the code samples (mirror of zh.ts)
|
||||
sampleChat: 'Hello, introduce yourself',
|
||||
sampleModelMessages: 'minimax-m2.7',
|
||||
sampleModelResponses: 'grok-4.6',
|
||||
sampleImg: 'Neon city street at night',
|
||||
sampleVideo: 'Slow camera push-in',
|
||||
sampleStep1: 'submit a task (async, returns video_id immediately)',
|
||||
sampleStep2: 'poll every 5s (a throttled reply means wait, then retry)',
|
||||
notes: 'Notes',
|
||||
noteVision: 'For image input use a vision model (agnes-3.0-flash, marked "Vision" in the list); with the wjd alias the gateway puts vision models first.',
|
||||
noteVision: 'For image input use a vision model (agnes-3.0-flash, marked Vision in the list). The gateway no longer swaps models for you: a non-vision model receives the request as-is',
|
||||
noteCross: 'No cross-format translation: which lines a model accepts is decided by the Supported formats column on the Providers & Models page (e.g. minimax-m2.7 only speaks messages, grok-4.6 only speaks responses). A wrong format is rejected with 400 at the gateway edge, listing the lines that model does support — your request is never silently rewritten, and no other model is swapped in',
|
||||
noteConvId: 'Optional conversation_id (chat-style requests): reusing the same string for one conversation raises the upstream prompt-cache hit rate. It is a gateway-internal field and is never forwarded as-is — the gateway derives the real session id per account, so accounts never share a cache namespace; omit it and each call gets a random one',
|
||||
noteN1: 'Image n must be 1 (upstream limit) — call once per image; n≠1 is rejected with a clean 400.',
|
||||
noteVideo: 'Video seconds: 4–12 only; size is fixed at 720P; 6 aspect ratios (21:9/16:9/4:3/1:1/3:4/9:16); mode=text / keyframe / reference.',
|
||||
notePoll: 'Do not poll faster than 5s (upstream answers 429 "too frequent"; the gateway returns throttled so you can back off).',
|
||||
noteMedia: 'Assets (reference images / first-last frames / audio / chat images) accept data:image/...;base64,... or a public URL; data URIs avoid exposing the file, but keep each request body under 2MB.',
|
||||
noteDownload: 'Upstream image / video URLs may expire or block hotlinking. To save a file, fetch /v1/media/download?url=... with your key and let the gateway retrieve it; URLs outside the allow-list are rejected with 400.',
|
||||
noteKey: 'If a key leaks, delete it here (401 immediately) or revoke all keys of the account from the Users page.',
|
||||
noteAudit: 'Every call is logged per account on the Logs page (you see yours; admins can inspect each account from the Users page).',
|
||||
copyBase: 'Copy URL',
|
||||
@@ -656,17 +666,13 @@ export default {
|
||||
addItem: 'Add',
|
||||
addModel: 'Add model',
|
||||
addProvider: 'Add provider',
|
||||
addRoute: 'Add route alias',
|
||||
addPrice: 'Add pricing',
|
||||
delete: 'Delete',
|
||||
delProvider: 'Delete provider',
|
||||
delRoute: 'Delete route',
|
||||
delConfirm: 'Delete "{name}"? It takes effect once you save.',
|
||||
needKey: 'Provider key cannot be empty',
|
||||
needRoute: 'Route alias cannot be empty',
|
||||
dupKey: '"{name}" is duplicated — please rename',
|
||||
newProvider: '(new provider)',
|
||||
newRoute: '(new alias)',
|
||||
unlimited: 'empty = unlimited',
|
||||
useServerTimeout: 'empty = server.timeout',
|
||||
mediaEmpty: 'empty = unsupported',
|
||||
@@ -683,19 +689,17 @@ export default {
|
||||
tabServerSub: 'Binding, timeout/retry, rate limits, CORS, session TTL and other runtime switches',
|
||||
tabProviders: 'Providers & models',
|
||||
tabProvidersSub: 'Key source, base URL, image/video endpoints and the model list per provider',
|
||||
tabRoutes: 'Routes & circuit',
|
||||
tabRoutesSub: 'Route aliases with their fallback chains (order = priority) plus the circuit breaker',
|
||||
tabLog: 'Logs & pricing',
|
||||
tabLogSub: 'Log level/format/capacity plus model pricing (CNY per million tokens)',
|
||||
tabDownload: 'Download proxy',
|
||||
tabDownloadSub: 'CDN hosts allowed for the download proxy and the per-file size limit',
|
||||
circuit: 'Provider circuit breaker',
|
||||
h_circuit: 'A provider that fails to the threshold within the window is skipped for the cooldown; fallback takes over',
|
||||
h_circuit: 'A provider failing to the threshold is cooled down; its requests get 503',
|
||||
f_c_enabled: 'Enable circuit breaker',
|
||||
f_c_failure_threshold: 'Failure threshold',
|
||||
f_c_cooldown: 'Cooldown (s)',
|
||||
f_c_window: 'Window (s)',
|
||||
h_c_enabled: 'Off = never skip a failing provider (fallback still works)',
|
||||
h_c_enabled: 'Off = never skip a failing provider',
|
||||
h_c_failure_threshold: 'Opens the circuit once failures reach this count in the window',
|
||||
h_c_cooldown: 'While open the provider is skipped; it half-opens automatically after the cooldown',
|
||||
h_c_window: 'Counts failures inside the window (not necessarily consecutive)',
|
||||
@@ -704,9 +708,9 @@ export default {
|
||||
f_port: 'Port',
|
||||
h_port: 'Production uses 8808 and Nginx points at it — change the proxy too',
|
||||
f_timeout: 'Upstream timeout (s)',
|
||||
h_timeout: 'Per upstream request; a route-level timeout overrides it',
|
||||
h_timeout: 'Per upstream request timeout',
|
||||
f_retry: 'Retries for direct model id',
|
||||
h_retry: 'Retries (incl. first try) when calling a real model id instead of a route alias',
|
||||
h_retry: 'Retries for the same model (incl. the first try)',
|
||||
f_health_auth: 'Require auth on /health',
|
||||
// vue-i18n parses {...} as a placeholder: literal braces must be written {'{'} / {'}'},
|
||||
// otherwise the whole message fails to compile (and the UI using it renders nothing).
|
||||
@@ -719,7 +723,7 @@ export default {
|
||||
f_metrics_enabled: 'Record metrics',
|
||||
h_metrics_enabled: 'Off = /metrics and dashboard counters stop updating (calls still work)',
|
||||
f_rate_limit_rps: 'Global QPS per account',
|
||||
h_rate_limit_rps: 'Empty = unlimited (provider/route level limits are configured separately)',
|
||||
h_rate_limit_rps: 'Empty = unlimited (provider-level limits live in the provider entry)',
|
||||
f_max_body_size: 'Max request body (bytes)',
|
||||
h_max_body_size: '~2MB = 2000000; keep it generous if you send images',
|
||||
f_cors_origins: 'CORS allowed origins',
|
||||
@@ -755,17 +759,6 @@ export default {
|
||||
pModels: 'Models',
|
||||
h_pModels: 'Model ids must match upstream; vision = accepts image input (preferred for image chats)',
|
||||
mVision: 'vision',
|
||||
routeHint: 'A route alias is a virtual model name (e.g. wjd): models are tried top-down and only a full failure returns 502. Order = priority.',
|
||||
rName: 'Alias',
|
||||
h_rName: 'Pass this as "model" when calling',
|
||||
rTimeout: 'Per-model timeout (s)',
|
||||
h_rTimeout: 'How long a single model may take before switching to the next one',
|
||||
rRetry: 'Per-model retries',
|
||||
h_rRetry: 'Retries before moving on (incl. first try); 1 = switch immediately',
|
||||
rRate: 'Route QPS limit',
|
||||
h_rRate: 'Empty = unlimited',
|
||||
rModels: 'Fallback chain',
|
||||
h_rModels: 'Tried top-down; available ids come from the providers above',
|
||||
f_o_log_level: 'Log level',
|
||||
h_o_log_level: 'DEBUG is noisy; INFO is fine for production',
|
||||
f_o_log_json: 'Structured JSON logs',
|
||||
|
||||
+39
-48
@@ -19,10 +19,10 @@ export default {
|
||||
control: '控制台',
|
||||
more: '更多',
|
||||
subdashboard: '网关运行概况 · 数据每 8 秒刷新',
|
||||
subchat: '支持附图视觉 · 路由 wjd 自动选路',
|
||||
subchat: '支持附图视觉 · 多供应商直连',
|
||||
subimages: '参数在左 · 历史在右 · 下载走网关代拉',
|
||||
subvideos: '720P · 时长 4–12 秒 · 异步轮询',
|
||||
submodels: '供应商 / 模型 / 路由链',
|
||||
submodels: '供应商 / 模型 / 协议线',
|
||||
submetrics: '用量与成本 · 按账号隔离',
|
||||
subkeys: '每个账号最多 3 把 · 明文保存,可反复复制',
|
||||
subusers: '账号与权限 · 管理员可查他人日志与资产',
|
||||
@@ -86,8 +86,6 @@ export default {
|
||||
dashboard: {
|
||||
modelCount: '模型数',
|
||||
providers: '供应商',
|
||||
routes: '路由别名',
|
||||
fallback: '成功降级',
|
||||
inflight: '当前并发',
|
||||
callsMix: '调用 ok/fail',
|
||||
provShare: '供应商成功调用份额',
|
||||
@@ -97,7 +95,6 @@ export default {
|
||||
circuit: '熔断',
|
||||
modelCountShort: '模型数',
|
||||
keySet: '已配 Key',
|
||||
routeAlias: '路由别名',
|
||||
name: '名称',
|
||||
modelChain: '模型链',
|
||||
gatewayInfo: '网关信息',
|
||||
@@ -114,7 +111,6 @@ export default {
|
||||
requests: '请求总数',
|
||||
successRate: '成功率',
|
||||
avgLatency: '平均延迟',
|
||||
fallbackShort: '成功降级',
|
||||
noteOkFail: 'ok {ok} · fail {fail}',
|
||||
noteFail: '失败 {n} 次',
|
||||
noteP95: 'P95 最高 {v}s',
|
||||
@@ -127,22 +123,21 @@ export default {
|
||||
noModels: '暂无调用记录',
|
||||
share: '份额',
|
||||
live: '实时',
|
||||
routeChain: '可用性 + 速度优先链',
|
||||
byProtocol: '协议线覆盖',
|
||||
byProtocolSub: '每条线有多少模型',
|
||||
modelCountN: '{n} 个模型',
|
||||
},
|
||||
metrics: {
|
||||
uptime: '已运行',
|
||||
inflight: '在途/峰值',
|
||||
fallback: '成功降级',
|
||||
promptTokens: 'Prompt tokens',
|
||||
completionTokens: 'Completion tokens',
|
||||
callsTotal: '总调用(ok/fail)',
|
||||
modelCalls: '各模型调用(成功 / 失败)',
|
||||
provShare: '供应商成功调用份额',
|
||||
routeVsProvider: '路由 vs 供应商调用(成功 / 失败 / 降级)',
|
||||
latency: '模型延迟 P50 / P95(秒)',
|
||||
success: '成功',
|
||||
fail: '失败',
|
||||
fallback2: '降级',
|
||||
ok: 'ok',
|
||||
none: '暂无',
|
||||
circuitStatus: '熔断器状态',
|
||||
@@ -165,6 +160,7 @@ export default {
|
||||
failRateNote: '失败率 {v}%',
|
||||
snapshot: '实时快照',
|
||||
circuitCard: '熔断器',
|
||||
byProvider: '按供应商调用(成功 / 失败)',
|
||||
},
|
||||
logs: {
|
||||
all: '全部',
|
||||
@@ -226,20 +222,17 @@ export default {
|
||||
systemShort: '系统提示',
|
||||
visionReady: '视觉能力已就绪 · 可附图',
|
||||
visionOff: '当前模型不支持图像输入',
|
||||
chainLabel: '{id}({chain})',
|
||||
emptyChain: '空',
|
||||
phDefault: '默认',
|
||||
phOptional: '可选',
|
||||
totalTokens: '共 {n}',
|
||||
uploadedImage: '已上传图片',
|
||||
reasoningTag: '推理',
|
||||
routeGroup: '路由(自动降级)',
|
||||
textModels: '文本模型',
|
||||
params: '参数',
|
||||
clear: '清空',
|
||||
generating: '正在生成…',
|
||||
empty: '开始与网关对话(可选任意文本模型或路由 wjd)',
|
||||
fallback: '降级 · 由 {provider} 响应',
|
||||
empty: '开始与网关对话(在下方选一个模型)',
|
||||
servedBy: '由 {provider} 响应',
|
||||
requestedTo: '请求 {req} → 实际 {served}',
|
||||
reasoning: '推理过程(reasoning)',
|
||||
@@ -266,6 +259,7 @@ export default {
|
||||
streaming: '流式输出',
|
||||
system: '系统提示词(每条会话开头注入)',
|
||||
loadModelsErr: '加载模型列表失败:{msg}',
|
||||
pickModel: '选择模型',
|
||||
},
|
||||
images: {
|
||||
historyTitle: '生成历史',
|
||||
@@ -363,10 +357,8 @@ export default {
|
||||
loadErr: '加载视频失败',
|
||||
},
|
||||
models: {
|
||||
routeAliasTitle: '路由别名(自动降级链)',
|
||||
modelListTitle: '模型清单',
|
||||
name: '名称',
|
||||
chainLabel: '模型链(依次尝试,失败自动降级)',
|
||||
providerCount: '供应商数',
|
||||
id: '模型 ID',
|
||||
type: '类型',
|
||||
@@ -375,12 +367,10 @@ export default {
|
||||
text: '文本',
|
||||
image: '图像',
|
||||
video: '视频',
|
||||
route: '路由',
|
||||
model: '模型',
|
||||
textModels: '文本模型',
|
||||
imageModels: '图像模型',
|
||||
videoModels: '视频模型',
|
||||
routes: '路由别名',
|
||||
providers: '供应商',
|
||||
loadErr: '加载模型失败',
|
||||
capability: '能力',
|
||||
@@ -391,10 +381,8 @@ export default {
|
||||
providerCard: '供应商',
|
||||
keyOk: 'Key 已配置',
|
||||
keyMissing: 'Key 未配置',
|
||||
routeCount: '{n} 条路由',
|
||||
chainCount: '{n} 个模型',
|
||||
providerCount2: '{n} 家供应商',
|
||||
noRoute: '没有配置路由别名',
|
||||
speedtest: '一键测速',
|
||||
testing: '正在测试全部文本模型延迟…',
|
||||
testingShort: '测速中…',
|
||||
@@ -403,6 +391,15 @@ export default {
|
||||
failed: '失败',
|
||||
speedtestDone: '测速完成,共 {n} 个模型',
|
||||
speedtestFail: '测速失败',
|
||||
speedtestHint: '按模型自己的协议线探测延迟',
|
||||
textModelCount: '{n} 个文本模型',
|
||||
// 第二十七轮:支持的格式列(三条协议线)。格式名直接用各家标准端点名,不译。
|
||||
protocols: '支持的格式',
|
||||
protocolHint: '该模型可以走哪几条线:chat/completions(OpenAI 兼容)、messages(Anthropic)、responses(OpenAI Responses)。不在列表里的格式会在网关入口直接 400 —— 网关不做跨格式转换,也绝不偷偷换个模型顶上',
|
||||
protocolNa: '不适用',
|
||||
protocolNaHint: '图像 / 视频模型走 /v1/images/generations、/v1/videos 专用端点,不涉及这三条协议线',
|
||||
protocolHintRow: '支持的格式:{lines} ',
|
||||
probedLine: '本次测速走 {p}',
|
||||
},
|
||||
history: {
|
||||
saveFail: '历史未能保存到服务端(刷新后可能丢失),请检查登录状态或网络',
|
||||
@@ -435,7 +432,7 @@ export default {
|
||||
logoutBtn: '退出登录',
|
||||
chatDefaults: '对话默认参数',
|
||||
defsTip: '作为对话页初始值(本会话已改动的参数不受影响)。',
|
||||
defaultModel: '默认模型 / 路由',
|
||||
defaultModel: '默认模型',
|
||||
temperature: '温度 temperature',
|
||||
topP: 'top_p',
|
||||
maxTokens: 'max_tokens(留空用网关默认)',
|
||||
@@ -448,7 +445,7 @@ export default {
|
||||
modelsCount: '模型数',
|
||||
userManagement: '账号管理(管理员)',
|
||||
gwConfigBtn: '去配置',
|
||||
gwConfigSub: '改网关参数 / 供应商 / 路由 / 定价 —— 保存即生效',
|
||||
gwConfigSub: '改网关参数 / 供应商 / 定价 —— 保存即生效',
|
||||
gwConfig: '网关配置(管理员)',
|
||||
userCol: '账号',
|
||||
roleCol: '角色',
|
||||
@@ -504,38 +501,50 @@ export default {
|
||||
auth: '鉴权',
|
||||
authVal: '请求头 Authorization: Bearer <你的 API Key>',
|
||||
modelPick: '模型选择',
|
||||
modelPickVal: 'model 填 wjd = 路由别名(按「可用 + 速度」自动降级,推荐);也可填具体模型 id 直连,不被降级影响',
|
||||
modelPickVal: 'model 填真实模型 id(如 agnes-3.0-flash);三条线各按自家协议直传,网关不做跨格式转换 —— 选错线会 400(响应里会列出该模型支持哪些线)',
|
||||
formats: '支持的格式',
|
||||
formatsVal: '每个模型能用哪几条线,见「供应商与模型」页的「支持的格式」列:chat/completions、messages、responses。三条线各自原样转发(不改字段、不做跨格式翻译),因此接口地址与请求体按各家官方 SDK 写就行',
|
||||
ctype: '请求格式',
|
||||
ctypeVal: 'application/json;对话支持 SSE 流式(stream: true)',
|
||||
endpoints: '常用端点',
|
||||
colMethod: '方法',
|
||||
colPath: '路径',
|
||||
colDesc: '说明',
|
||||
epModels: '模型与路由列表(含视觉能力标记)',
|
||||
epModels: '模型列表(含视觉能力标记与支持的协议线)',
|
||||
epChat: '对话补全(OpenAI 兼容,支持流式与图片输入)',
|
||||
epMessages: '对话补全(Anthropic Messages 格式,原样直传)',
|
||||
epResponses: '对话补全(OpenAI Responses 格式,原样直传)',
|
||||
epImages: '图像生成 / 图生图(n 必须为 1,多张请多次调用)',
|
||||
epVideoCreate: '视频生成(异步,立即返回 video_id)',
|
||||
epVideoPoll: '查询视频任务(建议每 5s 一次;被上游限流时返回 throttled)',
|
||||
epDownload: '代下载生成出来的图片 / 视频(绕过上游地址的防盗链与过期,白名单域名)',
|
||||
epHistory: '读取本人历史(图像 / 视频 / 对话)',
|
||||
epLogs: '本人调用日志',
|
||||
epMetrics: '指标快照(含熔断器状态)',
|
||||
epHealth: '健康检查(版本 / 供应商状态)',
|
||||
exChat: '示例 · 对话',
|
||||
exMessages: '示例 · 对话(Anthropic Messages 格式)',
|
||||
exResponses: '示例 · 对话(OpenAI Responses 格式)',
|
||||
exImg: '示例 · 图像生成',
|
||||
exVideo: '示例 · 视频生成 + 轮询',
|
||||
exPy: '示例 · Python(OpenAI SDK 兼容)',
|
||||
// 示例代码里的注释与示例文案(整段照抄时也该是当前语言)
|
||||
sampleChat: '你好,介绍一下你自己',
|
||||
sampleModelMessages: 'minimax-m2.7',
|
||||
sampleModelResponses: 'grok-4.6',
|
||||
sampleImg: '霓虹夜景的城市街道',
|
||||
sampleVideo: '镜头缓慢推进',
|
||||
sampleStep1: '提交任务(异步,立即返回 video_id)',
|
||||
sampleStep2: '每 5s 轮询一次(被限流会回 throttled,等一下再问)',
|
||||
notes: '注意事项',
|
||||
noteVision: '带图对话请用支持视觉的模型(agnes-3.0-flash,列表里标「视觉」);填路由别名 wjd 时网关会自动把视觉模型排到链首。',
|
||||
noteVision: '带图对话请用支持视觉的模型(agnes-3.0-flash,列表里标「视觉」);网关不再自动换模型 —— 选了不支持视觉的模型就照原样发上去,由上游决定怎么处理',
|
||||
noteCross: '跨格式不转换:某个模型支持哪几条线,由「供应商与模型」页的「支持的格式」列决定(例:minimax-m2.7 只认 messages,grok-4.6 只认 responses)。用错格式网关会在入口直接 400 并列出它支持的线,不会偷偷翻译你的请求、也不会换个模型顶上',
|
||||
noteConvId: '可选字段 conversation_id(对话类请求):同一段对话复用同一个串,上游的提示词缓存更容易命中(省钱省时)。它是网关内部字段,不会原样发给上游 —— 网关按账号派生真实会话 id,账号之间互不串缓存;不传则每次随机',
|
||||
noteN1: '图像 n 只能为 1(上游限制),要几张就调几次;n≠1 会被网关直接 400 拦下。',
|
||||
noteVideo: '视频 seconds 只支持 4–12,size 固定 720P,比例 6 种(21:9/16:9/4:3/1:1/3:4/9:16);mode=text 文生视频 / keyframe 首尾帧 / reference 参考图·音频。',
|
||||
notePoll: '轮询别快于 5s(上游会回 429「查询过于频繁」,网关会以 throttled 提示退避)。',
|
||||
noteMedia: '素材(参考图 / 首尾帧 / 参考音频 / 对话附图)可直接传 data:image/...;base64,... 或公网 URL;data URI 不必暴露素材,但单次请求体需 < 2MB。',
|
||||
noteDownload: '上游返回的图片 / 视频地址可能有时效或防盗链。要落盘请走 /v1/media/download?url=...(需带上你的 Key),它由网关代为取回;地址不在白名单内会被 400 拒绝。',
|
||||
noteKey: 'Key 泄漏时到本页删除(立即 401),或用「用户管理」页一键吊销该账号全部 Key。',
|
||||
noteAudit: '所有调用按账号记入「日志」页(仅本人可见;admin 可在用户管理页看各账号)。',
|
||||
copyBase: '复制地址',
|
||||
@@ -656,17 +665,13 @@ export default {
|
||||
addItem: '添加',
|
||||
addModel: '添加模型',
|
||||
addProvider: '添加供应商',
|
||||
addRoute: '添加路由别名',
|
||||
addPrice: '添加定价',
|
||||
delete: '删除',
|
||||
delProvider: '删除供应商',
|
||||
delRoute: '删除路由',
|
||||
delConfirm: '删除「{name}」?保存后才真正写盘生效。',
|
||||
needKey: '供应商的 key 不能为空',
|
||||
needRoute: '路由别名的名字不能为空',
|
||||
dupKey: '「{name}」重复了,请改一个名字',
|
||||
newProvider: '(新供应商)',
|
||||
newRoute: '(新路由别名)',
|
||||
unlimited: '留空 = 不限',
|
||||
useServerTimeout: '留空 = 用 server.timeout',
|
||||
mediaEmpty: '留空 = 不支持',
|
||||
@@ -683,19 +688,17 @@ export default {
|
||||
tabServerSub: '监听、超时/重试、限流、CORS、会话时长等运行开关',
|
||||
tabProviders: '供应商与模型',
|
||||
tabProvidersSub: '供应商密钥来源、接口地址、图像/视频端点、模型清单',
|
||||
tabRoutes: '路由与熔断',
|
||||
tabRoutesSub: '路由别名与 fallback 模型链(顺序 = 优先级)+ 供应商熔断',
|
||||
tabLog: '日志与定价',
|
||||
tabLogSub: '日志级别/格式/容量 + 模型定价(人民币 / 百万 token)',
|
||||
tabDownload: '下载代理',
|
||||
tabDownloadSub: '允许网关代下载的 CDN 域名与单文件上限',
|
||||
circuit: '供应商熔断',
|
||||
h_circuit: '某供应商窗口内失败到阈值就熔断冷却,期间跳过它让 fallback 顶上',
|
||||
h_circuit: '某供应商窗口内失败到阈值就熔断冷却,期间它的请求直接 503',
|
||||
f_c_enabled: '启用熔断',
|
||||
f_c_failure_threshold: '触发阈值(次)',
|
||||
f_c_cooldown: '熔断冷却(秒)',
|
||||
f_c_window: '统计窗口(秒)',
|
||||
h_c_enabled: '关掉 = 失败也不跳过(fallback 照常工作)',
|
||||
h_c_enabled: '关掉 = 失败也不跳过',
|
||||
h_c_failure_threshold: '窗口内失败到该次数就熔断',
|
||||
h_c_cooldown: '熔断期间直接跳过该供应商,冷却结束后自动半开试探',
|
||||
h_c_window: '按"窗口内失败次数"计数(不是连续失败)',
|
||||
@@ -705,9 +708,9 @@ export default {
|
||||
f_port: '监听端口',
|
||||
h_port: '生产用 8808,且 Nginx 反代指向它 —— 改了要同步改反代',
|
||||
f_timeout: '上游超时(秒)',
|
||||
h_timeout: '单次上游请求超时;路由自身写了 timeout 的以路由为准',
|
||||
h_timeout: '单次上游请求超时',
|
||||
f_retry: '直连模型重试次数',
|
||||
h_retry: '直接用模型 id(不走路由别名)时的重试次数,含首次',
|
||||
h_retry: '同一模型的重试次数(含首次)',
|
||||
f_health_auth: '/health 需要鉴权',
|
||||
// 注意:vue-i18n 把 {...} 当占位符,花括号要么写成 {'{'} / {'}'},要么整条编译不过 ——
|
||||
// 编译不过的表现是"用到这条文案的整块界面不渲染",不报在文案上(踩过一次,见 check:i18n)。
|
||||
@@ -720,7 +723,7 @@ export default {
|
||||
f_metrics_enabled: '记录调用指标',
|
||||
h_metrics_enabled: '关掉后 /metrics 与看板计数停更(不影响调用)',
|
||||
f_rate_limit_rps: '全局单账号 QPS 上限',
|
||||
h_rate_limit_rps: '留空 = 不限(供应商级、路由级限流见各自配置)',
|
||||
h_rate_limit_rps: '留空 = 不限(供应商级限流见供应商配置)',
|
||||
f_max_body_size: '请求体上限(字节)',
|
||||
h_max_body_size: '约 2MB = 2000000;带图对话别调太小',
|
||||
f_cors_origins: 'CORS 允许来源',
|
||||
@@ -757,18 +760,6 @@ export default {
|
||||
pModels: '模型清单',
|
||||
h_pModels: '模型 id 必须与上游一致;vision = 支持图像输入(带图对话会优先选它)',
|
||||
mVision: '视觉',
|
||||
// ── 路由 ──
|
||||
routeHint: '路由别名是给调用方用的"虚拟模型名"(如 wjd):按下面顺序逐个尝试,全失败才 502。数组顺序 = 优先级。',
|
||||
rName: '别名',
|
||||
h_rName: '调用时 model 填这个名字',
|
||||
rTimeout: '单模型超时(秒)',
|
||||
h_rTimeout: '某个模型多久没出结果就切下一个,避免整链挂死',
|
||||
rRetry: '单模型重试次数',
|
||||
h_rRetry: '切下一个之前的重试次数(含首次);想让链路快速切换就填 1',
|
||||
rRate: '本路由 QPS 上限',
|
||||
h_rRate: '留空 = 不限',
|
||||
rModels: 'fallback 模型链',
|
||||
h_rModels: '从上到下依次尝试;可用模型来自上面的供应商清单',
|
||||
// ── 可观测性 ──
|
||||
f_o_log_level: '日志级别',
|
||||
h_o_log_level: 'DEBUG 最啰嗦,生产 INFO 够用',
|
||||
|
||||
Reference in new issue
Block a user