第二十七轮: 三线直传(/v1/messages,/v1/responses)+删除路由别名;第二十八轮: element-plus 按需引入+死代码清理+前端支持格式列/API Key 文档
This commit is contained in:
1 parent
1e1130a8ad
commit
327721b8ef
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',
|
||||
|
||||
Reference in new issue
Block a user