From 43e97326e035ff416a7536e603ae16050ff78c32 Mon Sep 17 00:00:00 2001 From: 9qeklajc Date: Fri, 12 Dec 2025 20:14:43 +0100 Subject: [PATCH] fix model naming issue in response --- routstr/proxy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/routstr/proxy.py b/routstr/proxy.py index edceaaa6..38224ea8 100644 --- a/routstr/proxy.py +++ b/routstr/proxy.py @@ -65,7 +65,11 @@ def get_upstreams() -> list[BaseUpstreamProvider]: def get_model_instance(model_id: str) -> Model | None: """Get Model instance by ID from global cache.""" - return _model_instances.get(model_id.lower()) + return next( + (model for alias, model in _model_instances.items() + if alias.lower() in model_id.lower()), + None + ) def get_provider_for_model(model_id: str) -> BaseUpstreamProvider | None: