mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-07-30 23:36:15 +00:00
fix model naming issue in response
This commit is contained in:
+5
-1
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user