litellm/litellm
Ishaan Jaffer bd5740a367
fix(streaming): skip role-only first chunk when logprobs.content is empty
When logprobs are requested, OpenAI's first streaming chunk has
role='assistant' and logprobs=ChoiceLogprobs(content=[]). The Azure
streaming fix (PR #25638) made is_chunk_non_empty() treat any first
chunk with a non-None role as non-empty, which caused this role-only
chunk to be emitted. Callers checking 'logprobs in chunk.choices[0]'
then crashed on logprobs.content[0] (IndexError: list index out of range).

Guard the role condition: don't emit the first chunk as non-empty when
logprobs is present but has no content entries. Azure's use case (no
logprobs, empty choices[]) is unaffected.
2026-04-13 16:42:15 -07:00
..
a2a_protocol fix(a2a): default create_a2a_client timeout to DEFAULT_A2A_AGENT_TIMEOUT 2026-04-10 21:06:44 +03:00
anthropic_interface style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
assistants
batch_completion fix: prompt registry 2026-02-18 00:34:54 +05:30
batches Merge pull request #23957 from Sameerlite/litellm_vertex-cancel-batch 2026-03-20 23:32:50 +05:30
caching Litellm ishaan march 20 (#24303) 2026-03-21 12:40:11 -07:00
completion_extras fix(lint): apply Black formatting to 14 files (#24532) 2026-03-31 07:45:55 -07:00
containers feat(containers): Azure routing, managed container IDs, delete response parsing (#25287) 2026-04-11 09:21:01 -07:00
endpoints/speech/speech_to_completion_bridge
evals Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
experimental_mcp_client Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
files Update streaming.py. Provide Type Annotation for empty dict 2026-04-11 13:04:25 -07:00
fine_tuning address greptile review feedback (greploop iteration 1) 2026-03-27 20:04:41 +05:30
google_genai Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
images Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
integrations Merge remote-tracking branch 'origin' into litellm_internal_staging_04_11_2026 2026-04-11 15:41:03 -07:00
interactions Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
litellm_core_utils fix(streaming): skip role-only first chunk when logprobs.content is empty 2026-04-13 16:42:15 -07:00
llms Merge pull request #25616 from BerriAI/main 2026-04-13 08:43:43 +05:30
ocr Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
passthrough style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
proxy style: black format user_api_key_auth.py 2026-04-13 14:59:34 -07:00
proxy_auth fix: prompt registry 2026-02-18 00:34:54 +05:30
rag style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
realtime_api Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
rerank_api Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
responses fix(mypy): type-safe dict conversion for codex_parameters in transformation.py 2026-04-13 14:59:34 -07:00
router_strategy Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
router_utils fix(router): lazy-import InternalServerError to break cyclic import 2026-04-13 19:47:30 +02:00
search Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
secret_managers Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
skills Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
types Merge pull request #25616 from BerriAI/main 2026-04-13 08:43:43 +05:30
vector_store_files Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
vector_stores Root cause fix - migrate all logging update to use 1 function - for centralized kwarg updates (#23659) 2026-03-15 23:21:01 -07:00
videos [Staging] - Ishaan March 17th (#23903) 2026-03-18 15:09:01 -07:00
__init__.py Reduce default latency histogram bucket cardinality (#25527) 2026-04-11 09:34:45 -07:00
_lazy_imports.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_lazy_imports_registry.py feat: add sagemaker_nova provider for Amazon Nova models on SageMaker (#21542) 2026-03-14 15:10:01 -07:00
_logging.py Litellm oss staging 04 02 2026 p1 (#25055) 2026-04-08 21:37:10 -07:00
_redis.py Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
_redis_credential_provider.py Litellm ishaan march23 - MCP Toolsets + GCP Caching fix (#25146) (#25155) 2026-04-04 16:23:21 -07:00
_service_logger.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
_uuid.py
_version.py
anthropic_beta_headers_config.json feat(anthropic): register advisor-tool-2026-03-01 in beta headers config 2026-04-10 12:39:30 -07:00
anthropic_beta_headers_manager.py Refactor: Filtering beta header after transformation 2026-03-16 10:47:15 +05:30
blog_posts.json docs(blog): add WebRTC blog post link 2026-03-13 17:54:33 +05:30
budget_manager.py
constants.py Merge pull request #25600 from mubashir1osmani/fix-uvx-mcp 2026-04-13 14:23:02 -07:00
cost.json
cost_calculator.py [Test Fix] fix gov pricing tests (#25022) 2026-04-02 15:55:55 -07:00
exceptions.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
main.py style: black format main.py 2026-04-13 14:59:34 -07:00
model_prices_and_context_window_backup.json Merge pull request #25616 from BerriAI/main 2026-04-13 08:43:43 +05:30
mypy.ini
policy_templates_backup.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
provider_endpoints_support_backup.json feat(search): add Serper (serper.dev) as search provider (#23112) 2026-03-09 08:40:37 -07:00
py.typed
router.py fix(router): pass custom_llm_provider to get_llm_provider for unprefixed model names (#25334) 2026-04-08 21:27:13 -07:00
scheduler.py style: run black formatter on entire codebase 2026-03-11 17:07:57 -03:00
setup_wizard.py Litellm fix update bedrock models (#24947) 2026-04-01 19:22:54 -07:00
timeout.py
utils.py Merge pull request #25616 from BerriAI/main 2026-04-13 08:43:43 +05:30