litellm/tests/llm_translation
0717376 12f02f6c54
feat: Add GigaChat provider support (#18564)
* feat: Add GigaChat provider support

Add native support for GigaChat API (Sber AI, Russia's leading LLM).

Supported features:
- Chat completions (sync/async)
- Streaming (sync/async)
- Function calling / Tools
- Structured output via JSON schema (emulated through function calls)
- Image input (base64 and URL)
- Embeddings

Closes #18515

* fix: resolve mypy type errors in GigaChat handler

- Fix _prepare_file_data return type (use 3-tuple for cleaner type flow)
- Add type annotations for lists in _process_content_parts methods
- Add type annotations in _collapse_user_messages
- Use ChatCompletionToolCallChunk for proper tool_use typing
- Add type: ignore[override] for astreaming async generator

* refactor(gigachat): migrate to BaseConfig pattern

* fix: remove unused imports

* fix: resolve mypy type errors

* fix: mypy type errors

* refactor: address review feedback for GigaChat provider

- Remove singleton pattern, reuse litellm HTTPHandler
- Move constants/errors to transformation files, delete common_utils.py
- Add models to model_prices_and_context_window.json
- Fix ssl_verify not passed to HTTP client for embeddings

* docs: update GigaChat documentation with ssl_verify requirement
2026-01-06 10:10:02 +05:30
..
fixtures test fix 2025-10-16 18:00:46 -07:00
test_llm_response_utils fix: handle empty error objects in response conversion (#18493) 2026-01-04 00:37:52 +05:30
test_skills_data [Feat] Unified Skills API - works across Anthropic, Vertex, Azure, Bedrock (#18232) 2025-12-19 18:55:59 +05:30
test-skill [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
base_audio_transcription_unit_tests.py
base_embedding_unit_tests.py
base_llm_unit_tests.py fix img URL for tests 2025-11-22 09:41:15 -08:00
base_rerank_unit_tests.py
conftest.py
dog.wav
duck.png
gettysburg.wav
guinea.png
log.xt
Readme.md
test_aiohttp_openai.py
test_anthropic_completion.py test: remove expensive test 2025-12-09 18:23:03 -08:00
test_aws_base_llm.py
test_azure_agents.py [Fixes] A2a Gateway - ensure azure foundry agents work (#17943) 2025-12-13 16:08:03 -08:00
test_azure_ai.py test_completion_azure_ai_gpt_4o_with_flexible_api_base 2025-10-25 14:59:11 -07:00
test_azure_o_series.py TestAzureOpenAIO3Mini 2025-12-20 23:18:19 +05:30
test_azure_openai.py Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
test_bedrock_agentcore.py Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
test_bedrock_agents.py
test_bedrock_completion.py Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
test_bedrock_dynamic_auth_params_unit_tests.py
test_bedrock_embedding.py [Fix] Bedrock Embeddings - Ensure correct aws_region is used when provided dynamically (#16547) 2025-11-12 12:38:58 -08:00
test_bedrock_govcloud.py feat(bedrock): Add Claude 4.5 to US Gov Cloud (#16957) 2025-11-21 19:06:26 -08:00
test_bedrock_gpt_oss.py test fix 2025-10-17 11:18:29 -07:00
test_bedrock_invoke_tests.py
test_bedrock_llama.py
test_bedrock_nova_embedding.py fix: request body for image embedding request 2025-12-22 16:55:04 +05:30
test_bedrock_nova_json.py
test_clarifai_completion.py
test_cloudflare.py
test_cohere.py Add OpenAI-compatible annotations support for Cohere v2 citations 2025-10-29 19:12:17 -07:00
test_containers_api.py [Feat] Containers API - add new container API file management + UI Interface (#17745) 2025-12-09 17:33:26 -08:00
test_convert_dict_to_image.py
test_databricks.py init commit (#16200) 2025-11-03 18:58:03 -08:00
test_deepgram.py
test_deepseek_completion.py
test_elevenlabs.py Integrate eleven labs text-to-speech (#16573) 2025-11-24 18:49:30 -08:00
test_fireworks_ai_translation.py fix img URL for tests 2025-11-22 09:41:15 -08:00
test_gemini_image_usage.py Add usage object in image generation of gemini 2025-12-22 11:59:30 +05:30
test_gemini.py Rename: gemini-3-flash-preview 2025-12-17 21:48:15 +05:30
test_gigachat.py feat: Add GigaChat provider support (#18564) 2026-01-06 10:10:02 +05:30
test_gpt4o_audio.py
test_groq.py fix(groq): check supports_response_schema before using json_tool_call workaround (#17438) 2025-12-03 21:31:13 -08:00
test_huggingface_chat_completion.py
test_hyperbolic.py
test_infinity.py
test_jina_ai.py
test_lambda_ai.py
test_langgraph.py [Feat] New Provider - add langgraph (#17783) 2025-12-10 12:30:35 -08:00
test_litellm_proxy_provider.py
test_minimax_tts.py Add support for minmax tts 2025-12-23 21:53:53 +05:30
test_mistral_api.py
test_morph.py
test_nvidia_nim.py TestNvidiaNim 2025-12-13 16:38:11 -08:00
test_openai_o1.py test_streaming_response 2025-10-31 19:10:38 -07:00
test_openai_realtime.py test realtime fix 2025-12-21 10:21:25 +05:30
test_openai.py fix remove flaky test 2025-12-22 16:32:13 +05:30
test_openrouter.py
test_optional_params.py Litellm sameer nov 3 stable branch (#16963) 2025-11-22 09:35:05 -08:00
test_perplexity_reasoning.py Revert "Update perplexity cost tracking (#15743)" (#16345) 2025-11-06 19:00:45 -08:00
test_prompt_caching.py
test_prompt_factory.py fix(anthropic): preserve server_tool_use and web_search_tool_result in multi-turn conversations (#17746) 2025-12-09 18:25:23 -08:00
test_rerank.py test_rerank_custom_callbacks 2025-11-01 09:25:29 -07:00
test_router_llm_translation_tests.py
test_sambanova_chat_transformation.py [Bug fix] Fixes SambaNova API rejecting requests when message content is passed as a list format (#16612) 2025-11-13 17:03:14 -08:00
test_skills_api.py [Feat] New API - Claude Skills API (Anthropic) (#17042) 2025-11-24 15:01:40 -08:00
test_skills_e2e.py test_slack_gif_skill_creates_gif 2025-12-20 21:35:25 +05:30
test_snowflake.py snowflake test fix 2025-11-21 17:12:55 -08:00
test_text_completion_unit_tests.py fix(openai): use optimized async http client for text completions (#17831) 2025-12-11 14:54:26 -08:00
test_text_completion.py
test_together_ai.py
test_triton.py
test_unit_test_bedrock_invoke.py [Oct Staging Branch] (#15460) 2025-10-17 17:52:25 -07:00
test_v0.py
test_voyage_ai.py
test_watsonx.py
test_xai.py

Unit tests for individual LLM providers.

Name of the test file is the name of the LLM provider - e.g. test_openai.py is for OpenAI.