Skip to content
Prev Previous commit
Next Next commit
fix SSE issues
  • Loading branch information
ishaan-jaff committed Dec 10, 2025
commit 2e9f6630e4b439496d48a026e7842ff9bc4664cb
11 changes: 6 additions & 5 deletions litellm/llms/sap/chat/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@

import json
import time
import httpx
from typing import AsyncIterator, Iterator, Optional

from typing import Iterator, Optional, AsyncIterator
import httpx

from litellm.llms.base_llm.chat.transformation import BaseConfig
from litellm.llms.base_llm.chat.transformation import BaseConfig, BaseLLMException
from litellm.types.llms.openai import OpenAIChatCompletionChunk

from ...custom_httpx.llm_http_handler import BaseLLMHTTPHandler


# -------------------------------
# Errors
# -------------------------------
class GenAIHubOrchestrationError(Exception):
class GenAIHubOrchestrationError(BaseLLMException):
def __init__(self, status_code: int, message: str):
super().__init__(message)
super().__init__(status_code=status_code, message=message)
self.status_code = status_code
self.message = message

Expand Down
6 changes: 3 additions & 3 deletions litellm/llms/sap/embed/transformation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Translates from OpenAI's `/v1/embeddings` to IBM's `/text/embeddings` route.
"""

from typing import Optional, List, Dict, Literal
from pydantic import BaseModel, Field
from functools import cached_property
from typing import Dict, List, Literal, Optional, Union

import httpx
from pydantic import BaseModel, Field

from litellm.llms.base_llm.embedding.transformation import (
BaseEmbeddingConfig,
Expand Down Expand Up @@ -55,7 +55,7 @@ class EmbeddingsModules(BaseModel):


class EmbeddingInput(BaseModel):
text: str | List[str]
text: Union[str, List[str]]
type: Literal["text", "document", "query"] = "text"


Expand Down