init: api-gateway v2.4.0(Agnes/b.ai/火山方舟 三家供应商网关)

This commit is contained in:
api-gateway committed 2026-09-15 17:05:46 +08:00
commit 6cc65ff76f
91 files changed
+24653

No files matched your search

+781
View File
@@ -0,0 +1,781 @@
// English locale resource
export default {
nav: {
title: 'API Gateway',
connected: 'Connected to api.wangjinding.com',
disconnected: 'Connection error',
menudashboard: 'Dashboard',
menuchat: 'Chat',
menuimages: 'Images',
menuvideos: 'Videos',
menumodels: 'Models & Providers',
menumetrics: 'Metrics',
menukeys: 'API Keys',
menuusers: 'Users',
menulogs: 'Logs',
menufeedback: 'Feedback',
menufeedbackinbox: 'User feedback',
menusettings: 'Settings',
control: 'Console',
more: 'More',
subdashboard: 'Gateway overview · refreshed every 8s',
subchat: 'Vision-ready · route wjd picks the fastest provider',
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',
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',
sublogs: 'Isolated per account · expand for request / response details',
subfeedback: 'Something off? Tell us · images welcome',
subfeedbackinbox: 'Feedback from every account · images included',
subgatewaycfg: 'Every config key, editable · applied on save',
menugatewaycfg: 'Gateway config',
subsettings: 'Appearance / generation defaults / security / gateway',
},
theme: {
choose: 'Appearance',
followSystem: 'Follow system dark mode',
followShort: 'System',
applied: 'Theme switched',
// Skin names / blurbs (mirror of zh.ts)
nameA: 'A · Deep Space Blue',
descA: 'Dark base + teal, easy on the eyes at night',
nameB: 'B · Ivory Indigo',
descB: 'Light base with white cards, clearest in daylight',
nameC: 'C · Warm Sand Green',
descC: 'Warm off-white + deep green, calm and steady',
},
top: {
refresh: 'Refresh this page',
},
common: {
all: 'All',
export: 'Export',
refresh: 'Refresh',
admin: 'admin',
logout: 'Sign out',
yes: 'Yes',
no: 'No',
none: '—',
empty: '(empty)',
ok: 'OK',
fail: 'FAIL',
copy: 'Copy',
copyOk: 'Copied',
copyFail: 'Copy failed — select the text manually',
save: 'Save',
delete: 'Delete',
reset: 'Reset',
search: 'Search',
confirm: 'Confirm',
cancel: 'Cancel',
},
login: {
title: 'API Gateway Console',
userPlaceholder: 'Username',
passPlaceholder: 'Password',
btn: 'Sign in',
errEmpty: 'Please enter account and password',
err401: 'Incorrect username or password',
err429: 'Too many attempts, rate-limited. Please try again later',
err403: 'Sign-in denied (account disabled or invalid role)',
errConn: 'Cannot reach gateway — is it running on 8808?',
success: 'Signed in',
},
dashboard: {
modelCount: 'Models',
providers: 'Providers',
routes: 'Route aliases',
fallback: 'Fallbacks',
inflight: 'In-flight',
callsMix: 'Calls ok/fail',
provShare: 'Provider success share',
latency: 'Model latency P50 / P95 (s)',
providerStatus: 'Provider status',
mediaCircuit: 'Media circuit',
circuit: 'Circuit',
modelCountShort: 'Models',
keySet: 'Key set',
routeAlias: 'Route aliases',
name: 'Name',
modelChain: 'Model chain',
gatewayInfo: 'Gateway info',
running: 'Running',
uptime: 'Uptime',
gwVersion: 'Gateway version',
concurrency: 'In-flight {cur} / peak {peak}',
latTitle: 'Model latency P50 / P95 (s)',
circ_closed: 'CLOSED',
circ_half_open: 'HALF_OPEN',
circ_open: 'OPEN',
circ_not_tracked: 'Not tracked',
noData: 'No data',
requests: 'Total requests',
successRate: 'Success rate',
avgLatency: 'Avg latency',
fallbackShort: 'Fallbacks',
noteOkFail: 'ok {ok} · fail {fail}',
noteFail: '{n} failed',
noteP95: 'highest P95 {v}s',
noteInflight: '{n} in flight',
modelCalls: 'Calls by model',
colModel: 'Model',
colCalls: 'Calls',
colLatency: 'Avg latency',
colRate: 'Success rate',
noModels: 'No calls recorded yet',
share: 'Share',
live: 'Live',
routeChain: 'Availability + speed first',
},
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',
provider: 'Provider',
state: 'State',
recentFailures: 'Recent failures',
window: 'Window',
threshold: 'Threshold',
cooldown: 'Cooldown(s)',
probing: 'Probing',
stateClosed: 'CLOSED',
stateHalf: 'HALF_OPEN',
stateOpen: 'OPEN',
loadErr: 'Failed to load metrics',
requests: 'Total requests',
failCount: 'Failures',
tokenUsage: 'Token usage',
tokenNote: 'in {p} / out {c}',
inflightPeak: 'In flight / peak',
failRateNote: 'failure rate {v}%',
snapshot: 'Live snapshot',
circuitCard: 'Circuit breakers',
},
logs: {
all: 'All',
chat: 'Chat',
image: 'Image',
video: 'Video',
autoRefresh: 'Auto-refresh',
method: 'Method',
result: 'Result',
success: 'Success',
fail: 'Fail',
searchPlaceholder: 'Search model/provider/path/request/response',
count: '{n} entries',
clearFilter: 'Clear filter',
time: 'Time',
path: 'Path',
modelProvider: 'Model / provider',
reqContent: 'Request',
respContent: 'Response',
empty: 'No logs',
emptyFiltered: 'No entries match the current filters ({n} loaded — clear other filters or the keyword)',
media: 'Download',
request: 'Request',
polls: 'Polls ({n})',
response: 'Response',
error: 'Error',
rid: 'rid',
caller: 'Caller',
reqModel: 'Requested model',
served: 'Served model',
provider: 'Provider',
streaming: 'Streaming',
loadErr: 'Failed to load logs',
},
users: {
viewLogs: 'View logs',
viewActivity: 'Activity',
tabLogs: 'Call logs',
tabImages: 'Images',
tabVideos: 'Videos',
noData: 'No records',
// Admin downloads this account's generated images / videos (proxied by the gateway)
dl: 'Download',
dlOk: 'Download started',
dlFail: 'Download failed: {msg}',
dlNoSrc: 'This record has no downloadable URL yet',
},
chat: {
newChat: 'New chat',
session: 'Conversation',
thisConv: 'This conversation',
model: 'Model',
elapsed: 'Elapsed',
msgsN: '{n} msgs',
regenerate: 'Regenerate',
copyAll: 'Copy all',
tempShort: 'Temp',
maxShort: 'Max',
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}',
servedBy: 'by {provider}',
requestedTo: 'requested {req} → served {served}',
reasoning: 'Reasoning',
thinking: 'Thinking…',
emptyResp: '(empty response)',
youError: 'Error: {msg}',
placeholder: 'Type a message, Enter to send, Shift+Enter for newline',
imgUpload: 'Upload image',
imgUrlBtn: 'Image URL',
imgPh: 'Paste an image URL, Enter to add',
imgAdd: 'Add',
imgMax: 'At most {n} images per message',
imgPickErr: 'Image processing failed: {msg}',
visionWarn: 'Model {model} does not accept image input — images will be ignored or rejected. Switch to a vision-capable model.',
useVision: 'Switch to {model}',
waiting: 'Awaiting input…',
send: 'Send',
stop: 'Stop',
stopped: 'Stopped',
temp: 'Temperature',
topP: 'top_p',
maxTokens: 'max_tokens (empty = default)',
streaming: 'Streaming output',
system: 'System prompt (prepended to each conversation)',
loadModelsErr: 'Failed to load models: {msg}',
},
images: {
historyTitle: 'History',
historySub: '{n} images',
refsLabel: 'Reference images',
title: 'Image generation',
model: 'Image model',
size: 'Size',
ratio: 'Ratio',
refsUpload: 'Upload reference',
refsUrlBtn: 'Reference URL',
refsHint: '(empty = text-to-image; uploaded images are compressed in-browser, uploads and URLs can be mixed)',
refsMax: 'At most {n} reference images',
refPickErr: 'Image processing failed: {msg}',
refsPH: 'Image-to-image / multi-image: image URLs or data:, one per line (empty = text-to-image)',
count: 'Count',
countTip: 'The upstream API returns 1 image per call; multiple images are generated one by one',
genProgress: 'Generating {i}/{n}',
partialFail: 'Generated {done}, image #{i} failed: {msg}',
refsUsed: '{n} reference image(s)',
emptyResp: 'The upstream returned no image',
placeholder: 'Describe the image to generate (style / subject / composition)',
servedBy: 'Generated by {provider}',
clear: 'Clear history',
confirmClear: 'Clear all {n} image record(s)? They are also deleted server-side (other devices lose them too). This cannot be undone.',
generate: 'Generate',
promptRow: 'Prompt',
imgLoadErr: 'Image failed to load',
dl: 'Download',
dlOk: 'Download started',
dlFail: 'Download failed: {msg}',
dlNoSrc: 'This image has no downloadable URL',
empty: 'Generated images appear here',
loadErr: 'Failed to generate image',
},
videos: {
taskTitle: 'Tasks',
fixed: 'Fixed',
title: 'Video generation',
model: 'Video model',
mode: 'Scenario',
modeText: 'Text to video',
modeKeyframe: 'Keyframe (img2video)',
modeReference: 'Reference img/audio',
firstFrame: 'First frame',
lastFrame: 'Last frame',
upload: 'Upload image',
uploadImg: 'Upload reference',
uploadAudio: 'Upload audio',
useUrl: 'Use URL',
urlPH: 'or paste an image URL',
uploadTip: 'Uploaded material is compressed to a data URI in the browser and sent directly (no public URL needed)',
pickErr: 'Failed to process material: {msg}',
refMax: 'At most {n} reference images',
audMax: 'At most {n} reference audios',
count5: '{n}/5 selected',
count3: '{n}/3 selected',
media: 'Media',
seed: 'Seed',
seedPH: 'empty = random',
keyframeTip: 'Give at least one of first/last frame — upload or paste a URL (first = opening shot, last = closing shot)',
refImagesPH: 'Reference image URLs, one per line (max 5)',
refAudiosPH: 'Reference audio URLs, one per line (max 3)',
referenceTip: 'In the prompt, <Picture N> / <Audio N> refer to the Nth material',
placeholderRef: 'Describe the video and camera move (use <Picture 1> / <Audio 1> for reference materials)',
needFrame: 'Keyframe mode needs at least one uploaded image or image URL',
needRef: 'Reference mode needs at least one image or audio (upload or URL)',
duration: 'Duration (s)',
aspect: 'Aspect',
quality: 'Quality',
placeholder: 'Describe the video content and camera movement',
async: 'Submit async (return now, poll later)',
taskCount: 'Tasks {n}',
clear: 'Clear finished',
confirmClear: 'Clear {n} finished video task(s)? Records and video links are also deleted server-side. This cannot be undone.',
generate: 'Generate video',
status: 'Status',
task: 'Task',
service: 'Service',
promptRow: 'Prompt',
elapsed: 'Elapsed',
subElapsed: '{n}s elapsed',
subWait: 'waiting {n}s',
raw: 'Raw response',
empty: 'Submitted video tasks appear here',
failText: 'Generation failed',
doneText: 'Done',
doingText: 'Generating…',
doneMsg: 'Video ready',
dl: 'Download video',
dlOk: 'Download started',
dlFail: 'Download failed: {msg}',
dlNoSrc: 'This task has no downloadable video yet',
submitMsg: 'Submitted task {id}',
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',
provider: 'Provider',
keySet: 'Key set',
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',
visionTag: 'Vision',
allTextModels: 'All text models',
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…',
testOne: 'Test this model',
latency: 'Latency',
failed: 'Failed',
speedtestDone: 'Speed test done, {n} models',
speedtestFail: 'Speed test failed',
},
history: {
saveFail: 'History could not be saved to the gateway (it may be lost on refresh) — check your session or network',
offline: 'History API unreachable — showing local browser cache only',
},
settings: {
keyUnlimited: 'Unlimited',
connInfo: 'Connection',
gwAddress: 'Gateway URL',
gwVersion: 'Gateway version',
loginUser: 'User',
sessionLen: 'Session duration',
hours: '{n} hours',
language: 'Language',
langTip: 'Switch interface language (saved locally)',
theme: 'Appearance',
appearance: 'Appearance & language',
themeSub: 'B is the default; switch to A / C anytime',
current: 'Current',
switch: 'Switch',
followSystem: 'Follow system dark mode',
followSub: 'Use theme A automatically when the system goes dark',
langSub: 'Full Chinese / English coverage',
myKeys: 'My API keys',
myKeysSub: 'Create / copy / delete, up to 3 per account',
manage: 'Manage',
gwCard: 'Gateway info',
account: 'Account',
logoutTip: 'Signing out ends this session; log in again with account and password.',
logoutBtn: 'Sign out',
chatDefaults: 'Chat default parameters',
defsTip: 'Used as defaults for a new chat (already-adjusted params are untouched).',
defaultModel: 'Default model / route',
temperature: 'Temperature',
topP: 'top_p',
maxTokens: 'max_tokens (empty = gateway default)',
streaming: 'Streaming output',
system: 'System prompt',
save: 'Save defaults',
saveOk: 'Defaults saved — applied to new chats',
resetOk: 'Restored to defaults',
providerStatus: 'Provider status',
modelsCount: 'Models',
userManagement: 'Account management (admin)',
gwConfigBtn: 'Open',
gwConfigSub: 'Tune gateway / providers / routes / pricing — applied on save',
gwConfig: 'Gateway config (admin)',
userCol: 'User',
roleCol: 'Role',
accountDeleted: 'Account {name} deleted (sessions and API keys revoked)',
revokeKeys: 'Revoke all keys',
revokeKeysOk: 'Revoked {n} API key(s) of {name}',
resetPwOk: 'Password of {name} reset to the username; {n} session(s) kicked out',
confirmDeleteUser: 'Delete account {name}? Its sessions and API keys stop working immediately. This cannot be undone.',
confirmResetPw: 'Reset the password of {name} to its username? Active sessions of that account will be signed out.',
confirmRevokeKeys: 'Revoke every API key of {name}? Callers must create new keys to keep using the gateway.',
userPwOptional: 'Initial password (empty = same as username)',
confirm: 'Confirm',
confirmDeleteKey: 'Delete this API key? Clients using it get 401 immediately and need a new key.',
usersTip: 'Create accounts / reset passwords / disable or enable / delete (admin only)',
userCreated: 'Created',
// Round 24: admin can disable / enable an account
userDisabled: 'Disabled',
userDisabledAt: 'Disabled at {ts}',
disableUser: 'Disable',
enableUser: 'Enable',
confirmDisableUser: 'Disable account {name}? It can no longer sign in, its API keys stop working immediately (keys are kept and work again once re-enabled), and its signed-in sessions are kicked out.',
userDisabledOk: 'Account {name} disabled ({n} session(s) kicked out, API keys suspended)',
userEnabledOk: 'Account {name} enabled — old password and API keys work again',
namesRule: 'Username must be alphanumeric; default password = username',
changePw: 'Change password',
newPw: 'New password (min 4 chars)',
pwTip: 'You are signed in — just set a new password, no current password needed. All sessions are revoked and you will sign in again with the new one.',
pwNeedNew: 'Please enter a new password',
pwChanged: 'Password updated — please sign in again',
keyLabel: 'Label (optional)',
keyHint: 'Key prefix',
keyCreated: 'Created',
createKey: 'Create API Key',
keyCol: 'API key',
keyLimitFull: 'Limit reached',
keyLegacyNoEcho: '(created before plaintext echo — cannot be shown again)',
noKey: 'You have no API Key — create one to use as a Bearer credential externally',
userMgmt: 'Account management (admin)',
newUserName: 'New username (alphanumeric)',
newUserTip: 'Create account; default password = username',
createUser: 'Create account',
keyCount: 'Keys',
resetPw: 'Reset password',
loadErr: 'Failed to load settings',
},
apidoc: {
copyCurl: 'Copy curl example',
viewDoc: 'View API docs',
title: 'API usage guide',
intro: 'Use the API Key above as the Bearer credential to call the gateway (OpenAI compatible). API keys can only call models; creating keys / changing passwords / managing accounts require a web session — a key hitting admin endpoints gets 403.',
baseTitle: 'Basics',
baseUrl: 'Base URL',
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',
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)',
epChat: 'Chat completions (OpenAI compatible, streaming + image input)',
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)',
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',
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',
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.',
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.',
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',
copyCmd: 'Copy',
},
// Round 22: feedback (member submit + progress) / inbox (admin: all + update progress)
fbStatus: {
pending: 'Pending',
doing: 'In progress',
done: 'Resolved',
},
feedback: {
write: 'Write your feedback',
placeholder: 'What feels clunky, what feature you want, what is unclear — anything goes',
attach: 'Add image',
imagesHint: 'Up to {n} · compressed before upload',
remove: 'Remove',
needContent: 'Write something before submitting',
submit: 'Submit',
submitted: 'Got it — thanks for the feedback!',
mine: 'My submissions',
mineSub: 'Track progress here after submitting',
empty: 'No feedback submitted yet',
statusAll: 'All statuses',
revoke: 'Withdraw',
revokeTitle: 'Withdraw this feedback?',
revokeBody: 'Withdrawing deletes "{n}" permanently — once an admin starts handling it you can no longer withdraw.',
revoked: 'Withdrawn',
},
// Handling log (timeline): submission + every admin action
fbLog: {
title: 'Handling log',
submitted: 'submitted',
more: 'Show all {n} entries',
less: 'Collapse',
},
inbox: {
all: 'All accounts',
allStatus: 'All statuses',
kw: 'Search content / account',
empty: 'No feedback yet',
emptyFiltered: 'Loaded {n} items, none match the current filter',
count: '{n} total',
account: 'Account',
status: 'Status',
handle: 'Update',
archAll: 'All',
archActive: 'Active only',
archOnly: 'Archived only',
archived: 'Archived',
archive: 'Archive',
unarchive: 'Unarchive',
delete: 'Delete',
deleteConfirm: 'Permanently delete this feedback and all its images — cannot be undone. Delete?',
deleted: 'Deleted',
archOk: 'Archived',
unarchOk: 'Unarchived',
dialogTitle: 'Update this feedback',
noteLabel: 'Note (visible to the submitter)',
notePlaceholder: 'e.g. Reproduced the export button, shipping next release',
save: 'Save',
saved: 'Progress updated',
preview: 'View full size',
noPreview: 'No preview — click to load the original',
loading: 'Loading…',
loadFail: 'Failed to load image',
imgCount: '{n} image(s)',
},
// Round 23: gateway config (admin edits every key of data/gateway.yaml from the UI)
gc: {
file: 'Gateway config file',
fileSub: 'Admin only · applied on save',
path: 'File',
restartKeys: 'These need a process restart',
otherKeys: 'Everything else',
otherKeysTip: 'Read per request — effective immediately after saving (no restart, no reload wait)',
saveTip: 'Saving rewrites the whole config file from this page (the old file is backed up as .bak first); secrets are never sent to the browser — only whether they are set.',
viewYaml: 'View config file',
save: 'Save & apply',
saved: 'Saved and applied',
discard: 'Discard changes',
editorTitle: 'Config file (gateway.yaml)',
editorSub: 'Edit the full YAML; click Save to apply',
exportCfg: 'Export config',
importCfg: 'Import config',
importCfgOk: 'Config imported into editor — click Save to apply',
envTitle: 'API key env vars',
envSub: 'Stored in data/.env; hidden by default, show / copy / edit',
envExport: 'Export vars',
envImport: 'Import vars',
envImportErr: 'Import vars failed',
envEmpty: 'No provider uses token_env',
envSet: 'Set',
envMissing: 'Missing',
envShow: 'Show',
envHide: 'Hide',
envCopy: 'Copy',
envCopied: 'Copied',
envSaved: 'Saved to env & applied',
saveOk: 'Saved and applied',
restartPill: 'Restart required',
restartSaved: 'Changed restart-needed keys: {keys} — take effect after restart',
backup: 'Backup',
restore: 'Restore',
backupOk: 'Backup exported (config + API keys)',
restoreConfirm: 'This will overwrite the current config and {envs} API-key env vars. Restore?',
restoreGo: 'Restore',
cancel: 'Cancel',
restoreOk: 'Config & API keys restored',
restoreInvalid: 'Invalid backup file',
errTitle: 'Save failed — nothing was changed',
needRestart: 'restart',
restartApplied: 'Saved. These need an api-gateway restart to take effect: {keys}',
savedRestart: 'Saved and applied',
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',
modelId: 'model id',
modelDisplay: 'display name',
hdrKey: 'header',
hdrVal: 'value',
tokenSet: 'key configured',
tokenEnvMissing: 'env var not set',
tokenKeep: 'empty = keep current',
tokenEmpty: 'empty = none',
jump: 'Jump to',
tabServer: 'Server & security',
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',
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_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)',
f_host: 'Bind address',
h_host: '127.0.0.1 keeps it local/reverse-proxy only; 0.0.0.0 exposes the port (auth still always on)',
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',
f_retry: 'Retries for direct model id',
h_retry: 'Retries (incl. first try) when calling a real model id instead of a route alias',
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).
// Double quotes: this message needs the {'{'} literal-brace form (braces are vue-i18n placeholders)
h_health_auth: "Off = /health only returns {'{'}\"status\":\"ok\"{'}'} for probes, no dashboard data",
f_hot_reload: 'Config hot reload',
h_hot_reload: 'Reloads hand-edited files by mtime; saving from this page is always immediate',
f_hot_reload_interval: 'Hot reload interval (s)',
h_hot_reload_interval: 'Lower = picks up hand edits sooner, higher = less IO',
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)',
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',
h_cors_origins: '"*" lets any website drive this gateway from a browser (spending your quota); use trusted domains in production',
f_graceful_shutdown: 'Graceful shutdown wait (s)',
h_graceful_shutdown: 'Seconds to wait for in-flight requests after a stop signal',
f_batch_max_concurrency: '/batch max concurrency',
h_batch_max_concurrency: 'Larger client values are clamped to this',
f_batch_max_items: '/batch max items',
h_batch_max_items: 'Beyond this → 400',
f_webhook_allow_private: 'Allow private webhook callbacks',
h_webhook_allow_private: 'SSRF guard, off by default; enables 192.168./10./loopback callback URLs',
f_docs_enabled: 'Expose /docs',
h_docs_enabled: 'FastAPI built-in API docs — off by default (it lists your endpoints)',
f_auth_fail_limit_per_min: 'Auth failures per minute',
h_auth_fail_limit_per_min: 'Per source IP; beyond this → 429 (brute-force guard)',
f_session_ttl_minutes: 'Web session TTL (minutes)',
h_session_ttl_minutes: 'Login session lifetime, default 1440 = 24h; affects new logins only',
pKey: 'Internal key',
h_pKey: 'Identifier in config (also the /health provider key); renaming creates a new one',
pName: 'Display name',
pBaseUrl: 'Base URL',
pTokenEnv: 'Key env var',
h_pTokenEnv: 'The secret lives in .env; put the variable name here (e.g. AGNES_API_KEY) instead of plaintext',
pToken: 'Plaintext key',
h_pToken: 'Only if you do not use an env var; after saving it is never echoed back',
pRateLimit: 'Provider QPS limit',
h_pRateLimit: 'Empty = unlimited (shared by all models of this provider)',
pHeaders: 'Extra headers',
h_pHeaders: 'Some providers need specific headers (auth/version); leave empty if not',
pMedia: 'Image / video endpoints',
h_pMedia: 'Only for non-standard endpoints (Agnes uses its own paths); all empty = no image/video',
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',
h_o_log_json: 'Enable for ELK / CloudWatch; plain text is nicer for humans',
f_o_access_log_maxlen: 'Access log capacity',
h_o_access_log_maxlen: 'Upper bound of "loaded N entries" on the logs page (in-memory ring buffer)',
pricing: 'Model pricing',
h_pricing: 'CNY per million tokens, used for estimated_cost_cny; unset = omitted (calls unaffected)',
priceIn: 'Input price',
priceOut: 'Output price',
dlHosts: 'Allowed download hosts',
h_dlHosts: 'Artifact CDN domains (incl. subdomains); empty = download proxy disabled. Add an entry when the CDN changes',
f_max_bytes: 'Max file size (bytes)',
h_max_bytes: 'Default 67108864 = 64MB',
},
}
+787
View File
@@ -0,0 +1,787 @@
// 中文文案资源
export default {
nav: {
title: 'API 网关',
connected: '已连接 api.wangjinding.com',
disconnected: '连接异常',
menudashboard: '仪表盘',
menuchat: '对话',
menuimages: '图像',
menuvideos: '视频',
menumodels: '模型与供应商',
menumetrics: '指标',
menukeys: 'API 密钥',
menuusers: '用户管理',
menulogs: '日志',
menufeedback: '意见反馈',
menufeedbackinbox: '用户反馈',
menusettings: '设置',
control: '控制台',
more: '更多',
subdashboard: '网关运行概况 · 数据每 8 秒刷新',
subchat: '支持附图视觉 · 路由 wjd 自动选路',
subimages: '参数在左 · 历史在右 · 下载走网关代拉',
subvideos: '720P · 时长 4–12 秒 · 异步轮询',
submodels: '供应商 / 模型 / 路由链',
submetrics: '用量与成本 · 按账号隔离',
subkeys: '每个账号最多 3 把 · 明文保存,可反复复制',
subusers: '账号与权限 · 管理员可查他人日志与资产',
sublogs: '按账号隔离 · 展开可看请求 / 响应摘要',
subfeedback: '用完觉得哪里别扭?直接说 · 可附图',
subfeedbackinbox: '全部账号提交的意见 · 含图片',
subgatewaycfg: '配置文件可视化 · 保存即生效',
menugatewaycfg: '网关配置',
subsettings: '外观 / 生成默认值 / 安全 / 网关参数',
},
theme: {
choose: '主题外观',
followSystem: '跟随系统深色模式',
followShort: '跟随系统',
applied: '主题已切换',
// 三套皮肤的名字与一句话说明(THEME_META 只存 key,换语言时跟着变)
nameA: 'A · 深空蓝',
descA: '深色底 + 青绿,夜里护眼',
nameB: 'B · 素白蓝紫',
descB: '浅底白卡,白天最清楚',
nameC: 'C · 暖砂墨绿',
descC: '暖白底 + 墨绿,温和稳重',
},
top: {
refresh: '刷新当前页',
},
common: {
all: '全部',
export: '导出',
refresh: '刷新',
admin: '管理员',
logout: '退出登录',
yes: '是',
no: '否',
none: '—',
empty: '(空)',
ok: 'OK',
fail: 'FAIL',
copy: '复制',
copyOk: '已复制',
copyFail: '复制失败,请手动选中复制',
save: '保存',
delete: '删除',
reset: '恢复默认',
search: '查询',
confirm: '确认',
cancel: '取消',
},
login: {
title: 'API 网关管理台',
userPlaceholder: '用户名',
passPlaceholder: '密码',
btn: '登录',
errEmpty: '请输入账号和密码',
err401: '账号或密码错误',
err429: '尝试次数过多,已触发限流,请稍后再试',
err403: '登录被拒绝(账号被禁用或角色异常)',
errConn: '无法连接网关,请检查服务是否在 8808 运行',
success: '登录成功',
},
dashboard: {
modelCount: '模型数',
providers: '供应商',
routes: '路由别名',
fallback: '成功降级',
inflight: '当前并发',
callsMix: '调用 ok/fail',
provShare: '供应商成功调用份额',
latency: '模型延迟 P50 / P95(s)',
providerStatus: '供应商状态',
mediaCircuit: '媒体熔断',
circuit: '熔断',
modelCountShort: '模型数',
keySet: '已配 Key',
routeAlias: '路由别名',
name: '名称',
modelChain: '模型链',
gatewayInfo: '网关信息',
running: '运行中',
uptime: '已运行',
gwVersion: '网关版本',
concurrency: '当前并发 in-flight {cur} / 峰值 {peak}',
latTitle: '模型延迟 P50 / P95(s)',
circ_closed: '正常',
circ_half_open: '半开',
circ_open: '熔断',
circ_not_tracked: '未跟踪',
noData: '暂无数据',
requests: '请求总数',
successRate: '成功率',
avgLatency: '平均延迟',
fallbackShort: '成功降级',
noteOkFail: 'ok {ok} · fail {fail}',
noteFail: '失败 {n} 次',
noteP95: 'P95 最高 {v}s',
noteInflight: '当前并发 {n}',
modelCalls: '各模型调用',
colModel: '模型',
colCalls: '调用',
colLatency: '平均延迟',
colRate: '成功率',
noModels: '暂无调用记录',
share: '份额',
live: '实时',
routeChain: '可用性 + 速度优先链',
},
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: '熔断器状态',
provider: '供应商',
state: '状态',
recentFailures: '近期失败',
window: '窗口(件)',
threshold: '阈值',
cooldown: '熔断冷却(s)',
probing: '探测中',
stateClosed: 'CLOSED',
stateHalf: 'HALF_OPEN',
stateOpen: 'OPEN',
loadErr: '加载指标失败',
requests: '请求总数',
failCount: '失败数',
tokenUsage: 'Token 用量',
tokenNote: '入 {p} / 出 {c}',
inflightPeak: '在途 / 峰值',
failRateNote: '失败率 {v}%',
snapshot: '实时快照',
circuitCard: '熔断器',
},
logs: {
all: '全部',
chat: '对话',
image: '图像',
video: '视频',
autoRefresh: '自动刷新',
method: '方法',
result: '结果',
success: '成功',
fail: '失败',
searchPlaceholder: '搜索模型/供应商/路径/请求/响应',
count: '共 {n} 条',
clearFilter: '清空筛选',
time: '时间',
path: '路径',
modelProvider: '模型 / 供应商',
reqContent: '请求内容',
respContent: '响应内容',
empty: '暂无日志',
emptyFiltered: '当前筛选下没有记录(已加载 {n} 条,别的筛选条件或关键词还开着)',
media: '下载',
request: '请求内容',
response: '响应内容',
polls: '轮询记录({n} 次)',
error: '错误',
rid: 'rid',
caller: '调用方',
reqModel: '请求模型',
served: '实际模型',
provider: '供应商',
streaming: '流式',
loadErr: '加载日志失败',
},
users: {
viewLogs: '查看日志',
viewActivity: '查看活动',
tabLogs: '调用日志',
tabImages: '图像资产',
tabVideos: '视频资产',
noData: '暂无记录',
// 管理员在资产页下载该账号生成的图/视频(走后端 /v1/media/download 代拉)
dl: '下载',
dlOk: '已开始下载',
dlFail: '下载失败:{msg}',
dlNoSrc: '这条记录还没有可下载的地址',
},
chat: {
newChat: '新建对话',
session: '会话',
thisConv: '本条对话',
model: '模型',
elapsed: '耗时',
msgsN: '{n} 条',
regenerate: '重新生成',
copyAll: '复制全文',
tempShort: '温度',
maxShort: '最大',
systemShort: '系统提示',
visionReady: '视觉能力已就绪 · 可附图',
visionOff: '当前模型不支持图像输入',
chainLabel: '{id}({chain})',
emptyChain: '空',
phDefault: '默认',
phOptional: '可选',
totalTokens: '共 {n}',
uploadedImage: '已上传图片',
reasoningTag: '推理',
routeGroup: '路由(自动降级)',
textModels: '文本模型',
params: '参数',
clear: '清空',
generating: '正在生成…',
empty: '开始与网关对话(可选任意文本模型或路由 wjd)',
fallback: '降级 · 由 {provider} 响应',
servedBy: '由 {provider} 响应',
requestedTo: '请求 {req} → 实际 {served}',
reasoning: '推理过程(reasoning)',
thinking: '思考中…',
emptyResp: '(空响应)',
youError: '出错了:{msg}',
placeholder: '输入消息,Enter 发送,Shift+Enter 换行',
imgUpload: '上传图片',
imgUrlBtn: '图片 URL',
imgPh: '粘贴图片 URL,回车添加',
imgAdd: '添加',
imgMax: '一条消息最多 {n} 张图片',
imgPickErr: '图片处理失败:{msg}',
visionWarn: '当前模型 {model} 不支持图像输入,图片会被忽略或直接报错 —— 请换用带视觉能力的模型。',
useVision: '改用 {model}',
waiting: '等待输入…',
send: '发送',
stop: '停止',
stopped: '已停止',
temp: '温度 temperature',
topP: 'top_p',
maxTokens: 'max_tokens(留空则用默认)',
streaming: '流式输出',
system: '系统提示词(每条会话开头注入)',
loadModelsErr: '加载模型列表失败:{msg}',
},
images: {
historyTitle: '生成历史',
historySub: '{n} 张',
refsLabel: '参考图',
title: '图像生成',
model: '图像模型',
size: '尺寸',
ratio: '比例',
refsUpload: '上传参考图',
refsUrlBtn: '参考图 URL',
refsHint: '(留空 = 纯文生图;上传的图片会在浏览器内自动压缩,上传/URL 可混用)',
refsMax: '参考图最多 {n} 张',
refPickErr: '图片处理失败:{msg}',
refsPH: '图生图 / 多图合成:图片 URL 或 data:,每行一个(留空 = 纯文生图)',
count: '张数',
countTip: '上游一次只出 1 张,这里会逐张调用',
genProgress: '正在逐张生成 {i}/{n}',
partialFail: '已生成 {done} 张,第 {i} 张失败:{msg}',
refsUsed: '{n} 张参考图',
emptyResp: '上游没有返回图片',
placeholder: '描述想生成的图像(可给风格/主体/构图)',
servedBy: '由 {provider} 生成',
clear: '清空历史',
confirmClear: '清空全部 {n} 张图像记录?会同时从服务端删除(其他设备同步消失),不可恢复。',
generate: '生成',
promptRow: '提示词',
imgLoadErr: '图加载失败',
dl: '下载',
dlOk: '已开始下载',
dlFail: '下载失败:{msg}',
dlNoSrc: '这张图没有可下载的地址',
empty: '生成的图像会显示在这里',
loadErr: '加载图像失败',
},
videos: {
taskTitle: '任务列表',
fixed: '固定',
title: '视频生成',
model: '视频模型',
mode: '场景',
modeText: '文生视频',
modeKeyframe: '首尾帧(图生视频)',
modeReference: '参考图/音频',
firstFrame: '首帧',
lastFrame: '尾帧',
upload: '上传图片',
uploadImg: '上传参考图',
uploadAudio: '上传参考音频',
useUrl: '用 URL',
urlPH: '或粘贴图片 URL',
uploadTip: '上传的素材会在浏览器内压缩为 data URI 直传上游(无需公网可访问的 URL)',
pickErr: '素材处理失败:{msg}',
refMax: '参考图最多 {n} 张',
audMax: '参考音频最多 {n} 段',
count5: '已选 {n}/5',
count3: '已选 {n}/3',
media: '素材',
seed: '种子',
seedPH: '留空随机',
keyframeTip: '首帧/尾帧至少给一个:上传图片或粘贴 URL 都行(首帧=起始画面,尾帧=结束画面)',
refImagesPH: '参考图片 URL,每行一个(最多 5 张)',
refAudiosPH: '参考音频 URL,每行一个(最多 3 段)',
referenceTip: '提示词里可用 <Picture N> / <Audio N> 指代第 N 个素材',
placeholderRef: '描述要生成的视频画面与运镜(可用 <Picture 1> / <Audio 1> 指代第 1 个参考素材)',
needFrame: '首尾帧模式需要至少上传一张图片或填一个图片 URL',
needRef: '参考模式需要至少一张图片或一段音频(可上传或填 URL)',
duration: '时长(s)',
aspect: '比例',
quality: '清晰度',
placeholder: '描述要生成的视频画面与运镜',
async: '异步提交(立即返回,后台轮询)',
taskCount: '任务 {n}',
clear: '清除已完成',
confirmClear: '清除 {n} 个已完成的视频任务?记录与视频链接会同时从服务端删除,不可恢复。',
generate: '生成视频',
status: '状态',
task: '任务',
service: '服务',
elapsed: '耗时',
subElapsed: '耗时 {n}s',
subWait: '已等待 {n}s',
promptRow: '提示词',
raw: '原始返回',
empty: '生成或提交的视频任务会显示在这里',
failText: '生成失败',
doneText: '已生成',
doingText: '生成中…',
doneMsg: '视频已生成',
dl: '下载视频',
dlOk: '已开始下载',
dlFail: '下载失败:{msg}',
dlNoSrc: '这个任务还没有可下载的视频',
submitMsg: '已提交任务 {id}',
loadErr: '加载视频失败',
},
models: {
routeAliasTitle: '路由别名(自动降级链)',
modelListTitle: '模型清单',
name: '名称',
chainLabel: '模型链(依次尝试,失败自动降级)',
providerCount: '供应商数',
id: '模型 ID',
type: '类型',
provider: '供应商',
keySet: 'Key 已配',
text: '文本',
image: '图像',
video: '视频',
route: '路由',
model: '模型',
textModels: '文本模型',
imageModels: '图像模型',
videoModels: '视频模型',
routes: '路由别名',
providers: '供应商',
loadErr: '加载模型失败',
capability: '能力',
visionTag: '视觉',
allTextModels: '全部文本模型',
providerCard: '供应商',
keyOk: 'Key 已配置',
keyMissing: 'Key 未配置',
routeCount: '{n} 条路由',
chainCount: '{n} 个模型',
providerCount2: '{n} 家供应商',
noRoute: '没有配置路由别名',
speedtest: '一键测速',
testing: '正在测试全部文本模型延迟…',
testingShort: '测速中…',
testOne: '单独测速',
latency: '延迟',
failed: '失败',
speedtestDone: '测速完成,共 {n} 个模型',
speedtestFail: '测速失败',
},
history: {
saveFail: '历史未能保存到服务端(刷新后可能丢失),请检查登录状态或网络',
offline: '连不上服务端历史接口,暂时只用本机缓存显示',
},
settings: {
keyUnlimited: '不限',
connInfo: '连接信息',
gwAddress: '网关地址',
gwVersion: '网关版本',
loginUser: '登录用户',
sessionLen: '会话长度',
hours: '{n} 小时',
language: '语言 / Language',
langTip: '界面语言切换,本地保存',
theme: '主题外观',
appearance: '外观与语言',
themeSub: '默认 B,可随时切 A / C',
current: '当前',
switch: '切换',
followSystem: '跟随系统深色模式',
followSub: '系统切深色时自动用 A',
langSub: '中英完整覆盖',
myKeys: '我的 API Key',
myKeysSub: '创建 / 复制 / 删除,每个账号最多 3 把',
manage: '去管理',
gwCard: '网关信息',
account: '账号',
logoutTip: '退出后需用账号密码重新登录。',
logoutBtn: '退出登录',
chatDefaults: '对话默认参数',
defsTip: '作为对话页初始值(本会话已改动的参数不受影响)。',
defaultModel: '默认模型 / 路由',
temperature: '温度 temperature',
topP: 'top_p',
maxTokens: 'max_tokens(留空用网关默认)',
streaming: '流式输出',
system: '系统提示词',
save: '保存默认参数',
saveOk: '默认参数已保存,新会话生效',
resetOk: '已恢复默认',
providerStatus: '供应商状态',
modelsCount: '模型数',
userManagement: '账号管理(管理员)',
gwConfigBtn: '去配置',
gwConfigSub: '改网关参数 / 供应商 / 路由 / 定价 —— 保存即生效',
gwConfig: '网关配置(管理员)',
userCol: '账号',
roleCol: '角色',
accountDeleted: '账号 {name} 已删除(会话与 API Key 一并吊销)',
revokeKeys: '吊销全部 Key',
revokeKeysOk: '已吊销 {name} 的 {n} 把 API Key',
resetPwOk: '{name} 密码已重置为账号名,踢掉会话 {n} 个',
confirmDeleteUser: '删除账号 {name}?其全部登录会话与 API Key 会立即失效,不可恢复。',
confirmResetPw: '把 {name} 的密码重置为账号名?该账号已登录的会话会被踢掉。',
confirmRevokeKeys: '吊销 {name} 的全部 API Key?外部调用方需重新创建 Key 才能继续调用。',
userPwOptional: '初始密码(留空=与账号名相同)',
confirm: '确认',
confirmDeleteKey: '删除这把 API Key?用它调用的客户端会立刻 401,需重新创建。',
usersTip: '创建账号 / 重置密码 / 停用启用 / 删除(admin 专属)',
userCreated: '创建时间',
// 第二十四轮:管理员停用 / 启用账号
userDisabled: '已停用',
userDisabledAt: '停用于 {ts}',
disableUser: '停用',
enableUser: '启用',
confirmDisableUser: '停用账号 {name}?停用后该账号无法登录,名下 API Key 立即失效(Key 不会被删除,重新启用即恢复),已登录的会话会被踢掉。',
userDisabledOk: '账号 {name} 已停用(踢掉会话 {n} 个,API Key 已失效)',
userEnabledOk: '账号 {name} 已启用,可以用原密码登录、原 API Key 继续调用',
namesRule: '账号名仅字母数字,默认密码=账号名',
changePw: '修改密码',
newPw: '新密码(至少 4 位)',
pwTip: '已登录状态直接设新密码,不用再输当前密码;改完所有会话失效,需用新密码重新登录。',
pwNeedNew: '请输入新密码',
pwChanged: '密码已更新,请用新密码重新登录',
keyLabel: '标签(可选)',
keyHint: 'Key 前缀',
keyCreated: '创建时间',
createKey: '创建 API Key',
keyCol: 'API Key',
keyLimitFull: '已达上限',
keyLegacyNoEcho: '(该 Key 早于明文回显功能,无法再显示)',
noKey: '你还没有 API Key —— 创建后可当作外部调用的 Bearer 凭证',
userMgmt: '账号管理(管理员)',
newUserName: '新账号名(字母数字)',
newUserTip: '创建账号,默认密码 = 账号名',
createUser: '创建账号',
keyCount: 'Key 数',
resetPw: '重置密码',
loadErr: '加载设置失败',
},
apidoc: {
copyCurl: '复制 curl 示例',
viewDoc: '查看接口文档',
title: 'API 调用说明',
intro: '用上面的 API Key 当作 Bearer 凭证调用网关(OpenAI 兼容)。API Key 只能调用模型;建 Key / 改密 / 管账号必须用网页登录,Key 调管理接口会 403。',
baseTitle: '基础信息',
baseUrl: '接口地址',
auth: '鉴权',
authVal: '请求头 Authorization: Bearer <你的 API Key>',
modelPick: '模型选择',
modelPickVal: 'model 填 wjd = 路由别名(按「可用 + 速度」自动降级,推荐);也可填具体模型 id 直连,不被降级影响',
ctype: '请求格式',
ctypeVal: 'application/json;对话支持 SSE 流式(stream: true)',
endpoints: '常用端点',
colMethod: '方法',
colPath: '路径',
colDesc: '说明',
epModels: '模型与路由列表(含视觉能力标记)',
epChat: '对话补全(OpenAI 兼容,支持流式与图片输入)',
epImages: '图像生成 / 图生图(n 必须为 1,多张请多次调用)',
epVideoCreate: '视频生成(异步,立即返回 video_id)',
epVideoPoll: '查询视频任务(建议每 5s 一次;被上游限流时返回 throttled)',
epHistory: '读取本人历史(图像 / 视频 / 对话)',
epLogs: '本人调用日志',
epMetrics: '指标快照(含熔断器状态)',
epHealth: '健康检查(版本 / 供应商状态)',
exChat: '示例 · 对话',
exImg: '示例 · 图像生成',
exVideo: '示例 · 视频生成 + 轮询',
exPy: '示例 · Python(OpenAI SDK 兼容)',
// 示例代码里的注释与示例文案(整段照抄时也该是当前语言)
sampleChat: '你好,介绍一下你自己',
sampleImg: '霓虹夜景的城市街道',
sampleVideo: '镜头缓慢推进',
sampleStep1: '提交任务(异步,立即返回 video_id)',
sampleStep2: '每 5s 轮询一次(被限流会回 throttled,等一下再问)',
notes: '注意事项',
noteVision: '带图对话请用支持视觉的模型(agnes-3.0-flash,列表里标「视觉」);填路由别名 wjd 时网关会自动把视觉模型排到链首。',
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。',
noteKey: 'Key 泄漏时到本页删除(立即 401),或用「用户管理」页一键吊销该账号全部 Key。',
noteAudit: '所有调用按账号记入「日志」页(仅本人可见;admin 可在用户管理页看各账号)。',
copyBase: '复制地址',
copyCmd: '复制',
},
// 第二十二轮:意见反馈(普通账号提交 + 看进度)/ 用户反馈(管理员看全部 + 改进度)
fbStatus: {
pending: '待处理',
doing: '处理中',
done: '已处理',
},
feedback: {
write: '写下你的意见或建议',
placeholder: '哪里不好用、想要什么功能、哪里看不懂 —— 都可以说',
attach: '添加图片',
imagesHint: '最多 {n} 张 · 提交前自动压缩',
remove: '移除',
needContent: '请先写点内容再提交',
submit: '提交反馈',
submitted: '收到了,感谢反馈!',
mine: '我提交过的',
mineSub: '提交后在这里看处理进度',
empty: '还没提交过反馈',
statusAll: '全部状态',
revoke: '撤回',
revokeTitle: '撤回这条反馈?',
revokeBody: '撤回后这条反馈「{n}」会被删除、不能恢复(管理员已开始处理的单子撤不了)。',
revoked: '已撤回',
},
// 处理记录(时间线):提交 + 管理员的每一次动作
fbLog: {
title: '处理记录',
submitted: '提交',
more: '展开全部 {n} 条',
less: '收起',
},
inbox: {
all: '全部账号',
allStatus: '全部进度',
kw: '搜内容 / 账号',
empty: '还没有收到反馈',
emptyFiltered: '已加载 {n} 条,但都不匹配当前筛选',
count: '共 {n} 条',
account: '账号',
status: '进度',
handle: '处理',
archAll: '全部',
archActive: '仅未归档',
archOnly: '仅已归档',
archived: '已归档',
archive: '归档',
unarchive: '取消归档',
delete: '删除',
deleteConfirm: '永久删除这条反馈(含其全部图片),不可恢复。确定删除?',
deleted: '已删除',
archOk: '已归档',
unarchOk: '已取消归档',
dialogTitle: '处理这条反馈',
noteLabel: '处理说明(提交人可见)',
notePlaceholder: '例如:已定位到导出按钮,下个版本修',
save: '保存',
saved: '进度已更新',
preview: '查看大图',
noPreview: '无预览图,点击加载原图',
loading: '加载中…',
loadFail: '图片加载失败',
imgCount: '{n} 张图',
},
// 第二十三轮:网关配置(管理员把 data/gateway.yaml 的每一项都搬上了页面)
gc: {
file: '网关配置文件',
fileSub: '管理员专属 · 保存即生效',
path: '文件位置',
restartKeys: '这几项改了要重启进程',
otherKeys: '其余所有项',
otherKeysTip: '每请求读取,保存后立刻生效(无需重启、无需等热重载)',
saveTip: '保存会用页面上的值重写整个配置文件(旧文件先备份为 .bak,可回滚);密钥只显示"配没配",不会回显到浏览器。',
viewYaml: '查看配置文件',
save: '保存并生效',
saved: '已保存并生效',
discard: '放弃改动并重载',
editorTitle: '配置文件内容(gateway.yaml)',
editorSub: '直接编辑完整 YAML,点「保存」即应用',
exportCfg: '导出配置',
importCfg: '导入配置',
importCfgOk: '配置已导入编辑器,确认无误后点「保存」应用',
envTitle: 'API Key 环境变量',
envSub: '存于 data/.env;默认隐藏,可显示、复制、修改',
envExport: '导出变量',
envImport: '导入变量',
envImportErr: '变量导入失败',
envEmpty: '暂无使用 token_env 的供应商',
envSet: '已配置',
envMissing: '未配置',
envShow: '显示',
envHide: '隐藏',
envCopy: '复制',
envCopied: '已复制',
envSaved: '已保存到环境变量并生效',
saveOk: '已保存并生效',
restartPill: '需重启服务',
restartSaved: '本次改动了需重启才能生效的项:{keys},重启后生效',
backup: '备份配置',
restore: '恢复配置',
backupOk: '已导出备份(配置 + API Key)',
restoreConfirm: '将用备份覆盖当前配置文件与 {envs} 个 API Key 环境变量,确定恢复?',
restoreGo: '恢复',
cancel: '取消',
restoreOk: '已恢复配置与 API Key',
restoreInvalid: '备份文件无效',
errTitle: '保存失败,配置未被改动',
needRestart: '需重启',
restartApplied: '已保存。这几项要重启 api-gateway 才生效:{keys}',
savedRestart: '已保存并生效',
addItem: '添加',
addModel: '添加模型',
addProvider: '添加供应商',
addRoute: '添加路由别名',
addPrice: '添加定价',
delete: '删除',
delProvider: '删除供应商',
delRoute: '删除路由',
delConfirm: '删除「{name}」?保存后才真正写盘生效。',
needKey: '供应商的 key 不能为空',
needRoute: '路由别名的名字不能为空',
dupKey: '「{name}」重复了,请改一个名字',
newProvider: '(新供应商)',
newRoute: '(新路由别名)',
unlimited: '留空 = 不限',
useServerTimeout: '留空 = 用 server.timeout',
mediaEmpty: '留空 = 不支持',
modelId: '模型 id',
modelDisplay: '显示名',
hdrKey: '请求头',
hdrVal: '值',
tokenSet: '已配置密钥',
tokenEnvMissing: '环境变量未设置',
tokenKeep: '留空 = 不修改(当前已配置)',
tokenEmpty: '留空 = 不设置',
jump: '跳到',
tabServer: '服务与安全',
tabServerSub: '监听、超时/重试、限流、CORS、会话时长等运行开关',
tabProviders: '供应商与模型',
tabProvidersSub: '供应商密钥来源、接口地址、图像/视频端点、模型清单',
tabRoutes: '路由与熔断',
tabRoutesSub: '路由别名与 fallback 模型链(顺序 = 优先级)+ 供应商熔断',
tabLog: '日志与定价',
tabLogSub: '日志级别/格式/容量 + 模型定价(人民币 / 百万 token)',
tabDownload: '下载代理',
tabDownloadSub: '允许网关代下载的 CDN 域名与单文件上限',
circuit: '供应商熔断',
h_circuit: '某供应商窗口内失败到阈值就熔断冷却,期间跳过它让 fallback 顶上',
f_c_enabled: '启用熔断',
f_c_failure_threshold: '触发阈值(次)',
f_c_cooldown: '熔断冷却(秒)',
f_c_window: '统计窗口(秒)',
h_c_enabled: '关掉 = 失败也不跳过(fallback 照常工作)',
h_c_failure_threshold: '窗口内失败到该次数就熔断',
h_c_cooldown: '熔断期间直接跳过该供应商,冷却结束后自动半开试探',
h_c_window: '按"窗口内失败次数"计数(不是连续失败)',
// ── server 段(键名与 gateway.yaml 一致,页面标签 = f_<key>)──
f_host: '监听地址',
h_host: '127.0.0.1 只对本机/反代开放;改成 0.0.0.0 会对外暴露端口(鉴权仍恒定开启)',
f_port: '监听端口',
h_port: '生产用 8808,且 Nginx 反代指向它 —— 改了要同步改反代',
f_timeout: '上游超时(秒)',
h_timeout: '单次上游请求超时;路由自身写了 timeout 的以路由为准',
f_retry: '直连模型重试次数',
h_retry: '直接用模型 id(不走路由别名)时的重试次数,含首次',
f_health_auth: '/health 需要鉴权',
// 注意:vue-i18n 把 {...} 当占位符,花括号要么写成 {'{'} / {'}'},要么整条编译不过 ——
// 编译不过的表现是"用到这条文案的整块界面不渲染",不报在文案上(踩过一次,见 check:i18n)。
// 用双引号是因为这条文案里有 {'{'} 这种字面量花括号写法(花括号是 vue-i18n 的占位符语法)
h_health_auth: "关着时 /health 只回 {'{'}\"status\":\"ok\"{'}'}(供探活),不回看板数据",
f_hot_reload: '配置热重载',
h_hot_reload: '按 mtime 自动重载手改的文件;页面上保存本来就是即时生效,与此无关',
f_hot_reload_interval: '热重载检查间隔(秒)',
h_hot_reload_interval: '越小改文件越快被发现,越大越省 IO',
f_metrics_enabled: '记录调用指标',
h_metrics_enabled: '关掉后 /metrics 与看板计数停更(不影响调用)',
f_rate_limit_rps: '全局单账号 QPS 上限',
h_rate_limit_rps: '留空 = 不限(供应商级、路由级限流见各自配置)',
f_max_body_size: '请求体上限(字节)',
h_max_body_size: '约 2MB = 2000000;带图对话别调太小',
f_cors_origins: 'CORS 允许来源',
h_cors_origins: '填 * 表示任意站点都能跨域调本网关(会消耗你的额度),生产建议换成可信域名',
f_graceful_shutdown: '优雅关闭等待(秒)',
h_graceful_shutdown: '收到停止信号后等在途请求的秒数',
f_batch_max_concurrency: '/batch 并发上限',
h_batch_max_concurrency: '客户端传更大的值会被钳到这里',
f_batch_max_items: '/batch 单次条目上限',
h_batch_max_items: '超出直接 400',
f_webhook_allow_private: '允许视频回调指向内网',
h_webhook_allow_private: 'SSRF 防护开关,默认关;开了才能回调 192.168./10./回环地址',
f_docs_enabled: '开放 /docs 文档',
h_docs_enabled: 'FastAPI 自带的接口文档,安全默认关(会暴露接口清单)',
f_auth_fail_limit_per_min: '鉴权失败限流(次/分)',
h_auth_fail_limit_per_min: '同一来源 IP 每分钟鉴权失败超过该值 → 429,防暴力枚举',
f_session_ttl_minutes: '网页会话时长(分钟)',
h_session_ttl_minutes: '登录签发的会话有效期,默认 1440 = 24 小时;只影响新登录',
// ── 供应商 ──
pKey: '内部键名',
h_pKey: '配置里的标识(也是 /health 里的 provider key),改名等于新增一个',
pName: '显示名',
pBaseUrl: '接口地址 base_url',
pTokenEnv: '密钥环境变量',
h_pTokenEnv: '密钥存在 .env 里,这里填变量名(如 AGNES_API_KEY),不把明文写进配置',
pToken: '明文密钥',
h_pToken: '没有用环境变量时才填;保存后只回报"已配置",不会再回显',
pRateLimit: '本供应商 QPS 上限',
h_pRateLimit: '留空 = 不限(供应商维度,所有模型共享)',
pHeaders: '额外请求头',
h_pHeaders: '少数供应商要带特定头(如自定义鉴权/版本头),没有就留空',
pMedia: '图像 / 视频端点',
h_pMedia: '非标准端点的供应商才填(Agnes 是自有路径);全留空 = 该供应商不支持图像/视频',
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 够用',
f_o_log_json: '结构化 JSON 日志',
h_o_log_json: '接 ELK / CloudWatch 时开;人看还是普通格式舒服',
f_o_access_log_maxlen: '访问日志条数上限',
h_o_access_log_maxlen: '日志页「已加载 N 条」的上限(内存环形缓冲)',
pricing: '模型定价',
h_pricing: '人民币 / 百万 token,用于返回 estimated_cost_cny;不填则该项不返回(不影响调用)',
priceIn: '输入价',
priceOut: '输出价',
// ── 定价 ──
// ── 下载代理 ──
dlHosts: '允许代下载的域名',
h_dlHosts: '产物 CDN 域名(含子域);留空 = 整个下载代理关闭。换了 CDN 就往这里加一条',
f_max_bytes: '单文件上限(字节)',
h_max_bytes: '默认 67108864 = 64MB',
},
}