Compare commits

..
5 Commits
Author SHA1 Message Date
ZyyandCodex 2cbdd62b4e chore: bump version to 3.60.1
Co-authored-by: Codex <noreply@openai.com>
2026-11-29 19:44:01 +08:00
ZyyandCodex 39cc23d2f0 chore(ui): pin the host to the bundled UI revision
Co-authored-by: Codex <noreply@openai.com>
2026-11-29 19:43:44 +08:00
ZyyandCodex 102131056b fix(ui): refine table spacing and provider icon sizes
Co-authored-by: Codex <noreply@openai.com>
2026-11-29 19:38:54 +08:00
ZyyandCodex c94a443620 perf(store): reduce redundant persistence and write amplification
Reuse unchanged catalog TOAST values during refresh. Remove unused analytics source versions and duplicate artifact version storage, retire the covered charge-event index, and index artifact configuration cleanup.

Co-authored-by: Codex <noreply@openai.com>
2026-11-29 18:51:12 +08:00
github-actions[bot] ef870690e3 chore(release): update release channels to 3.60.0 2026-11-29 10:43:34 +00:00
17 changed files with 123 additions and 65 deletions
@@ -107,15 +107,15 @@ impl PgRequestAnalyticsRepository {
order by pending.oldest_pending_at, pending.request_id limit ($1::bigint - (select count(*) from live))
) select request_id, change_version from live union all select request_id, change_version from oldest")
.bind(i64::from(batch_size)).fetch_all(&mut *transaction).await.map_err(|error| postgres_unavailable("load analytics request queue", error))?;
let mut jobs = Vec::with_capacity(rows.len());
let mut ids = Vec::<String>::with_capacity(rows.len());
let mut versions = Vec::<i64>::with_capacity(rows.len());
for row in rows {
jobs.push(ProjectionJob { id: get(&row,"request_id")?, version: get(&row,"change_version")? });
ids.push(get(&row,"request_id")?);
versions.push(get(&row,"change_version")?);
}
self.project_batch(&mut transaction, &jobs).await?;
result.projected_requests = jobs.len() as u64;
self.project_batch(&mut transaction, &ids).await?;
result.projected_requests = ids.len() as u64;
result.backfilled_requests = self.backfill(&mut transaction, batch_size).await?;
let ids = jobs.iter().map(|job|job.id.clone()).collect::<Vec<_>>();
let versions = jobs.iter().map(|job|job.version).collect::<Vec<_>>();
if result.projected_requests + result.backfilled_requests > 0 {
publish_generation(&mut transaction, true).await?;
}
@@ -153,38 +153,35 @@ impl PgRequestAnalyticsRepository {
async fn project_batch(
&self,
tx: &mut sqlx::Transaction<'_, Postgres>,
jobs: &[ProjectionJob],
ids: &[String],
) -> StoreResult<()> {
if jobs.is_empty() {
if ids.is_empty() {
return Ok(());
}
let ids = jobs.iter().map(|job| job.id.clone()).collect::<Vec<_>>();
let versions = jobs.iter().map(|job| job.version).collect::<Vec<_>>();
let previous = sqlx::query(sqlx::AssertSqlSafe(format!(
"{} where mr.id=any($1::text[])",
fact_select()
)))
.bind(&ids)
.bind(ids)
.fetch_all(&mut **tx)
.await
.map_err(|error| postgres_unavailable("read previous analytics contributions", error))?;
sqlx::query("delete from request_analytics_facts where id=any($1::text[])")
.bind(&ids)
.bind(ids)
.execute(&mut **tx)
.await
.map_err(|error| postgres_unavailable("replace analytics facts", error))?;
sqlx::query(PROJECT_REQUEST)
.bind(&ids)
.bind(versions)
.bind(ids)
.execute(&mut **tx)
.await
.map_err(|error| postgres_unavailable("project analytics facts", error))?;
self.project_billing_batch(tx, &ids).await?;
self.project_billing_batch(tx, ids).await?;
let current = sqlx::query(sqlx::AssertSqlSafe(format!(
"{} where mr.id=any($1::text[])",
fact_select()
)))
.bind(&ids)
.bind(ids)
.fetch_all(&mut **tx)
.await
.map_err(|error| postgres_unavailable("read current analytics contributions", error))?;
@@ -204,7 +201,7 @@ impl PgRequestAnalyticsRepository {
return Ok(0);
}
let mut query = QueryBuilder::<Postgres>::new(
"select id,started_at,nextval('request_analytics_change_version') as version,exists(select 1 from request_analytics_facts f where f.id=model_requests.id) as projected from model_requests",
"select id,started_at,exists(select 1 from request_analytics_facts f where f.id=model_requests.id) as projected from model_requests",
);
// 首批与后续批次使用两种明确的计划,避免可空游标的 OR 使通用计划退化为全索引过滤
if let Some(start) = get::<Option<DateTime<Utc>>>(&state, "backfill_cursor_started_at")? {
@@ -225,17 +222,14 @@ impl PgRequestAnalyticsRepository {
.fetch_all(&mut **tx)
.await
.map_err(|error| postgres_unavailable("read analytics backfill batch", error))?;
let mut jobs = Vec::with_capacity(rows.len());
let mut ids = Vec::<String>::with_capacity(rows.len());
for row in &rows {
if get::<bool>(row, "projected")? {
continue;
}
jobs.push(ProjectionJob {
id: get(row, "id")?,
version: get(row, "version")?,
});
ids.push(get(row, "id")?);
}
self.project_batch(tx, &jobs).await?;
self.project_batch(tx, &ids).await?;
if let Some(last) = rows.last() {
sqlx::query("update request_analytics_build_state set backfill_cursor_started_at = $1, backfill_cursor_id = $2, coverage_start = $1 + interval '1 microsecond' where singleton")
.bind(get::<DateTime<Utc>>(last,"started_at")?).bind(get::<String>(last,"id")?).execute(&mut **tx).await.map_err(|error| postgres_unavailable("save analytics backfill cursor", error))?;
@@ -377,11 +371,6 @@ pub(super) fn collections(
Ok(result)
}
struct ProjectionJob {
id: String,
version: i64,
}
async fn publish_generation(
tx: &mut sqlx::Transaction<'_, Postgres>,
facts_changed: bool,
@@ -391,4 +380,4 @@ async fn publish_generation(
Ok(())
}
const PROJECT_REQUEST: &str = "insert into request_analytics_facts (id, started_at, completed_at, client_api_key_ref, provider_account_ref, routing_group_refs, operation, provider_kind, requested_model_id, upstream_model_id, outcome, client_status_code, upstream_status_code, client_transport, upstream_transport, attempt_count, client_response_id, upstream_response_id, upstream_request_id, recovered_at, downstream_committed_at, request_kind, image_generation_requested, image_generation_succeeded, error_kind, input_tokens, output_tokens, cached_input_tokens, cache_write_input_tokens, reasoning_output_tokens, image_input_tokens, image_output_tokens, total_tokens, cost_source, cost_currency, cost_amount, first_token_ms, latency_ms, admission_decision_ms, account_selection_wait_ms, upstream_response_ms, capacity_used_slots, capacity_total_slots, source_version, ops_failure_count, ops_rate_limited_count, ops_auth_failure_count, ops_provider_5xx_count) select mr.id, mr.started_at, mr.completed_at, mr.client_api_key_ref, mr.provider_account_ref, array(select distinct group_ref from unnest(mr.routing_group_refs) group_ref order by group_ref), mr.operation, mr.provider_kind, mr.requested_model_id, mr.upstream_model_id, mr.outcome, mr.client_status_code, mr.upstream_status_code, mr.client_transport, mr.upstream_transport, mr.attempt_count, mr.client_response_id, mr.upstream_response_id, mr.upstream_request_id, mr.recovered_at, mr.downstream_committed_at, mr.request_kind, mr.image_generation_requested, mr.image_generation_succeeded, mr.error_kind, mr.input_tokens, mr.output_tokens, mr.cached_input_tokens, mr.cache_write_input_tokens, mr.reasoning_output_tokens, mr.image_input_tokens, mr.image_output_tokens, mr.total_tokens, mr.cost_source, mr.cost_currency, mr.cost_amount, mr.first_token_ms, mr.latency_ms, mr.admission_decision_ms, mr.account_selection_wait_ms, mr.upstream_response_ms, mr.capacity_used_slots, mr.capacity_total_slots, job.version, ops.failure_count, ops.rate_limited_count, ops.auth_failure_count, ops.provider_5xx_count from unnest($1::text[],$2::bigint[]) job(id,version) join model_request_observations mr on mr.id=job.id cross join lateral (select count(*)::bigint as failure_count, count(*) filter(where failure_kind in ('rate_limited','quota_exhausted') or status_code=429)::bigint as rate_limited_count, count(*) filter(where failure_kind in ('authentication','authorization','invalid_credential') or status_code in (401,403))::bigint as auth_failure_count, count(*) filter(where status_code between 500 and 599)::bigint as provider_5xx_count from ops_events where model_request_id=mr.id) ops returning id, started_at";
const PROJECT_REQUEST: &str = "insert into request_analytics_facts (id, started_at, completed_at, client_api_key_ref, provider_account_ref, routing_group_refs, operation, provider_kind, requested_model_id, upstream_model_id, outcome, client_status_code, upstream_status_code, client_transport, upstream_transport, attempt_count, client_response_id, upstream_response_id, upstream_request_id, recovered_at, downstream_committed_at, request_kind, image_generation_requested, image_generation_succeeded, error_kind, input_tokens, output_tokens, cached_input_tokens, cache_write_input_tokens, reasoning_output_tokens, image_input_tokens, image_output_tokens, total_tokens, cost_source, cost_currency, cost_amount, first_token_ms, latency_ms, admission_decision_ms, account_selection_wait_ms, upstream_response_ms, capacity_used_slots, capacity_total_slots, ops_failure_count, ops_rate_limited_count, ops_auth_failure_count, ops_provider_5xx_count) select mr.id, mr.started_at, mr.completed_at, mr.client_api_key_ref, mr.provider_account_ref, array(select distinct group_ref from unnest(mr.routing_group_refs) group_ref order by group_ref), mr.operation, mr.provider_kind, mr.requested_model_id, mr.upstream_model_id, mr.outcome, mr.client_status_code, mr.upstream_status_code, mr.client_transport, mr.upstream_transport, mr.attempt_count, mr.client_response_id, mr.upstream_response_id, mr.upstream_request_id, mr.recovered_at, mr.downstream_committed_at, mr.request_kind, mr.image_generation_requested, mr.image_generation_succeeded, mr.error_kind, mr.input_tokens, mr.output_tokens, mr.cached_input_tokens, mr.cache_write_input_tokens, mr.reasoning_output_tokens, mr.image_input_tokens, mr.image_output_tokens, mr.total_tokens, mr.cost_source, mr.cost_currency, mr.cost_amount, mr.first_token_ms, mr.latency_ms, mr.admission_decision_ms, mr.account_selection_wait_ms, mr.upstream_response_ms, mr.capacity_used_slots, mr.capacity_total_slots, ops.failure_count, ops.rate_limited_count, ops.auth_failure_count, ops.provider_5xx_count from unnest($1::text[]) job(id) join model_request_observations mr on mr.id=job.id cross join lateral (select count(*)::bigint as failure_count, count(*) filter(where failure_kind in ('rate_limited','quota_exhausted') or status_code=429)::bigint as rate_limited_count, count(*) filter(where failure_kind in ('authentication','authorization','invalid_credential') or status_code in (401,403))::bigint as auth_failure_count, count(*) filter(where status_code between 500 and 599)::bigint as provider_5xx_count from ops_events where model_request_id=mr.id) ops returning id, started_at";
@@ -264,8 +264,8 @@ impl PluginStore for PgPluginStore {
.map_err(|error| admin_store_error("plugin", error))?;
let mut platforms = metadata.platforms.clone();
platforms.sort();
let row = sqlx::query("insert into plugin_artifacts (sha256, plugin_id, version, metadata_json, source_json, outbound_proxy_id, archive) values ($1,$2,$3,$4,$5,$6,$7) returning metadata_json, source_json, installed_at, accepted_at")
.bind(&metadata.sha256).bind(&metadata.plugin_id).bind(&metadata.version)
let row = sqlx::query("insert into plugin_artifacts (sha256, plugin_id, metadata_json, source_json, outbound_proxy_id, archive) values ($1,$2,$3,$4,$5,$6) returning metadata_json, source_json, installed_at, accepted_at")
.bind(&metadata.sha256).bind(&metadata.plugin_id)
.bind(sqlx::types::Json(&metadata)).bind(sqlx::types::Json(&source))
.bind(outbound_proxy.map(|proxy| proxy.id)).bind(artifact.archive.as_ref())
.fetch_one(&mut *transaction).await.map_err(|error| {
@@ -64,11 +64,14 @@ impl PgProviderAccountRepository {
observation: &AccountCatalogObservation,
document: &[u8],
) -> Result<bool, CoreStoreError> {
// 相同正文复用旧 TOAST 值,定期复查只更新账号观测,减少正文重写及 WAL
let result = sqlx::query("insert into provider_account_model_catalogs (account_id, credential_revision, plan_type, observed_at, document, etag)
select a.id, a.credential_revision, a.plan_type, $4, $5, $6 from provider_accounts a
where a.id=$1 and a.credential_revision=$2 and a.plan_type is not distinct from $3 for share
on conflict (account_id) do update set credential_revision=excluded.credential_revision, plan_type=excluded.plan_type,
etag=excluded.etag, observed_at=excluded.observed_at, document=excluded.document
etag=excluded.etag, observed_at=excluded.observed_at, document=case
when provider_account_model_catalogs.document_hash=excluded.document_hash
then provider_account_model_catalogs.document else excluded.document end
where provider_account_model_catalogs.credential_revision < excluded.credential_revision or
(provider_account_model_catalogs.credential_revision=excluded.credential_revision and provider_account_model_catalogs.observed_at <= excluded.observed_at)")
.bind(observation.account_id.as_str()).bind(i64::try_from(observation.revision.get()).map_err(|_|CoreStoreError::new(CoreStoreErrorKind::InvalidData))?)
@@ -449,7 +449,7 @@ async fn extrema_rebuild_reads_only_its_bucket_when_history_is_large() {
}
drain_analytics(&pool).await;
// 只扩充其他时间桶的事实,规划器拿到真实行数后不能再为一个分组扫描全部历史
sqlx::query("insert into request_analytics_facts select ('history_'||n)::text as id,(f.started_at-make_interval(hours=>n/1000+2))::timestamptz,f.completed_at-make_interval(hours=>n/1000+2),f.client_api_key_ref,f.provider_account_ref,f.routing_group_refs,f.operation,f.provider_kind,f.requested_model_id,f.upstream_model_id,f.outcome,f.client_status_code,f.upstream_status_code,f.client_transport,f.upstream_transport,f.attempt_count,null,null,null,f.recovered_at,f.downstream_committed_at,f.request_kind,f.image_generation_requested,f.image_generation_succeeded,f.error_kind,f.input_tokens,f.output_tokens,f.cached_input_tokens,f.cache_write_input_tokens,f.reasoning_output_tokens,f.image_input_tokens,f.image_output_tokens,f.total_tokens,f.cost_source,f.cost_currency,f.cost_amount,f.first_token_ms,f.latency_ms,f.admission_decision_ms,f.account_selection_wait_ms,f.upstream_response_ms,f.capacity_used_slots,f.capacity_total_slots,f.standard_cost_amount,f.no_cache_cost_amount,f.source_version,f.schema_version,f.ops_failure_count,f.ops_rate_limited_count,f.ops_auth_failure_count,f.ops_provider_5xx_count from request_analytics_facts f cross join generate_series(1,300000) n where f.id='rebuild_range_2'")
sqlx::query("insert into request_analytics_facts select ('history_'||n)::text as id,(f.started_at-make_interval(hours=>n/1000+2))::timestamptz,f.completed_at-make_interval(hours=>n/1000+2),f.client_api_key_ref,f.provider_account_ref,f.routing_group_refs,f.operation,f.provider_kind,f.requested_model_id,f.upstream_model_id,f.outcome,f.client_status_code,f.upstream_status_code,f.client_transport,f.upstream_transport,f.attempt_count,null,null,null,f.recovered_at,f.downstream_committed_at,f.request_kind,f.image_generation_requested,f.image_generation_succeeded,f.error_kind,f.input_tokens,f.output_tokens,f.cached_input_tokens,f.cache_write_input_tokens,f.reasoning_output_tokens,f.image_input_tokens,f.image_output_tokens,f.total_tokens,f.cost_source,f.cost_currency,f.cost_amount,f.first_token_ms,f.latency_ms,f.admission_decision_ms,f.account_selection_wait_ms,f.upstream_response_ms,f.capacity_used_slots,f.capacity_total_slots,f.standard_cost_amount,f.no_cache_cost_amount,f.schema_version,f.ops_failure_count,f.ops_rate_limited_count,f.ops_auth_failure_count,f.ops_provider_5xx_count from request_analytics_facts f cross join generate_series(1,300000) n where f.id='rebuild_range_2'")
.execute(&pool).await.unwrap();
sqlx::query("analyze request_analytics_facts")
.execute(&pool)
@@ -34,7 +34,7 @@ async fn business_backup_restores_core_state_and_usage_without_request_history()
insert into client_api_key_budget_windows values('restore_key',now(),now()+interval '1 day',now(),now()+interval '7 days',2.5,9.5);
insert into client_api_key_charge_events(request_id,client_api_key_id,amount_usd,completed_at) values('native_a','restore_key',2.5,now());
insert into plugin_update_sources(plugin_id,source_json) values('backup.test','{}');
insert into plugin_artifacts(sha256,plugin_id,version,metadata_json,source_json,archive,accepted_at) values(repeat('a',64),'backup.test','1.0.0','{}','{}',decode('010203','hex'),now());
insert into plugin_artifacts(sha256,plugin_id,metadata_json,source_json,archive,accepted_at) values(repeat('a',64),'backup.test','{\"version\":\"1.0.0\"}','{}',decode('010203','hex'),now());
update runtime_settings set usage_retention_days=3;
update model_requests set cost_source='provider_reported',cost_amount=0.5,cost_currency='USD';
insert into request_analytics_1h(bucket_start,collection,dimensions,outcome,schema_version,histogram_version,counts,costs,distributions)
@@ -261,6 +261,55 @@ async fn bulk_catalog_restore_keeps_ten_thousand_owners_and_fences_late_writes()
.map(|a| a.id().as_str())
.collect::<std::collections::BTreeSet<_>>();
assert_eq!(ids, std::collections::BTreeSet::from(["acct_1", "acct_5"]));
// 相同正文的复查仍更新账号观测,正文变化后单独恢复,迟到写入不能撤回新目录
let refreshed = AccountCatalogObservation {
account_id: ProviderAccountId::new("acct_5").unwrap(),
observed_at: SystemTime::now(),
etag: Some("v2".into()),
..observation.clone()
};
assert!(
repo.save_account_catalog(&refreshed, &document)
.await
.unwrap()
);
let restored = repo.load_account_catalogs(&provider).await.unwrap();
assert_eq!(restored.len(), 1);
let owner = restored[0]
.accounts
.iter()
.find(|owner| owner.account_id == refreshed.account_id)
.unwrap();
assert_eq!(owner.etag, refreshed.etag);
assert_eq!(
chrono::DateTime::<Utc>::from(owner.observed_at).timestamp_micros(),
chrono::DateTime::<Utc>::from(refreshed.observed_at).timestamp_micros()
);
assert_eq!(&restored[0].document[..], &document);
let changed = AccountCatalogObservation {
observed_at: SystemTime::now(),
etag: Some("v3".into()),
..refreshed.clone()
};
assert!(
repo.save_account_catalog(&changed, b"changed")
.await
.unwrap()
);
assert!(
!repo
.save_account_catalog(&refreshed, &document)
.await
.unwrap()
);
let restored = repo.load_account_catalogs(&provider).await.unwrap();
assert_eq!(restored.len(), 2);
let changed_group = restored
.iter()
.find(|group| &group.document[..] == b"changed")
.unwrap();
assert_eq!(changed_group.accounts.len(), 1);
assert_eq!(changed_group.accounts[0].account_id, changed.account_id);
database.close().await;
}
+1
View File
@@ -49,3 +49,4 @@ e115a71b80faa08be4cf4f8747eec01e7b855ad3d8aa9622ca70b57300847b54 0046_account_a
44a24ba1bab7630881b4eeac66806231d3a7040dd72a99b0475e1a0f20cfc540 0049_client_key_validity_and_proxy_test_targets.sql
c62495a0aff26b149381370fe1eea656091ab8d9d7d55aee27be4f56d5885fd3 0050_prompt_rewrite_rules.sql
c4cc50c137deabae7895b97a8a8681c618f2b856276455d591475a02956ee373 0051_account_platform_icons.sql
5911268734a4dddf099e747bdc684ef184b5861dd6fec0482c8da5f0eb35104c 0052_storage_write_efficiency.sql
@@ -0,0 +1,18 @@
-- 投影以源快照重算,精确版本确认由持久队列承担
alter table request_analytics_facts drop column source_version;
-- 制品读取统一使用元数据版本,平台表继续约束同版本同平台的包身份
alter table plugin_artifacts
add constraint plugin_artifacts_metadata_version_ck check (
metadata_json ? 'version'
and jsonb_typeof(metadata_json->'version') = 'string'
and length(metadata_json->>'version') between 1 and 128
),
drop column version;
-- 费用事件按请求去重、按 Key 和完成时间重算,复合索引覆盖现行读取
drop index client_api_key_charge_events_client_api_key_id;
-- 删除制品时按摘要级联清理所有实例的历史配置
create index plugin_version_configurations_artifact_sha256_idx
on plugin_version_configurations (artifact_sha256);
+1 -1
View File
@@ -16,7 +16,7 @@
"build:source": "vue-tsc -p tsconfig.source.json --noEmit && vite build --mode source"
},
"dependencies": {
"@codex-proxy/ui": "github:zyycn/codex-proxy-ui#v0.14.0",
"@codex-proxy/ui": "github:zyycn/codex-proxy-ui#6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89",
"@fontsource-variable/inter": "^5.3.0",
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@lobehub/icons-vue": "1.2.0",
+5 -5
View File
@@ -192,8 +192,8 @@ importers:
.:
dependencies:
'@codex-proxy/ui':
specifier: github:zyycn/codex-proxy-ui#v0.14.0
version: https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/5754b9b13efd6d7e6d97b7c21e7d67c00c7c32a6(axios@1.21.1(debug@4.4.3))(change-case@5.4.4)(jiti@2.7.0)(postcss@8.5.30)(vite@8.3.8(@types/node@26.6.6)(jiti@2.7.0)(yaml@2.9.0))(vue@3.5.46(typescript@6.0.3))(yaml@2.9.0)
specifier: github:zyycn/codex-proxy-ui#6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89
version: https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89(axios@1.21.1(debug@4.4.3))(change-case@5.4.4)(jiti@2.7.0)(postcss@8.5.30)(vite@8.3.8(@types/node@26.6.6)(jiti@2.7.0)(yaml@2.9.0))(vue@3.5.46(typescript@6.0.3))(yaml@2.9.0)
'@fontsource-variable/inter':
specifier: ^5.3.0
version: 5.3.0
@@ -451,8 +451,8 @@ packages:
resolution: {integrity: sha512-dlT1m5e/0yUL0kRNcQn7yGLVThkgbB0Ga/1AmfDDC/8ik6AIiSf2QLQO2zPYvefsHP0aFgxO93cVLCCfDp7kzQ==}
engines: {node: '>= 20.12.0'}
'@codex-proxy/ui@https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/5754b9b13efd6d7e6d97b7c21e7d67c00c7c32a6':
resolution: {gitHosted: true, integrity: sha512-eiuhv7/uduqj701lyZEmiSOuZISyRFPsjKAFmsK0cYVASbK3weCSQAuaVAK6fthvVeECtI57jCNG5KTTL+PNpg==, tarball: https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/5754b9b13efd6d7e6d97b7c21e7d67c00c7c32a6}
'@codex-proxy/ui@https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89':
resolution: {gitHosted: true, integrity: sha512-HpFUCs+1qvcOtMrt8uoRdF/nABwnMeT2ziObJr3r+SMulIS9JKdMSQc3f+ZfsEn0iPR2Fmh6xXg/5QgWx8KNqA==, tarball: https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89}
version: 0.14.0
engines: {node: '>=24'}
peerDependencies:
@@ -3586,7 +3586,7 @@ snapshots:
fast-wrap-ansi: 0.2.2
sisteransi: 1.0.5
'@codex-proxy/ui@https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/5754b9b13efd6d7e6d97b7c21e7d67c00c7c32a6(axios@1.21.1(debug@4.4.3))(change-case@5.4.4)(jiti@2.7.0)(postcss@8.5.30)(vite@8.3.8(@types/node@26.6.6)(jiti@2.7.0)(yaml@2.9.0))(vue@3.5.46(typescript@6.0.3))(yaml@2.9.0)':
'@codex-proxy/ui@https://codeload.github.com/zyycn/codex-proxy-ui/tar.gz/6ae11ac8b3509307a7efd54e6e4c2fc8fae98b89(axios@1.21.1(debug@4.4.3))(change-case@5.4.4)(jiti@2.7.0)(postcss@8.5.30)(vite@8.3.8(@types/node@26.6.6)(jiti@2.7.0)(yaml@2.9.0))(vue@3.5.46(typescript@6.0.3))(yaml@2.9.0)':
dependencies:
'@ant-design/colors': 8.0.1
'@ant-design/fast-color': 3.0.1
@@ -15,6 +15,7 @@ const provider = defineModel<string>({ required: true })
<div class="min-w-0 overflow-x-auto">
<ProviderSelect
v-model="provider"
class="[&_svg]:size-3.25"
:aria-label="t('common.providers.filter')"
:leading-option="{ label: t('common.providers.all'), value: '', icon: LayoutGrid }"
:disabled="disabled"
+1
View File
@@ -304,6 +304,7 @@ const {
<template #provider="{ row }">
<ProviderIconGroup
class="[&_svg]:size-3.25"
:platform-icon="row.platformIcon" :provider="row.provider"
:authentication-kind="row.authenticationKind"
/>
@@ -129,7 +129,7 @@ const columns = computed(() => (defineTableColumns<PrivacyRule>([
<p class="sr-only" role="status" aria-live="polite">
{{ announcement }}
</p>
<ZTable :columns="columns" :data="rules" size="small" class="[&_tbody>tr>td:last-child]:pr-2!" :empty-text="t('settings.privacy.rules.noRulesYetAddOneOrStart')">
<ZTable :columns="columns" :data="rules" size="small" :empty-text="t('settings.privacy.rules.noRulesYetAddOneOrStart')">
<template #enabled="{ row }">
<div class="flex items-center justify-center">
<ZSwitch :disabled="disabled" :model-value="row.enabled" :aria-label="t('settings.privacy.rules.enableRule', { name: row.name })" @update:model-value="emit('toggle', row, $event)" />
@@ -84,8 +84,8 @@ const diagnosticColumns = computed(() => defineTableColumns<DiagnosticDisplayIte
kind: 'custom',
align: 'center',
width: resultDimension.value === 'model'
? 56
: 40,
? 72
: 48,
},
])
: []),
@@ -103,27 +103,28 @@ const diagnosticColumns = computed(() => defineTableColumns<DiagnosticDisplayIte
key: 'requestCount',
label: t('usage.diagnostics.request'),
kind: 'numeric',
minWidth: 48,
width: 72,
fixedWidth: true,
},
{
key: 'errorCount',
label: t('usage.health.errors'),
kind: 'numeric',
align: 'center',
minWidth: 36,
minWidth: 48,
},
{
key: 'firstTokenP95Ms',
label: t('usage.diagnostics.performance'),
kind: 'numeric',
minWidth: 116,
minWidth: 140,
fixedWidth: resultDimension.value === 'account',
},
{
key: 'estimatedCost',
label: t('usage.fields.cost'),
kind: 'numeric',
minWidth: 60,
minWidth: 96,
},
]))
@@ -179,7 +180,7 @@ function diagnosticNameDisplay(name: string) {
<ZTable
v-if="hasData"
:key="resultDimension"
class="min-h-0 max-h-80 w-full xl:max-h-none xl:contain-[size] [&_td]:px-1.5 [&_th]:px-1.5"
class="min-h-0 max-h-80 w-full xl:max-h-none xl:contain-[size]"
:columns="diagnosticColumns"
:data="displayItems"
size="small"
+6 -11
View File
@@ -1,20 +1,15 @@
# v3.60.0
## 新增功能
- 每个账号都可单独选择品牌图标,同一上游地址的账号也可分别设置
- 用量热点诊断支持按平台查看图标和名称;模型行显示实际使用过的平台,账号行显示账号图标
# v3.60.1
## 优化改进
- 账号额度预测将账号信息与周期选择集中展示,密钥额度对齐弹窗在切换参考账号时保持布局稳定
- 客户端配置示例统一显示 Linux 和 macOS 风格的路径,滚动代码时仍可使用复制按钮
- 热点诊断调整账号、平台和性能列宽,用量记录的推理强度缺失时留空
- 模型目录刷新时复用未变化的目录内容,减少数据库重复写入
- 调整紧凑表格的行高和两侧留白,为用量热点诊断的请求数、性能和费用列留出更多空间
- 缩小账号列表和平台筛选栏的图标
## 问题修复
- 修复使用 `x-api-key` 获取模型列表或详情时误选 Messages 格式的问题;需要 Messages 格式的客户端应携带 `anthropic-version`
- 修正表头排序箭头与列名的垂直对齐
## 升级须知
- 升级会自动添加账号图标字段,已有账号默认使用所属平台图标
- 首次启动时自动执行数据库迁移 0052,精简统计与插件制品的存储字段并调整索引
+5 -5
View File
@@ -1,7 +1,7 @@
version: 3.60.0
version: 3.60.1
published:
'3':
stable: 3.59.0
rc: 3.59.0
beta: 3.59.0
alpha: 3.59.0
stable: 3.60.0
rc: 3.60.0
beta: 3.60.0
alpha: 3.60.0