From dd4ed7541f6fabc2ba9380618392ae81d7c86b30 Mon Sep 17 00:00:00 2001 From: Shroominic Date: Mon, 22 Dec 2025 11:31:19 +0100 Subject: [PATCH] undo 43e9732 --- routstr/proxy.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/routstr/proxy.py b/routstr/proxy.py index 38224ea8..edceaaa6 100644 --- a/routstr/proxy.py +++ b/routstr/proxy.py @@ -65,11 +65,7 @@ def get_upstreams() -> list[BaseUpstreamProvider]: def get_model_instance(model_id: str) -> Model | None: """Get Model instance by ID from global cache.""" - return next( - (model for alias, model in _model_instances.items() - if alias.lower() in model_id.lower()), - None - ) + return _model_instances.get(model_id.lower()) def get_provider_for_model(model_id: str) -> BaseUpstreamProvider | None: