Commit 6b127cb0 authored by Your Name's avatar Your Name

Fix indentation error in model config check

parent b8bb6826
...@@ -1051,16 +1051,16 @@ class BaseProviderHandler: ...@@ -1051,16 +1051,16 @@ class BaseProviderHandler:
if models: if models:
for model_config in models: for model_config in models:
# Handle both Pydantic objects and dictionaries # Handle both Pydantic objects and dictionaries
model_name_value = model_config.name if hasattr(model_config, 'name') else model_config.get('name') model_name_value = model_config.name if hasattr(model_config, 'name') else model_config.get('name')
if model_name_value == model: if model_name_value == model:
# Convert Pydantic object to dict if needed # Convert Pydantic object to dict if needed
if hasattr(model_config, 'model_dump'): if hasattr(model_config, 'model_dump'):
return model_config.model_dump() return model_config.model_dump()
elif hasattr(model_config, 'dict'): elif hasattr(model_config, 'dict'):
return model_config.dict() return model_config.dict()
else: else:
return model_config return model_config
return None return None
def _check_token_rate_limit(self, model: str, token_count: int) -> bool: def _check_token_rate_limit(self, model: str, token_count: int) -> bool:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment