mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
Merge pull request #21531 from BerriAI/litellm_cicd_190226
Litellm cicd 190226
This commit is contained in:
commit
4773838561
2 changed files with 12 additions and 7 deletions
|
|
@ -1931,11 +1931,16 @@ class CustomStreamWrapper:
|
|||
hasattr(processed_chunk, "usage")
|
||||
and getattr(processed_chunk, "usage", None) is not None
|
||||
):
|
||||
# Strip usage from the outgoing chunk so
|
||||
# model_dump_json(exclude_none=True) drops it.
|
||||
# The copy in self.chunks retains usage for
|
||||
# calculate_total_usage().
|
||||
processed_chunk.usage = None # type: ignore
|
||||
# Strip usage from the outgoing chunk so it's not sent twice
|
||||
# (once in the chunk, once in _hidden_params).
|
||||
# Create a new object without usage, matching sync behavior.
|
||||
# The copy in self.chunks retains usage for calculate_total_usage().
|
||||
obj_dict = processed_chunk.model_dump()
|
||||
if "usage" in obj_dict:
|
||||
del obj_dict["usage"]
|
||||
processed_chunk = self.model_response_creator(
|
||||
chunk=obj_dict, hidden_params=processed_chunk._hidden_params
|
||||
)
|
||||
is_empty = is_model_response_stream_empty(
|
||||
model_response=cast(ModelResponseStream, processed_chunk)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ def get_all_supported_anthropic_beta_headers(provider: str):
|
|||
"model_name,provider_name",
|
||||
[
|
||||
("claude-sonnet-4-5-20250929", "anthropic"),
|
||||
("azure-ai-claude-opus-4.5", "azure_ai"),
|
||||
("vertex-ai-claude-opus-4-6", "vertex_ai"),
|
||||
# ("azure-ai-claude-opus-4.5", "azure_ai"),
|
||||
# ("vertex-ai-claude-opus-4-6", "vertex_ai"), Add once cicd has creds for this
|
||||
],
|
||||
)
|
||||
async def test_anthropic_messages_with_all_beta_headers(model_name, provider_name):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue