litellm/tests/test_litellm/llms/bedrock
harish-berri cff3e0b75e
Some checks failed
Unit Tests: Proxy DB Operations / assert-shard-coverage (push) Has been cancelled
Unit Tests: Security / security (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 / proxy-runtime (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-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
refactor(bedrock/sagemaker): switch to lazy loading for response stre… (#28189)
* refactor(bedrock/sagemaker): switch to lazy loading for response stream shapes

- Replace eager loading of BEDROCK_RESPONSE_STREAM_SHAPE and SAGEMAKER_RESPONSE_STREAM_SHAPE with lazy loading via get_bedrock_response_stream_shape() and get_sagemaker_response_stream_shape() respectively.
- This change optimizes performance by avoiding unnecessary imports and logging warnings unless the response stream shapes are actually needed.
- Update relevant classes and tests to utilize the new lazy loading functions, ensuring consistent behavior across the codebase.

* test(bedrock/sagemaker): add fixtures to clear response stream shape cache

- Introduced `_reset_bedrock_response_stream_shape_cache` and `_reset_sagemaker_response_stream_shape_cache` fixtures to prevent lru_cache leakage between tests in their respective modules.
- Updated tests to utilize these fixtures, ensuring that the response stream shape cache is cleared before and after each test run.
- Added `pytest.importorskip("botocore")` to ensure that tests are skipped if the botocore library is not available.
2026-05-18 23:21:04 -07:00
..
batches fix(bedrock): sanitize batch metadata to prevent Pydantic ValidationError (#28202) 2026-05-18 18:00:18 -07:00
chat refactor: remove unnecessary comments from #27074 2026-05-04 19:34:56 +00:00
count_tokens fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
embed fix(bedrock/cohere): send embedding_types as JSON array, not string (#28172) 2026-05-18 12:16:20 -07:00
files harden cloud file compatibility path 2026-05-01 18:14:36 -07:00
image style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
image_edit Litellm ishaan april1 try2 (#25110) 2026-04-03 14:57:44 -07:00
invoke_agent fix: cover provider path traversal variants 2026-04-29 22:29:09 -07:00
messages/invoke_transformations fix(bedrock/messages): preserve compact_20260112 context_management on /v1/messages (#27534) 2026-05-09 20:26:37 +00:00
passthrough style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
realtime style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
rerank style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vector_stores fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
test_anthropic_beta_support.py fix(bedrock): allowlist Bedrock Invoke body fields and filter all anthropic-beta values 2026-04-21 11:26:15 -07:00
test_base_aws_llm.py refactor(BaseAWSLLM): implement shared IAM cache and static credentia… (#27125) 2026-05-05 16:47:47 -07:00
test_bedrock_common_utils.py refactor(bedrock/sagemaker): switch to lazy loading for response stre… (#28189) 2026-05-18 23:21:04 -07:00
test_bedrock_ssl_verify.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_claude_platform_provider.py Add Bedrock Claude Platform route (#27678) 2026-05-11 15:50:54 -07:00
test_cross_region_inference_profile_mapping.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mantle.py fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpo… (#27976) 2026-05-15 13:31:59 -07:00