mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
* feat(main.py): initial commit for `/image/variations` endpoint support * refactor(base_llm/): introduce new base llm base config for image variation endpoints * refactor(openai/image_variations/transformation.py): implement openai image variation transformation handler * fix: test * feat(openai/): working openai `/image/variation` endpoint calls via sdk * feat(topaz/): topaz sync image variation call support Addresses https://github.com/BerriAI/litellm/issues/7593 ' * fix(topaz/transformation.py): fix linting errors * fix(openai/image_variations/handler.py): fix passing json data * fix(main.py): image_variation/ support async image variation route - `aimage_variation` * fix(test_get_model_info.py): fix test * fix: cleanup unused imports * feat(openai/): add async `/image/variations` endpoint support * feat(topaz/): support async `/image/variations` calls * fix: test * fix(utils.py): fix get_model_info_helper for no model info w/ provider config handles situation where model info is not known but provider config exists * test(test_router_fallbacks.py): mark flaky test * fix: fix unused imports * test: bump otel load test perf threshold - accounts for current load tests hitting same server
28 lines
651 B
Python
28 lines
651 B
Python
from abc import ABC, abstractmethod
|
|
from typing import List, Optional
|
|
|
|
from litellm.types.utils import ModelInfoBase
|
|
|
|
|
|
class BaseLLMModelInfo(ABC):
|
|
@abstractmethod
|
|
def get_model_info(
|
|
self,
|
|
model: str,
|
|
existing_model_info: Optional[ModelInfoBase] = None,
|
|
) -> Optional[ModelInfoBase]:
|
|
pass
|
|
|
|
@abstractmethod
|
|
def get_models(self) -> List[str]:
|
|
pass
|
|
|
|
@staticmethod
|
|
@abstractmethod
|
|
def get_api_key(api_key: Optional[str] = None) -> Optional[str]:
|
|
pass
|
|
|
|
@staticmethod
|
|
@abstractmethod
|
|
def get_api_base(api_base: Optional[str] = None) -> Optional[str]:
|
|
pass
|