fix(core) model_info preserves slug (#11602)

## Summary
Preserve the specified model slug when we get a prefix-based match

## Testing
- [x] added unit test

---------

Co-authored-by: Ahmed Ibrahim <aibrahim@openai.com>
This commit is contained in:
Dylan Hurd
2026-02-12 09:43:32 -08:00
committed by GitHub
parent f741fad5c0
commit f39f506700
2 changed files with 91 additions and 2 deletions

View File

@@ -141,7 +141,10 @@ impl ModelsManager {
.find_remote_model_by_longest_prefix(model, config)
.await;
let model = if let Some(remote) = remote {
remote
ModelInfo {
slug: model.to_string(),
..remote
}
} else {
model_info::model_info_from_slug(model)
};