litellm/tests/unit/llms/bedrock/chat
joshua-berri 06325db25f fix(bedrock): resolve profile pricing before applying custom rates (#47419)
Backport of #47419 to stable/1.105.x.
Cherry-picked from 3124797399 (main).
Adapted to the line, on top of the ported helpers in the previous commit:
- runtime_model_cost_registrations reads a per-cost-map store of the fields each register_model call set (_RegisteredPricingFields), which stands in for main's AliasedCostEntry.registered_fields (#41523) so alias entries stay plain dicts. A catalog reload resets it, as main's reload drops registered_fields.
- An inference-profile ARN in model_id is resolved to its profile name inside _bedrock_pricing_info with the line's extract_model_name_from_bedrock_arn, instead of main's get_potential_model_names ARN handling.
- completion_cost keeps the line's candidate list and passes the profile info through; optional_params is read directly (main's _LOGGED_LITELLM_PARAMS is not on the line).
- The router adapters _MODEL_INFO_ADAPTER and _LITELLM_PARAMS_ADAPTER are defined here.
- Tests use the line's private names. Dropped: the AliasedCostEntry routing test, the router cache-only pricing test (main-only fixtures), and the ignore_stamped_cost assertion (main-only parameter).
2026-10-20 17:24:19 -07:00
..
agentcore test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
chat_completions fix(bedrock): backport #44307 to rc/1.105.0 (#44317) 2026-10-02 20:58:57 -07:00
invoke_transformations fix(anthropic): carry thinking.block_binding only on the exact Anthropic, Azure AI and Bedrock Invoke configs 2026-10-20 03:11:23 -07:00
mantle test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
test_bedrock_converse_handler.py fix(bedrock): resolve profile pricing before applying custom rates (#47419) 2026-10-20 17:24:19 -07:00
test_converse_transformation.py fix(responses): report truncated bridged output as incomplete and echo request params (#44460) 2026-10-20 15:49:49 -07:00
test_converse_transformation_nova_2.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_invoke_handler.py fix(bedrock): surface a converse-stream 200 that decodes to no events as a 502 instead of an empty turn (#43213) 2026-09-25 15:18:03 -07:00
test_mistral_config.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_service_tier.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_streaming_choice_index.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_writer_palmyra.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00