* Feature/track bedrock gov cloud models (#12771) * feat: add AWS Bedrock GovCloud model support (LIT-257) - Added 18 GovCloud-specific model entries (9 per region) to model_prices_and_context_window.json - Updated is_bedrock_pricing_only_model() to allow GovCloud models (us-gov-east-1, us-gov-west-1) - Added comprehensive test suite for GovCloud model support - Ensures GovCloud models use appropriate APIs (Converse for Claude/Llama, Invoke for Titan) Models added: - Claude 3.5 Sonnet and Claude 3 Haiku (FedRAMP/IL4/5 approved) - Llama 3 8B and 70B (FedRAMP/IL4/5 approved) - Amazon Titan Text and Embedding models * fix: add bedrock_converse GovCloud model mappings for Claude models Added missing bedrock_converse model entries for AWS GovCloud regions: - bedrock_converse/us-gov-east-1/anthropic.claude-3-5-sonnet-20240620-v1:0 - bedrock_converse/us-gov-east-1/anthropic.claude-3-haiku-20240307-v1:0 - bedrock_converse/us-gov-west-1/anthropic.claude-3-5-sonnet-20240620-v1:0 - bedrock_converse/us-gov-west-1/anthropic.claude-3-haiku-20240307-v1:0 This fixes test failures where supports_tool_choice() returned True but the models weren't properly mapped in the configuration files. * fix: correct AWS GovCloud Bedrock model pricing and configurations - Fix Claude 3.5 Sonnet pricing (3.6e-06 input, 1.8e-05 output) - Fix Claude 3 Haiku pricing (3e-07 input, 1.5e-06 output) - Update Claude 3.5 Sonnet max_tokens from 4096 to 8192 - Add bedrock_converse entries for Llama models with correct token limits - Add Amazon Nova Pro model for both GovCloud regions - Add supports_pdf_input flag to Claude models * fix: handle bedrock_converse prefix in get_non_litellm_routing_model_name Fixes test failure where bedrock_converse/region/model paths were not properly stripped to get the base model name, causing supports_function_calling to return false for regional bedrock_converse models. * revert: reset bedrock/common_utils.py to match main branch Remove bedrock_converse prefix handling from get_non_litellm_routing_model_name to align with main branch implementation. * revert: reset litellm/__init__.py to match main branch - Remove public_model_groups variables - Remove GovCloud exception handling in is_bedrock_pricing_only_model - Fix comment formatting * revert: reset litellm/__init__.py to exact main branch content Copy exact content from origin/main with no modifications * fix: remove bedrock_converse prefixed models from pricing files - Remove 10 bedrock_converse entries from model_prices_and_context_window.json - Remove 4 bedrock_converse entries from litellm/model_prices_and_context_window_backup.json - These were GovCloud-specific entries that are no longer needed * fix: correct AWS GovCloud Bedrock model pricing and configurations - Fix Anthropic Claude 3.5 Sonnet pricing: $3.60/$18.00 per million tokens (was $3.00/$15.00) - Fix Anthropic Claude 3 Haiku pricing: $0.30/$1.50 per million tokens (was $0.25/$1.25) - Fix Claude 3.5 Sonnet max_tokens: 8192 (was 4096) - Fix Llama model max_tokens: 2048 (was 8192) and max_input_tokens: 8000 (was 8192) - Fix Llama3-8b output pricing: $2.65 per million tokens (was $0.60) - Add missing Amazon Nova Pro models for both GovCloud regions - Add supports_pdf_input flag to Llama models Based on official AWS Bedrock pricing documentation for GovCloud regions * test: fix GovCloud bedrock models test to match implementation Update test_govcloud_model_in_bedrock_models_list to correctly verify that GovCloud models are excluded from bedrock_models list as they are pricing-only models following the bedrock/<region>/<model> pattern. --------- Co-authored-by: Cole McIntosh <colemcintosh6@gmail.com> Co-authored-by: Cole McIntosh <82463175+colesmcintosh@users.noreply.github.com> * add tests * add tests * Added test costs * Added test costs --------- Co-authored-by: Cole McIntosh <colemcintosh6@gmail.com> Co-authored-by: Cole McIntosh <82463175+colesmcintosh@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| basic_proxy_startup_tests | ||
| batches_tests | ||
| code_coverage_tests | ||
| documentation_tests | ||
| enterprise | ||
| guardrails_tests | ||
| image_gen_tests | ||
| litellm_utils_tests | ||
| litellm-proxy-extras | ||
| llm_responses_api_testing | ||
| llm_translation | ||
| load_tests | ||
| local_testing | ||
| logging_callback_tests | ||
| mcp_tests | ||
| multi_instance_e2e_tests | ||
| old_proxy_tests/tests | ||
| openai_endpoints_tests | ||
| otel_tests | ||
| pass_through_tests | ||
| pass_through_unit_tests | ||
| proxy_admin_ui_tests | ||
| proxy_security_tests | ||
| proxy_unit_tests | ||
| router_unit_tests | ||
| scim_tests | ||
| spend_tracking_tests | ||
| store_model_in_db_tests | ||
| test_litellm | ||
| unified_google_tests | ||
| vector_store_tests | ||
| windows_tests | ||
| __init__.py | ||
| gettysburg.wav | ||
| large_text.py | ||
| openai_batch_completions.jsonl | ||
| README.MD | ||
| test_budget_management.py | ||
| test_callbacks_on_proxy.py | ||
| test_config.py | ||
| test_debug_warning.py | ||
| test_end_users.py | ||
| test_entrypoint.py | ||
| test_fallbacks.py | ||
| test_health.py | ||
| test_keys.py | ||
| test_logging.conf | ||
| test_models.py | ||
| test_openai_endpoints.py | ||
| test_organizations.py | ||
| test_passthrough_endpoints.py | ||
| test_ratelimit.py | ||
| test_resource_cleanup.py | ||
| test_spend_logs.py | ||
| test_team_logging.py | ||
| test_team_members.py | ||
| test_team.py | ||
| test_users.py | ||
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/litellm
This folder can only run mock tests.