mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-13 23:11:40 +00:00
Fix failing tests
Some checks failed
Unit Tests: Security / security (push) Has been cancelled
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Has been cancelled
Unit Tests: Proxy DB Operations / auth-checks (push) Has been cancelled
Unit Tests: Proxy DB Operations / budgets (push) Has been cancelled
Unit Tests: Proxy DB Operations / custom-logging (push) Has been cancelled
Unit Tests: Proxy DB Operations / db-and-spend (push) Has been cancelled
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Has been cancelled
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Has been cancelled
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Has been cancelled
Unit Tests: Proxy DB Operations / key-generation (push) Has been cancelled
Unit Tests: Proxy DB Operations / logging-misc (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-runtime (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-server-core (push) Has been cancelled
Unit Tests: Proxy DB Operations / schema-migration (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-utils (push) Has been cancelled
Some checks failed
Unit Tests: Security / security (push) Has been cancelled
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Has been cancelled
Unit Tests: Proxy DB Operations / auth-checks (push) Has been cancelled
Unit Tests: Proxy DB Operations / budgets (push) Has been cancelled
Unit Tests: Proxy DB Operations / custom-logging (push) Has been cancelled
Unit Tests: Proxy DB Operations / db-and-spend (push) Has been cancelled
Unit Tests: Proxy DB Operations / endpoints-and-responses (push) Has been cancelled
Unit Tests: Proxy DB Operations / guardrails-hooks (push) Has been cancelled
Unit Tests: Proxy DB Operations / jwt-and-keys (push) Has been cancelled
Unit Tests: Proxy DB Operations / key-generation (push) Has been cancelled
Unit Tests: Proxy DB Operations / logging-misc (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-runtime (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-server-core (push) Has been cancelled
Unit Tests: Proxy DB Operations / schema-migration (push) Has been cancelled
Unit Tests: Proxy DB Operations / proxy-utils (push) Has been cancelled
This commit is contained in:
parent
6f979a12ec
commit
494f426a5f
4 changed files with 24 additions and 12 deletions
|
|
@ -625,7 +625,10 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):
|
|||
if not isinstance(item, dict):
|
||||
return
|
||||
try:
|
||||
output_index = int(parsed_chunk.get("output_index"))
|
||||
output_index_raw = parsed_chunk.get("output_index")
|
||||
if output_index_raw is None:
|
||||
raise ValueError("missing output_index")
|
||||
output_index = int(output_index_raw)
|
||||
except (TypeError, ValueError):
|
||||
output_index = len(recovered_output_items)
|
||||
recovered_output_items[output_index] = item
|
||||
|
|
@ -642,7 +645,10 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):
|
|||
return
|
||||
|
||||
try:
|
||||
output_index = int(parsed_chunk.get("output_index"))
|
||||
output_index_raw = parsed_chunk.get("output_index")
|
||||
if output_index_raw is None:
|
||||
raise ValueError("missing output_index")
|
||||
output_index = int(output_index_raw)
|
||||
except (TypeError, ValueError):
|
||||
output_index = len(recovered_text_only_items)
|
||||
|
||||
|
|
@ -664,7 +670,10 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):
|
|||
return
|
||||
|
||||
try:
|
||||
content_index = int(parsed_chunk.get("content_index"))
|
||||
content_index_raw = parsed_chunk.get("content_index")
|
||||
if content_index_raw is None:
|
||||
raise ValueError("missing content_index")
|
||||
content_index = int(content_index_raw)
|
||||
except (TypeError, ValueError):
|
||||
content_index = len(content)
|
||||
|
||||
|
|
@ -771,8 +780,8 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):
|
|||
logging_obj
|
||||
)
|
||||
if recovered_output_items:
|
||||
output_items = recovered_output_items
|
||||
raw_response.output = recovered_output_items
|
||||
output_items = cast(Any, recovered_output_items)
|
||||
raw_response.output = cast(Any, recovered_output_items)
|
||||
verbose_logger.warning(
|
||||
"Recovered empty Responses API output from raw SSE for model=%s",
|
||||
model,
|
||||
|
|
|
|||
|
|
@ -213,6 +213,8 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig):
|
|||
if not isinstance(item, dict):
|
||||
return
|
||||
try:
|
||||
if output_index is None:
|
||||
raise ValueError("missing output_index")
|
||||
index = int(output_index)
|
||||
except (TypeError, ValueError):
|
||||
index = len(streamed_output_items)
|
||||
|
|
|
|||
|
|
@ -131,11 +131,12 @@ def build_pages_from_reducto(result: Dict[str, Any]) -> List["OCRPage"]:
|
|||
block.get("content", "") for block in blocks if block.get("content")
|
||||
)
|
||||
page_index = max(page_no - 1, 0)
|
||||
pages.append(
|
||||
OCRPage(
|
||||
index=page_index,
|
||||
markdown=markdown,
|
||||
blocks=blocks,
|
||||
)
|
||||
page = OCRPage(
|
||||
index=page_index,
|
||||
markdown=markdown,
|
||||
)
|
||||
# OCRPage accepts extra keys at runtime; assign blocks after construction
|
||||
# so static typing does not reject provider-specific metadata.
|
||||
setattr(page, "blocks", blocks)
|
||||
pages.append(page)
|
||||
return pages
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class VertexBase:
|
|||
self._credentials: Optional[GoogleCredentialsObject] = None
|
||||
self._credentials_project_mapping: Dict[
|
||||
Tuple[Optional[VERTEX_CREDENTIALS_TYPES], Optional[str]],
|
||||
Tuple[GoogleCredentialsObject, str],
|
||||
Tuple[GoogleCredentialsObject, Optional[str]],
|
||||
] = {}
|
||||
self.project_id: Optional[str] = None
|
||||
self.async_handler: Optional[AsyncHTTPHandler] = None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue