mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
Litellm dev 10 26 2024 (#6472)
* docs(exception_mapping.md): add missing exception types Fixes https://github.com/Aider-AI/aider/issues/2120#issuecomment-2438971183 * fix(main.py): register custom model pricing with specific key Ensure custom model pricing is registered to the specific model+provider key combination * test: make testing more robust for custom pricing * fix(redis_cache.py): instrument otel logging for sync redis calls ensures complete coverage for all redis cache calls
This commit is contained in:
parent
f44ab00de2
commit
70111a7abd
9 changed files with 310 additions and 72 deletions
|
@ -661,13 +661,7 @@ class APIResponseValidationError(openai.APIResponseValidationError): # type: ig
|
|||
return _message
|
||||
|
||||
|
||||
class OpenAIError(openai.OpenAIError): # type: ignore
|
||||
def __init__(self, original_exception=None):
|
||||
super().__init__()
|
||||
self.llm_provider = "openai"
|
||||
|
||||
|
||||
class JSONSchemaValidationError(APIError):
|
||||
class JSONSchemaValidationError(APIResponseValidationError):
|
||||
def __init__(
|
||||
self, model: str, llm_provider: str, raw_response: str, schema: str
|
||||
) -> None:
|
||||
|
@ -678,9 +672,13 @@ class JSONSchemaValidationError(APIError):
|
|||
model, raw_response, schema
|
||||
)
|
||||
self.message = message
|
||||
super().__init__(
|
||||
model=model, message=message, llm_provider=llm_provider, status_code=500
|
||||
)
|
||||
super().__init__(model=model, message=message, llm_provider=llm_provider)
|
||||
|
||||
|
||||
class OpenAIError(openai.OpenAIError): # type: ignore
|
||||
def __init__(self, original_exception=None):
|
||||
super().__init__()
|
||||
self.llm_provider = "openai"
|
||||
|
||||
|
||||
class UnsupportedParamsError(BadRequestError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue