Merge pull request #857 from stabey/codex/fix-global-model-name-reservation

fix(routing): reserve global model names across provider aliases
This commit is contained in:
ZheFox
2026-10-06 22:15:36 +08:00
committed by GitHub
7 changed files with 560 additions and 33 deletions
@@ -185,6 +185,16 @@ impl MinimalCandidateSelectionRowSource for GatewayDataState {
) -> Result<Vec<StoredMinimalCandidateSelectionRow>, DataLayerError> {
self.list_pool_key_candidate_rows_for_group(query).await
}
async fn read_reserved_global_model_name(
&self,
model_name: &str,
) -> Result<Option<String>, DataLayerError> {
Ok(self
.get_public_global_model_by_name(model_name)
.await?
.map(|global_model| global_model.name))
}
}
#[async_trait]