fix(gateway): 修正 Codex 实时配额同步

Close #293

Co-authored-by: AAEE86 <ppk0227@hotmail.com>
This commit is contained in:
fawney19
2026-04-14 14:51:26 +08:00
parent 0081622f90
commit 21ac1825f3
6 changed files with 131 additions and 27 deletions

View File

@@ -443,6 +443,22 @@ impl GatewayDataState {
}
}
pub(crate) async fn update_provider_catalog_key_upstream_metadata(
&self,
key_id: &str,
upstream_metadata: Option<&serde_json::Value>,
updated_at_unix_secs: Option<u64>,
) -> Result<bool, DataLayerError> {
match &self.provider_catalog_writer {
Some(repository) => {
repository
.update_key_upstream_metadata(key_id, upstream_metadata, updated_at_unix_secs)
.await
}
None => Ok(false),
}
}
pub(crate) async fn delete_provider_catalog_key(
&self,
key_id: &str,